Webcam suggestion

Post Reply
Kristi
Observer
Observer
Posts: 15
Joined: Sun Oct 01, 2017 4:41 pm
Location: Gent,Belgium
Station model: Davis Vantage Pro 2
Software: WU
Contact:

Webcam suggestion

Post by Kristi » Wed Feb 14, 2018 5:41 pm

Hello guys!,
I'm considering buy a webcam for my weather station but I have absolutely no idea where to begin my search from and what specifications to look for.

I'd prefer something that would offer good images both day and night (in a cityscape, preferably not IR at night but color vision). My budget is around 100€. I have read that Foscam FI9900P is quite popular among weather enthousiasts and I'm seriously considering it, but does anyone have any other suggestions?

Thanks in advance!

User avatar
dmgould
Forecaster
Forecaster
Posts: 168
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam suggestion

Post by dmgould » Wed Feb 14, 2018 7:22 pm

I am using 3 Foscam cameras. The newest is the model you mentioned. They have worked well for me. Here is one thing you should know about the current model. It will ftp using a filename that includes the date and time, and you are not able to control that naming. As a result it places a new image file on your server on whatever schedule you set in the camera, and so that directory quickly fills with files. My solution, with Jachym's help, was to write a simple php file that renames the most recent image file in the directory, and then it deletes any other files. Then the webcam block and plugin use that image to load it into their database. You can also control whether or not you want the IR lights to come on or not after dark.

Kristi
Observer
Observer
Posts: 15
Joined: Sun Oct 01, 2017 4:41 pm
Location: Gent,Belgium
Station model: Davis Vantage Pro 2
Software: WU
Contact:

Re: Webcam suggestion

Post by Kristi » Sun Apr 01, 2018 11:08 am

Thank you for the suggestion! I have indeed chosen for the 9900P Foscam, and I just got to install it yesterday when I came back home for the Easter holiday.

I am now really clueless on how to proceed with it (and I also didn't have much time to do the research). I connected it with the app on my phone but that's pretty much all I could do. Would you mind sharing with me how you managed to get yours online (and eventually the script you mentioned above)?

:)

User avatar
dmgould
Forecaster
Forecaster
Posts: 168
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam suggestion

Post by dmgould » Mon Apr 02, 2018 12:53 am

I FTP the image to my website using the camera's built in FTP function. It's in the camera menu when you access it via the camera's IP in your browser. While setting this up you probably do not want to FTP on a schedule yet as the server directory will quickly fill up with image files. After you get everything working you can setup the upload schedule.

In the exact directory that my camera uploads the image files, I placed the following php script. In my case I named it sortname.php. I used Notepad++ which correctly creates php files. Script is as follows:

<?php


if ($images = glob("Schedule_*.jpg") ) {

rsort($images);

$img = $images[0];

$newfile = 'image.jpg';

copy($img, $newfile);

}
if ($images = glob("Schedule_*.jpg") ) {

foreach($images as $img){
unlink($img);
}

}
?>


This finds the most recent image upload, renames it image.jpg, and then deletes all other image files in that directory. Eventually you will need to trigger this script using a cron job of some sort or http request. In the meantime you can test it by just entering the correct URL to the script in your browser. Each time you do this it executes the script leaving just the image file image.jpg. Once you have it working you can setup a cron job (or in my case an http request in my Meteobridge) to trigger the script on a schedule. Now you can enter an upload schedule that is also in the camera menu.

At this point you have setup the most recent image file from your camera on your server and can then follow the instructions in the webcam block and plugin to get the image into MT.

mchd17
Advisor
Advisor
Posts: 94
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Webcam suggestion

Post by mchd17 » Tue Apr 03, 2018 3:30 pm

Been thinking about getting one myself. I am rural with a 350gig data a month. If you are able to figure it out, what kind of bandwidth is your cam using a month? Uploading like you are. Curious if it's feasible for me. We have been using around 40 gigs a month now.

mchd17
Image

User avatar
aznetcowboy
Advisor
Advisor
Posts: 50
Joined: Wed Apr 04, 2018 6:21 pm
Location: Tucson, AZ
Station model: Davis Vantage Pro2
Software: Cumulus
Contact:

Re: Webcam suggestion

Post by aznetcowboy » Sun Apr 22, 2018 1:03 am

I have been wanting to add a weather camera to my site also, but my needs are I can get power to it, but to run a cable from the camera to the computer is not an option which means it must be Bluetooth or wi-fi. Wireless is the only option I must have. What are the suggestions now. Oh yes, it must also survive summer temperatures is excess of 100 degrees on a regular basis. And when the monsoon finally kicks in, high winds and very severe weather.
Tom Wills
Kingston Knolls Terrace, Tucson, AZ 85710

El Gheko Neighborhood Weather Station: http://www.elgheko.us
El Gheko meteoTemplate Weather Station: http://www.elgheko.us/mtp/
El Gheko Neighborhood Association: http://na.elgheko.us
Certified Skywarn Trained Observer #1569
Image

patrick39
Newbie
Newbie
Posts: 9
Joined: Mon Nov 11, 2019 12:26 pm
Station model: BYOWS with RPi 3b
Software: weewx with skin Belcherto

Re: Webcam suggestion

Post by patrick39 » Mon Dec 16, 2019 5:01 pm

hello dmgoud,

I tested your script to rename "images" but it doesn't work.
do you have modify your script ?
thanks

Patrick

Post Reply