Webcam

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Webcam

Post by davidefa » Tue Mar 09, 2021 12:42 pm

Ok, do not forget to revert to the original updateWebcam.php script ( the last one does not check the password, so is open to everyone, and always saves the snapshot, without waiting the set delay )

Run the error checker ( via control panel ), you should have a red mark in the allow_url_fopen check
If this is the case you'll have lots of problem with blocks/plugins retrieving data from external URL.

To fix this ( permanently ) you need access to the php.ini file, adding

Code: Select all

allow_url_fopen = on
( never tried this, found searching for 'php file_get_contents not working' )


check.png
check.png (640.91 KiB) Viewed 2263 times
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: Webcam

Post by andyk1 » Wed Mar 10, 2021 5:08 am

I set mine to generate a new pic every 285 seconds and set my cron job to 300 seconds. The reason is to give MB time to FTP to my MT host. Most times 15 seconds is enough but now and then it will skip one.

Update: I forgot to mention... Pictures are generated by the seconds you choose. Cron Jobs by the min in the webcam block and Plugins. You'll be able to figure it out when you look. I don't remember which is which.
Image

User avatar
iatros
Language Admin
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

Post by iatros » Wed Mar 10, 2021 8:00 am

@davidefa
Yes, thank you for reminding me!
allow_url_fopen was on in the php settings on the server, but then set off again by en entry in the .htaccess.
My hoster found it out!

@ andyk1
Thanks both of you for your help

all the best and stay safe

Martin
Image

Language Admin für Deutsch

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: Webcam

Post by dmgould » Thu Apr 01, 2021 12:01 am

davidefa wrote: Mon Mar 08, 2021 11:38 pm 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 )
Thank you for this information! I have been beating my head against the wall for several weeks trying to figure out why my webcam images stopped saving in the database. My host forced me to upgrade my php version which created several issues. This is one of them. Thank you again.
Dave G
Image

Cavaliere
Observer
Observer
Posts: 29
Joined: Wed Jan 24, 2018 10:46 pm
Station model: Peet Bros Ultimeter 2100
Software: Weather Display

Re: Webcam

Post by Cavaliere » Wed Apr 14, 2021 9:11 am

Hello everybody,
can someone help me to configure the webcam plugin that I have installed, it does not generate any timelap for me, I have already created the menu that leads to the webcam. https://www.ombarcellonapg.com/wdisplay ... /index.php

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Webcam

Post by davidefa » Wed Apr 14, 2021 11:42 am

I see that you inserted the url of the webcam as 192.168.0.... but this address won't work ( it is a local address, it can't be accessed by your server, which is not on your local net )
Another thing you should consider is that doing this way you expose the credentials of the webcam.

My advice is doing this setup by steps ( as webcam configuration has a few aspects to consider ):
- find a way to access your webcam from your server ( you may do it like you did or 'the other way round', uploading the image from the webcam to the server )
- test that everything is correct installing and configuring the webcam block
- last configure the webcam plugin ( which involves setting up a cron job... )
Image

Cavaliere
Observer
Observer
Posts: 29
Joined: Wed Jan 24, 2018 10:46 pm
Station model: Peet Bros Ultimeter 2100
Software: Weather Display

Re: Webcam

Post by Cavaliere » Wed Apr 14, 2021 9:27 pm

davidefa wrote: Wed Apr 14, 2021 11:42 am I see that you inserted the url of the webcam as 192.168.0.... but this address won't work ( it is a local address, it can't be accessed by your server, which is not on your local net )
Another thing you should consider is that doing this way you expose the credentials of the webcam.

My advice is doing this setup by steps ( as webcam configuration has a few aspects to consider ):
- find a way to access your webcam from your server ( you may do it like you did or 'the other way round', uploading the image from the webcam to the server )
- test that everything is correct installing and configuring the webcam block
- last configure the webcam plugin ( which involves setting up a cron job... )
Grazie Mille per le indicazione ti ho inviato un msg privato.

Post Reply