Blocky script triggers itself continuously

Moderator: leecollings

Post Reply
Venzent
Posts: 40
Joined: Sunday 15 April 2018 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Blocky script triggers itself continuously

Post by Venzent »

I have a blocklyscript, type device.
The blockly sets a scene to "on" which will set a light to a color and brightness.
What happens is that the setting of the light will trigger the blockly, so the scene is set again, resulting in a continuously loop.
See the log...
Anyway to prevent this?

19-03-17 22:14:00.979 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:00.979 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:01.597 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:01.716 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:01.728 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:01.729 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:02.335 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:02.440 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:02.467 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:02.468 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:03.074 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:03.154 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:03.165 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:03.166 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:03.772 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:03.852 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:03.863 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:03.864 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:04.223 (Youless Elec usage) P1 Smart Meter (Youless kWh)
2019-03-17 22:14:04.470 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:04.550 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:04.561 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:04.561 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:05.172 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:05.287 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:05.303 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:05.304 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:05.910 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:06.027 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:06.042 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:06.043 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:06.650 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:06.730 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:06.741 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:06.741 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:07.352 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:07.488 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:07.525 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:07.526 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:08.132 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:08.248 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:08.266 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:08.267 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:08.874 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:08.953 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:08.965 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:08.965 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:09.571 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:09.651 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:09.663 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:09.663 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:10.274 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:10.391 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:10.405 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:10.406 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:11.011 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:11.125 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:11.144 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:11.146 Activating Scene/Group Device: Plafondlicht portaal (On)
2019-03-17 22:14:11.317 (thermostaat) Thermostat (Temperatuur set)
2019-03-17 22:14:11.322 (thermostaat) Temp + Humidity (Huiskamer temp / vocht)
2019-03-17 22:14:11.752 (Mi-Light) Color Switch (Plafondlicht portaal)
2019-03-17 22:14:11.836 EventSystem: Event triggered: Portaal verlichting_3
2019-03-17 22:14:11.845 Activating Scene/Group: [Plafondlicht portaal blauw laag]
2019-03-17 22:14:11.845 Activating Scene/Group Device: Plafondlicht portaal (On)
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Blocky script triggers itself continuously

Post by kuifje »

Maybe this will help.
https://www.domoticz.com/forum/viewtopi ... 62&t=20048
Greetings
Kuifje
Venzent
Posts: 40
Joined: Sunday 15 April 2018 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Blocky script triggers itself continuously

Post by Venzent »

kuifje wrote: Monday 18 March 2019 10:52 Maybe this will help.
https://www.domoticz.com/forum/viewtopi ... 62&t=20048
Greetings
Kuifje
Hi Kuifje, that was spot on !!!!
Thanks, had to solve it with variables. Every status gets his own statusnumber and will be set once ran, and will trigger itself if the conditions are met and the statusnumber is not his own number....
At the end a reset to 0 when no conditions are met (which is a default status / situation) and voila, it works ! :D :P

Thank you for pointing to the right direction.
What started as a simple project has become a fancy Blockly, but the bigger the reward....
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Blocky script triggers itself continuously

Post by kuifje »

Your welcome.
I use the variables very often.
Greetings,
Kuifje
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest