Page 1 of 1
coding question
Posted: Sunday 25 August 2019 10:40
by Dave21w
This is probably a stupid question but here goes, does blockly run in a constant loop so if you set an alert when a certain criteria was met would it continue to resend the alert and if so is there a way to stop it until that criteria was reset.
Thanks
Re: coding question
Posted: Sunday 25 August 2019 23:01
by Bart84
Hello Dave, no it runs 1 time if the action is made. For example door=open then alam. The alert will be set 1 time. If you close and open again the alart will be there again.
Re: coding question
Posted: Monday 26 August 2019 10:25
by leecollings
Just wanted to add my thoughts here as I've often thought this.
I believe the same, in that a blockly script doesn't constant keep polling to run the event, however I had my Pi turned off for a while last night, during which time I had a dusk event due to set on. Of course as the Pi was turned off, it didn't.
When I turned the Pi back on and DM booted up, the scene that was set to run at dusk did start up... which I do find odd because the trigger is for the time to be set to Sunset... which it was definitely past that.
So there must be some kind of looping happening to constantly check switches and devices to see if they match a rule?
Re: coding question
Posted: Monday 26 August 2019 11:38
by emme
the script runs on EVERY device change....
so if door=open then Alarm it will loop until the door is open and it will be triggered even if it was not the door to change its state...