Forums

Bill
Bill
Offline
Resolved
0 votes
Wondering if anyone's been able to set up a rule based on sunrise/sunset times. Here's my situation:

I've got an IP camera at a remote site that I use as a 'weather cam'. Every so many minutes, the camera uploads a snapshot via FTP to my server at home, where it's resized and uploaded to Weather Underground. The remote site is on a cellular Internet connection, so bandwidth conservation is important. As such, it makes no sense to upload multiple pictures of blackness all through the night. I've set up the following rule in Custom Firewall which takes care of this (crudely) by cutting off access from the camera during the night:
iptables -I FORWARD -m mac --mac-source <<WxCam MAC address>> -m time --timestart 02:30:00 --timestop 10:15:00 -j DROP

Times are in GMT, as that's what ClearOS seems to want to run in. This works well, but the times I have set up reflect twilight for roughly June 21st. There's as much as 8 more hours of darkness on December 21st, and times can shift by an hour a month or more.

Rather than trying to remember every month to log in and update the times, it would me much easier if the system would simply adjust the time-based rule a little each day.

Has anyone ever tried something like this, or have any pointers?

Thanks,

Bill
Sunday, April 30 2017, 01:13 AM
Share this post:
Responses (1)
  • Accepted Answer

    Sunday, April 30 2017, 01:57 AM - #Permalink
    Resolved
    0 votes
    Not sure this will help uou.
    I'm using this feature in Domoticz on my COS server to controle my garding lightning. In Domotics you can use IPcams, so maybe you can control themnwith Domoticz
    The reply is currently minimized Show
Your Reply