coding question

Moderator: leecollings

Post Reply
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

coding question

Post 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
Bart84
Posts: 5
Joined: Thursday 08 August 2019 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11207
Location: NL
Contact:

Re: coding question

Post 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.
User avatar
leecollings
Posts: 167
Joined: Tuesday 30 June 2015 18:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: United Kingdom
Contact:

Re: coding question

Post 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?
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: coding question

Post 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...
The most dangerous phrase in any language is:
"We always done this way"
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests