webcam plugin again

Post Reply
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:

webcam plugin again

Post by iatros » Tue Apr 26, 2022 7:56 am

Hi all
I'd like this setting:
Only record during the day (do not save image between one hour after sunset and one hour before sunrise) to be TWO hours before and after subset.
So I looked at the update Webcam.php and found this:

Line 48:
$sunRiseTimestamp = strtotime(date("Y")."-".date('m')."-".date('d')." ".$sunRiseTodayHours) - (60*60); // subtract one hour to start recording before sunrise
$sunSetTimestamp = strtotime(date("Y")."-".date('m')."-".date('d')." ".$sunSetTodayHours) + (60*60); // add one hour to stop recording after sun set

changing these to 120*120 did not work.
What did I miss?
thx for any help, Martin
Image

Language Admin für Deutsch

User avatar
Asobig
Advisor
Advisor
Posts: 72
Joined: Mon Aug 21, 2017 7:05 am
Location: Almere
Station model: Davis Vantage VP2+
Software: Meteobridge (Red)
Contact:

Re: webcam plugin again

Post by Asobig » Tue Apr 26, 2022 7:52 pm

If you want two hours i think the setting is 120*60 and not 120*120.

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 plugin again

Post by iatros » Sat Apr 30, 2022 8:12 am

Thanks to Asobig -

I tried; it did not work :(
I tried also 2*60*60 without success

Isn't there a php magician around who could help.....?
Image

Language Admin für Deutsch

User avatar
Oli
Observer
Observer
Posts: 23
Joined: Sat May 28, 2022 4:17 pm
Location: Hamelin / Germany
Station model: HP1000SE PRO
Software: weeWX
Contact:

Re: webcam plugin again

Post by Oli » Sat Jun 25, 2022 4:06 pm

I also think that 120*60 should be correct for two hours, but it actually does not work for me either.

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 plugin again

Post by davidefa » Sat Jun 25, 2022 5:26 pm

It should work... but remember to modify the updateWebcam.php script that is the directory load/crons ( I mean the script that is executed by the cron job )
Image

User avatar
Oli
Observer
Observer
Posts: 23
Joined: Sat May 28, 2022 4:17 pm
Location: Hamelin / Germany
Station model: HP1000SE PRO
Software: weeWX
Contact:

Re: webcam plugin again

Post by Oli » Sun Jun 26, 2022 5:55 am

Oli wrote: Sat Jun 25, 2022 4:06 pm I also think that 120*60 should be correct for two hours, but it actually does not work for me either.
This should solve the problem. I've just edited the file in the plugin/webcam directory. Thanks.

Post Reply