Blockly starts looping

Moderator: leecollings

Post Reply
opale
Posts: 1
Joined: Monday 20 April 2020 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly starts looping

Post by opale »

Hello
I have to create a script to manage garage door.
Unfortunately garage door have only a on switch that activate the engine. Does not control open/close.
I had the script to manage it via domoticz switch and variables... but I have also to manage the manual switch on "real" swich.
So I have put in place two Sonoff DW1 sensors bridged with Sonoff RF hacked with tasmota.
Unfortunately the script in the image goes in loop
-OpeningSensor is a counter sensor
-garagetest is a virtual switch that replace the real one for testing purposes...
-the open url resets the counter (192.168.178.101:8080/json.htm?type=command&param=udevice&idx=115&svalue=0&nvalue=0)

any idea why?
thanks in advance
blockly_loop.jpg
blockly_loop.jpg (87.19 KiB) Viewed 402 times
event_log.jpg
event_log.jpg (204.93 KiB) Viewed 402 times
thomasbaetge
Posts: 153
Joined: Wednesday 02 October 2019 11:47
Target OS: Linux
Domoticz version: 2023.1
Location: DE / BY / LT
Contact:

Re: Blockly starts looping

Post by thomasbaetge »

HI,

not totally sure, if I understand you correctly, but as fas as I can see, the problem is the single 'if' clause.
it woud be a better idea, to combine it with something within the do block, to make sure it gets triggered only once.

if OpeningSensor-> actual > 0 AND IsGarageOpen = "no"
this would run only once, because IsGarageOpen gets set to "Yes" in the do-block
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest