Page 1 of 1

How to trigger and run just once a day

Posted: Saturday 18 April 2020 23:05
by fargle
Hello people. The attached Blockly runs if it gets dark earlier than Sunset, using a Lux sensor as a trigger. Everything works fine, except the detection mechanism is a little hit-and-miss.
If the light level decays rapidly, it may never detect that window.
But if it decays slowly, the script may run multiple times, as it does if the window is set too wide.
It just needs to run once when the Lux falls below a set level sometime before Sunset.

I thought of setting a User Variable, and triggering off of that, but wondered if there isn't a neater way to do this.
TIA for any suggestions.
Domoticz-c.jpg
Domoticz-c.jpg (101.75 KiB) Viewed 375 times

Re: How to trigger and run just once a day

Posted: Monday 20 April 2020 4:15
by fargle
Answered my own question using a User Variable as a one-shot timer.