Webcam
-
- Observer
- Posts: 31
- Joined: Fri Apr 20, 2018 6:54 am
- Station model: Davis Pro 2
- Software: Weather Display
Webcam
Hello everybody,
I have a problem, my server stores only 0 byte images.
Save interval elapsed.
Webcam image being saved.
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2018-06-14 18:56:53',20.5, 48.0, 1007.500, 0.000, 0.000, 0, 3.0, 9.7, '201806141856')
Loaded CRON: /var/www/luetjenburg-wetter.de/meteo/load/crons/updateWebcam.php
Webcam image not being saved because either the save interval hasn't elapsed yet, or the saving is only set to occur during night and it is night-time now.
Loaded CRON: /var/www/luetjenburg-wetter.de/meteo/load/crons/updateWebcam.php
what am I doing wrong?
Thank you
I have a problem, my server stores only 0 byte images.
Save interval elapsed.
Webcam image being saved.
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2018-06-14 18:56:53',20.5, 48.0, 1007.500, 0.000, 0.000, 0, 3.0, 9.7, '201806141856')
Loaded CRON: /var/www/luetjenburg-wetter.de/meteo/load/crons/updateWebcam.php
Webcam image not being saved because either the save interval hasn't elapsed yet, or the saving is only set to occur during night and it is night-time now.
Loaded CRON: /var/www/luetjenburg-wetter.de/meteo/load/crons/updateWebcam.php
what am I doing wrong?
Thank you
-
- Observer
- Posts: 37
- Joined: Sun Aug 19, 2018 3:06 pm
- Location: Schwabach, Germany
- Station model: TE923
- Software: WEEWX
- Contact:
Re: Webcam
Hi,
i have the same problem while i scheduled the cron-job with the tool from my webhoster.
Some cron-job´s need absolute path´s in the php file. In the php file from the block/plugin there are only relative paths.
Since i use cron-job.org to schedule the cron-job it works fine with relative paths too.
Michael
i have the same problem while i scheduled the cron-job with the tool from my webhoster.
Some cron-job´s need absolute path´s in the php file. In the php file from the block/plugin there are only relative paths.
Since i use cron-job.org to schedule the cron-job it works fine with relative paths too.
Michael
Re: Webcam
Did you get it fixed? The same happens to me. The copy of the photo in the image folder only has 0 bytes
- Meteofabro
- Observer
- Posts: 35
- Joined: Wed Aug 23, 2017 5:20 pm
- Location: Fabro
- Station model: Davis Vantage Vue
- Software: Meteobridge RED PRO
- Contact:
Re: Webcam
it also happens to me, but in addition it does not store data in the "webcam" database table. Has anyone understood how to solve the problem?
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Webcam
I am having this issue as well.
Began 5/7/19 and 6PM on the dot.
I have deleted the block and the plugin and reinstalled them, but still saving the name but the file is empty.
Perhaps there has been a change in PHP command for copying the image into the file?
$fp = fopen("../plugins/webcam/images/".$name.".jpg", "w");
fwrite($fp, $imageFile);
fclose($fp);
Tom
Began 5/7/19 and 6PM on the dot.
I have deleted the block and the plugin and reinstalled them, but still saving the name but the file is empty.
Perhaps there has been a change in PHP command for copying the image into the file?
$fp = fopen("../plugins/webcam/images/".$name.".jpg", "w");
fwrite($fp, $imageFile);
fclose($fp);
Tom
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Webcam
So...
Any of you really smart people have a clue what is happening?
Update creates the file, but it never get filled, and since it does not contain any data, the thumbnail does not get created.
directory:
Any and all suggestions welcome!!
Tom
Any of you really smart people have a clue what is happening?
Update creates the file, but it never get filled, and since it does not contain any data, the thumbnail does not get created.
directory:
Any and all suggestions welcome!!
Tom
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Webcam
So...
In my case, it seems I cannot use a "secure" source for the image file.
If anyone else is having this issue, try this as a solution ... make sure your image source is http:// not https://
All is working now for me.
Tom
In my case, it seems I cannot use a "secure" source for the image file.
If anyone else is having this issue, try this as a solution ... make sure your image source is http:// not https://
All is working now for me.
Tom
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Webcam
I checked my folder for the exact times you posted Tom and I am not seeing any 0 bit files at all. went through the whole date and not seeing an issue. Not sure or even a guess since we are on the same host.
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Webcam
Yeah,
I guess I accidentally changed my source in the plugin to a secure image not knowing that something in the processing (the plugin or the block or the update php via cron) for some reason can not process a secure image.
You are not using the secure image on your site either.
I am not anywhere qualified enough to know why a non secure image works and a secure image does not.
I only know that is what fixed it for me.
Tom
I guess I accidentally changed my source in the plugin to a secure image not knowing that something in the processing (the plugin or the block or the update php via cron) for some reason can not process a secure image.
You are not using the secure image on your site either.
I am not anywhere qualified enough to know why a non secure image works and a secure image does not.
I only know that is what fixed it for me.
Tom
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Webcam
Tom, Strangely my replies a week ago didn't stick but I noticed none of my responses didn't do through. I don't know if it is weather related here but we've had one hell of a couple weeks. Glad you have it sorted out.
-
- Forecaster
- Posts: 188
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Webcam
never touched anything. timelapse is working again. saving images correctly. very strange
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
Hi Tom, Hi everybody
thank you for the hint, I followed it - but I still have 0 bit files (all with the correct timestamp filename though, as in your screenshot) in my plugins/webcam/images folder.
I tried different file sizes for the original picture, with and without https, SQL-Database seems ok....
Anybody any idea?
cheers, martin
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Webcam
Have you made any recent changes? What are you feeding MT api.php with i.e. meteobridge, Davis, WU... I haven't touched my MT in so long I don't remember how I fixed it other than Tom's suggestion.
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Webcam
I had a similar problem with my local meteotemplate installation.
I updated the load/crons/updateWebcam.php script.
Only minor fixes to use absolute paths ( vs relative ones )
I tested with your settings ( imageURL = https://www.dubler.com/abus/aktuelles-bild.jpg ) and it works
But, as Dehatter said in previous post, don't understand why this fix works.
I updated the load/crons/updateWebcam.php script.
Only minor fixes to use absolute paths ( vs relative ones )
I tested with your settings ( imageURL = https://www.dubler.com/abus/aktuelles-bild.jpg ) and it works
But, as Dehatter said in previous post, don't understand why this fix works.
- Attachments
-
- updateWebcam3.0a.zip
- (2.62 KiB) Downloaded 83 times
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
many thanks, davidefa,
thanks
unfortunately the updated script did not fix the problem, I still get 0 bit files....
could it be a permission problem on my server's side (although I checked, 644 for files and 755 for directories)?I tested with your settings ( imageURL = https://www.dubler.com/abus/aktuelles-bild.jpg ) and it works
thanks
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Webcam
I don't think is a permission problem ( as the files are generated )
You may try the attached script, it has only a few debug info added ( and password checking disabled, so it is intended only for testing ).
You should call it directly ( https://meteo.dubler.com/load/crons/updateWebcam.php ) and check/attach the output here
It should return something like this ( from my local meteotemplate )
You may try the attached script, it has only a few debug info added ( and password checking disabled, so it is intended only for testing ).
You should call it directly ( https://meteo.dubler.com/load/crons/updateWebcam.php ) and check/attach the output here
It should return something like this ( from my local meteotemplate )
Code: Select all
debug=1
baseURL=C:\xampp\htdocs\template/
intervalFromLastSave=41 sec
webcamSaveInterval=15 min
Webcam image being saved.
imageURL=##http://realrunning.netsons.org/cron/webcam.jpg##
Read 153686 bytes
nwritten=153686
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2021-03-08 16:29:05',2.1, 82.8, 1011.20, 0.00, 0.00, 0.0, 0.7, 3.6, '202103081629')
No images older than 2021-02-27 00:00:00
- Attachments
-
- updateWebcam3.0b.zip
- (2.82 KiB) Downloaded 72 times
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
Grazie mille!
This ist the output:
debug=1
baseURL=/home/dubler/public_html/meteo/
intervalFromLastSave=444 sec
webcamSaveInterval=9 min
Webcam image being saved.
imageURL=##https://www.dubler.com/abus/aktuelles-bild##
Reading failed!
nwritten=0
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2021-03-08 17:07:26',5.2, 67.9, 1015.700, 0.000, 0.000, 140.3, 7.0, 10.1, '202103081707')
No images older than 2021-02-27 00:00:00
This ist the output:
debug=1
baseURL=/home/dubler/public_html/meteo/
intervalFromLastSave=444 sec
webcamSaveInterval=9 min
Webcam image being saved.
imageURL=##https://www.dubler.com/abus/aktuelles-bild##
Reading failed!
nwritten=0
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2021-03-08 17:07:26',5.2, 67.9, 1015.700, 0.000, 0.000, 140.3, 7.0, 10.1, '202103081707')
No images older than 2021-02-27 00:00:00
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Webcam
Ok, you have to correct the image URL in the webcam plugin setup ( in the webcam block setup is correct ):
https://www.dubler.com/abus/aktuelles-bild.jpg
( only .jpg is lacking )
https://www.dubler.com/abus/aktuelles-bild.jpg
( only .jpg is lacking )
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
That's correct, you are right.
It was there before, It did not work. I've added the extension again, it still does not work:
debug=1
baseURL=/home/dubler/public_html/meteo/
intervalFromLastSave=321 sec
webcamSaveInterval=9 min
Webcam image being saved.
imageURL=##https://www.dubler.com/abus/aktuelles-bild.jpg##
Reading failed!
nwritten=0
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2021-03-08 18:52:44',2.3, 75.0, 1016.400, 0.000, 0.000, 0.0, 4.3, 8.6, '202103081852')
No images older than 2021-02-27 00:00:00
Sorry....
It was there before, It did not work. I've added the extension again, it still does not work:
debug=1
baseURL=/home/dubler/public_html/meteo/
intervalFromLastSave=321 sec
webcamSaveInterval=9 min
Webcam image being saved.
imageURL=##https://www.dubler.com/abus/aktuelles-bild.jpg##
Reading failed!
nwritten=0
INSERT INTO webcam (DateTime, T, H, P, R, RR, S, W, G, img) VALUES ('2021-03-08 18:52:44',2.3, 75.0, 1016.400, 0.000, 0.000, 0.0, 4.3, 8.6, '202103081852')
No images older than 2021-02-27 00:00:00
Sorry....
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Webcam
As the webcam image is hosted on your server you may try to access it via a local path.
Try setting image URL in the webcam plugin setup to: /home/dubler/public_html/abus/aktuelles-bild.jpg
( verify is the correct path to your webcam image )
Try setting image URL in the webcam plugin setup to: /home/dubler/public_html/abus/aktuelles-bild.jpg
( verify is the correct path to your webcam image )
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Webcam
Another thing you could do is trying the 'Check for problems' option in the control panel.
Maybe you have the option 'allow_url_fopen' not enabled in your server.
This could be the cause for the failure of the file_get_contents ( used to retrieve the image )
Maybe you have the option 'allow_url_fopen' not enabled in your server.
This could be the cause for the failure of the file_get_contents ( used to retrieve the image )
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Webcam
Are you using meteobridge as an upload option? If you are... check to see if you made changes in MB Station/CAM section. Make sure the upload matches the webcam blocks and plugins. (Example) In MB station/Cam
https://cam.nicomaparkwx.com/webcam/webcamimage.jpg
or
http://cam.nicomaparkwx.com/webcam/webcamimage.jp
in webcam block and webcam plugin...
https://admin.meteobridge.com/cam/e5996 ... amplus.jpg
or
http://admin.meteobridge.com/cam/e5996f ... amplus.jpg
Your directories and subdomains will be different.
Also, make sure your cron jobs are set to run just after you generate a new pic and not before. I.E. 5min or 300 sec
Andy.
https://cam.nicomaparkwx.com/webcam/webcamimage.jpg
or
http://cam.nicomaparkwx.com/webcam/webcamimage.jp
in webcam block and webcam plugin...
https://admin.meteobridge.com/cam/e5996 ... amplus.jpg
or
http://admin.meteobridge.com/cam/e5996f ... amplus.jpg
Your directories and subdomains will be different.
Also, make sure your cron jobs are set to run just after you generate a new pic and not before. I.E. 5min or 300 sec
Andy.
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
This did the trick!
I'll just have to change the path to aktuelles-bild.jpg in the webcam plugin back to the normal URL.
Thanks again for your help!
- iatros
- Language Admin
- Posts: 145
- Joined: Mon Aug 21, 2017 5:56 am
- Location: Flims Waldhaus Switzerland
- Station model: Davis Pro 2 6163
- Software: Meteobridge
- Contact:
Re: Webcam
Thank you, Andy, for your help
Yes, I use MB; I checked and the upload links are the same (except in webcam plugin, for an obscure reason, see the other posts here).
Best, Martin
PS:
If I set the cron job for the new picture let's say every 10 min and the upload cron job every 15, they will be executed both at the same time every 30 minutes, isn't it?Also, make sure your cron jobs are set to run just after you generate a new pic and not before. I.E. 5min or 300 sec
I see no way to have one cron job running ALWAYS before another.....