Another Webcam Problem

Post Reply
acatalano
Observer
Observer
Posts: 30
Joined: Wed Jan 31, 2018 9:39 pm
Location: Boulder, Colorado
Station model: Davis Vantage Pro 2
Software: CumulusMX
Contact:

Another Webcam Problem

Post by acatalano » Fri Feb 09, 2018 7:10 pm

I've read some of the forum threads on the webcam problems of others and I seem to have one of my own. I installed the plugin and edited the settings so that an image.jpg file from my other website would be brought over, saving the trouble of having to do 2 FTP's from my home server. This works and a new image shows up via the plugin as expected. I setup a cron job at cron-job.org alongside my existing website update.php. I also made the permissions in all the webcam plugins folder 755 or above. However I get the following password errors when I run the CRON job:

Notice: Undefined variable: updatePassword in /home/www/boulderweather.org/template/plugins/webcam/updateWebcam.php on line 5

Notice: Undefined variable: password in /home/www/boulderweather.org/template/plugins/webcam/updateWebcam.php on line 5

Notice: Undefined variable: baseURL in /home/www/boulderweather.org/template/plugins/webcam/updateWebcam.php on line 9
Missing Webcam settings file, create one using the plugin setup.

Well the settings file is there just as I set it up via the control panel within the website. It all seems OK. The only thing I can figure is that fetching the image.jpg file from my other website is an issue although nothing about these errors indicates this and the image is refreshed every 15 minutes. So I'm a bit unable to figure this one out! Note that I am using the very same syntax for the command as my existing cron job which works fine: www.boulderweather.org/template/plugins ... word=XXXXX
Best Regards,
Anthony Catalano
Boulder, CO
Websites: www.apcat.org www.boulderwx.com www.boulderweather.org
Blitzortung Lighting Detector Station 1965

Image

acatalano
Observer
Observer
Posts: 30
Joined: Wed Jan 31, 2018 9:39 pm
Location: Boulder, Colorado
Station model: Davis Vantage Pro 2
Software: CumulusMX
Contact:

Re: Another Webcam Problem

Post by acatalano » Wed Feb 14, 2018 8:28 pm

I must say I feel like a dolt, asking this question. I did not realize that the instructions were included under the description of the plugin! I've been getting by with just forging ahead. Setup was easy once I actually read all the way to the end of the page! I guess it's a testimony to how well Jachym has prepared the templates.
Best Regards,
Anthony Catalano
Boulder, CO
Websites: www.apcat.org www.boulderwx.com www.boulderweather.org
Blitzortung Lighting Detector Station 1965

Image

User avatar
MonyMony
Forecaster
Forecaster
Posts: 180
Joined: Sun Aug 20, 2017 12:54 pm
Location: Elkton, Maryland, US
Station model: Davis Pro 2
Software: WeatherCat/Meteobridge
Contact:

Re: Another Webcam Problem

Post by MonyMony » Thu Feb 15, 2018 8:46 pm

Don't worry, we have all been 'there'.

Have fun with the plugin!
Image

User avatar
Steve Harpin
Observer
Observer
Posts: 48
Joined: Wed Dec 13, 2017 7:08 pm
Location: York England
Station model: Fine Offset WH1080
Software: Cumulus

Re: Another Webcam Problem

Post by Steve Harpin » Tue Feb 27, 2018 7:40 pm

Well....here's another idiotic question just to make everybody feel better. I HAVEread all the instructions and still am slightly mystified. Does the CRON job(which I have set up quite sucessfully)do all the uploading work or do I have to do something via FTP on my own pc. I have a Reolink camera which I am still in the process of tweaking and then siting somewhere outside and I have the Reolink desktop app. There is an awful compulsion for me to do something with that but that HAS to be wrong....
In the plugins modification for the webcam I have just pointed it to the webcam index.php. Is that all I have to do??
Image

User avatar
Steve Harpin
Observer
Observer
Posts: 48
Joined: Wed Dec 13, 2017 7:08 pm
Location: York England
Station model: Fine Offset WH1080
Software: Cumulus

Re: Another Webcam Problem

Post by Steve Harpin » Tue Feb 27, 2018 11:20 pm

In other words, I get the fact that the CRON job PULLS the info it needs but what, if anything, PUSHES the images to the website?

Steve
Image

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

Re: Another Webcam Problem

Post by dmgould » Wed Feb 28, 2018 12:03 am

I don't know anything about Reolink, the Reolink app, or how it works. The Webcam plugin needs to retrieve the most recent image file from somewhere using the cron. In my case I ftp the image to my host website, and the plugin pulls that image into the webcam database. Without really understanding Reolink my gut tells me pointing the cron to the index.php doesn't actually get the image from the webcam.
Dave G
Image

User avatar
Steve Harpin
Observer
Observer
Posts: 48
Joined: Wed Dec 13, 2017 7:08 pm
Location: York England
Station model: Fine Offset WH1080
Software: Cumulus

Re: Another Webcam Problem

Post by Steve Harpin » Wed Feb 28, 2018 8:39 am

Thanks for the reply. I totally understand that the CRON job does the pulling and it is set up correctly according to Jachym's tutorial, so that part is OK. I have it pointing to the cron.php in the load folder NOT the index.php or anything like that. So now I have to upload images via FTP on my pc. I can't really do that right now as I have no sensible images to send :D The webcam is not set up yet(at least wirelessly)but I will possibly need some extra comments here for when I do have it running. The Reolink desktop app has some fairly comprehensive tweaking tools and it was my first port of call. But then I gave up for the time being.
Image

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

Re: Another Webcam Problem

Post by dmgould » Wed Feb 28, 2018 9:09 pm

Understand exactly what you mean. When I changed my webcam images over to my own server (from WU) it took me several days to finally get a simple php code to deal with just the image name. Good luck when you get back to it. There is usually someone in the forum willing to help or has already been through what you are working on.
Dave G
Image

User avatar
Steve Harpin
Observer
Observer
Posts: 48
Joined: Wed Dec 13, 2017 7:08 pm
Location: York England
Station model: Fine Offset WH1080
Software: Cumulus

Re: Another Webcam Problem

Post by Steve Harpin » Mon Mar 05, 2018 10:31 pm

First time I have ever done this sort of thing and am still puzzling my way through it. I have abandoned the Reolink app for anything other than setting up a camera wirelessly-which I have now done. Going to the browser IP of 192.168.0.35, I now have a stable connection to the camera. I have put a capture folder on the pc and have instructed Cute FTP to upload to the corresponding folder within the template every 10 minutes(600 seconds)and told it to commence at 9.00am tomorrow morning. I will see what hapopens but I will now need some serious advice on what the ideal schedule should be. ALSO, surely I do not need to keep the camera browser AND Cute FTP permanently open? Or do I?? I am a total beginner on this one.

Steve
Image

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

Re: Another Webcam Problem

Post by dmgould » Mon Mar 05, 2018 11:13 pm

I don't know anything about that brand of camera, but I'm pretty certain you don't need to leave the browser connection open to it. It should ftp on a schedule to the location you have setup. Mine all do as long as they have power and are connected to the network and internet. If there is a test routine in the ftp setup click on it and see if the image sends to your website. Mine has that feature.
Dave G
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: Another Webcam Problem

Post by Dehatter » Thu Mar 08, 2018 7:48 am

So my set up is a 'little' different.

I use IPTimelaspe. https://iptimelapse.com/

Yes it costs $59...And yes it runs on my laptop 24/7 (but with absolutely no resource lag).

BUT in my opinion quite worth it. It loads a full size image that I use in the template (about 350K max in size). It also loads a thumbnail of the image resized for WU (about 125K max) since WU has a 150k limit.

Even though my camera cannot use the same filename, IPTL can. Full image is called image.jpg while the thumbnail is called image1.jpg (you can name it whatever your want). Updates for the plugin is set for 10 min. My Meteobridge device pulls the thumbnail and sends it to WU every 5 mins.

Additionally, IPTL saves an image locally every 30 secs (deletes all images that are 4 days old [user selectable]to save space) and builds a video every hour showing the last 3 hours (user selectable) as well as a video of the full day (for me it updates at 11:30pm every night, but you can choose). It also uploads all images and video to the ftp server automatically. It also overlays the image with weather data from WU, and updates the overlay every 10 mins. You can also choose to only build videos during the day (or not). I have to do absolutely nothing.

If I did not want to have the time-lapse, or send images to WU. I have a script that I can provide you that looks in a directory, pulls the latest image, renames that image to a particular filename and deletes all the other images in the folder. I would be happy to share and assist you with this. This method does not require a computer on at all, but your camera must upload .jps to the server directly. Honestly, I am so tempted to drop WU as they do NOT do well accepting the images even though they are the right size. I seems to be almost random whether they accept it or not, but I definitely love the no effort automatic time-lapse, and because IPTL can accomplish both activities, and I would be running it anyway, i still send images to WU. Besides my laptop is on anyway. (And no I am not affiliated in any way with IPTL, just dogged myself for 2 weeks trying to figure out a better way and could not).

All the examples from above:
http://www.cam.tempestasvigilate.com/image.jpg
http://www.cam.tempestasvigilate.com/image1.jpg
http://www.cam.tempestasvigilate.com/icu2.mp4
http://www.cam.tempestasvigilate.com/Intraday_icu2.mp4

Send me a PM if you want the script and I will give it to you and try and help you get it running right.

Tom
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: Another Webcam Problem

Post by aznetcowboy » Thu Jul 12, 2018 6:07 pm

All this looks great from my point of view, however I have some questions regarding using a weather camera. First one deals with my unique issues, namely it must be a wireless setup. I can get to a power outlet if needed, but to run a cable to my weather computer is not an option (I'd have to drill a hole through a 12 inch stone wall!). I think most weather cameras can hold up to southern Arizona weather, but where I want to aim one is to the mountains about 15 miles north of my home.

Any recommendations on a camera? Once I get one, then it becomes a matter of getting it to send data to my weather PC via my router so I can broadcast my video/snapshots (whatever) to the Internet. I know my local TV station (about 1/2 mile from my home) would be very happy to have a weather camera so close to their location. :D
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

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: Another Webcam Problem

Post by Dehatter » Thu Jul 12, 2018 8:59 pm

When you goto the plugins setup page, does it say create or edit?

The settings file exists even if you have not actually set it up yet,

Tom
Image

User avatar
Steve Harpin
Observer
Observer
Posts: 48
Joined: Wed Dec 13, 2017 7:08 pm
Location: York England
Station model: Fine Offset WH1080
Software: Cumulus

Re: Another Webcam Problem

Post by Steve Harpin » Thu Oct 17, 2019 7:15 pm

I am right back where I started from after well over a year away from the subject. Dehatter helped me out tremendously at the time but now I cannot contact him and his website is down. That's a mystery and i am quite concerned for him. Does anybody have an idea if he is allright??
I am trying to restore my webcam block. is there anybody who has fresh ideas on how I can get a constantly renewing image up on the website at http://the9libraries.org.uk/template/pl ... /index.php
I have downed the link to prevent images being constantly uploaded at the moment but can restore that once I have a sensible plan
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Another Webcam Problem

Post by andyk1 » Wed Jan 15, 2020 6:35 am

Sorry for the delay but I have been out of it for a while also. Tom's (Dehatter) site changed to http://www.meckweather.com/template/indexDesktop.php and probably hasn't been updated here.
Image

User avatar
EveshamWeather
Observer
Observer
Posts: 20
Joined: Sat Sep 02, 2017 11:11 am
Location: Evesham, UK
Station model: Davis Vantage Vue
Software: Weewx
Contact:

Re: Another Webcam Problem

Post by EveshamWeather » Sun Feb 09, 2020 10:48 am

Sorry for the late reply but I have a script running on a Windows PC I have running 24/7 with a scheduled task every 15 to take the latest image uploaded from my camera, modify it to add an overlay and resize it to something sensible. It then uploads this using the command line FTP program built into Windows and runs the cron URL.

You will need to install ImageMagick (I just chose the dll download version from https://www.imagemagick.org/script/download.php#windows) and curl (this is built into newer Windows 10 builds).

I have my camera automatically save the image into a shared folder on my NAS box, which is mapped on the system to my w drive. As there could be more than 1 jpg file present I run a line to copy the file into a working folder as webcam.jpg. This was the best way I found to get the latest image automatically when I wrote the script. Once there I run the ImageMagick composite and convert commands to create my end image. My overlay image is a png so it doesn't get deleted in the delete commands run later.
The FTP command just runs an FTP script file shown below too to upload to my website. Once it is on the server I remove all the images in both the working folder and the original folder the camera uploads to. The final step is to load the cron URL using curl.

webcamupload.bat

Code: Select all

echo on
w:
cd \path-to-saved-image
for /F "skip=2" %%f IN ('dir /TW /OD /A-D /B') DO copy %%f webcam-upload\webcam.jpg /y
cd webcam-upload
composite -geometry +35+7 -gravity SouthWest logo.png webcam.jpg eveshamweather1.jpg
convert eveshamweather1.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB eveshamweather.jpg
ftp -n -s:ftp.txt
del *.jpg
cd ..
del *.jpg
rem update site using curl
curl http://eveshamweather.co.uk/load/cron.php?password=cronpassword
ftp.txt

Code: Select all

open website-ftp-url
user ftp-username ftp-password
put eveshamweather.jpg
quit
My scheduled task is run in the built-in task scheduler and just runs webcamupload.bat every 15 minutes from 00:01 each day.

In the past I have had a Linux box doing the same as both ImageMagick and curl are available on those platforms too - in fact, they are built on Unix ahead of Windows).

Hope this helps others who have issues etc.
Vince

Image

Post Reply