Virutal Switch gets in Loop

Moderator: leecollings

Post Reply
stingone
Posts: 48
Joined: Monday 26 October 2015 16:28
Target OS: -
Domoticz version:
Contact:

Virutal Switch gets in Loop

Post by stingone »

Hi everyone. i use a virtual switch to turn on and off multiple light via blockly. It works, however when i turn off the virtual switch it keep repeating that event as it is triggered by the if switch = off then. is there any way to avoid this?

I always used pimatic and that only triggered the event once...
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: Virutal Switch gets in Loop

Post by emme »

could you please plaste the blocky script?
The most dangerous phrase in any language is:
"We always done this way"
stingone
Posts: 48
Joined: Monday 26 October 2015 16:28
Target OS: -
Domoticz version:
Contact:

Re: Virutal Switch gets in Loop

Post by stingone »

emme wrote:could you please plaste the blocky script?
blocky.PNG
blocky.PNG (41.49 KiB) Viewed 1189 times
RayAmsterdam
Posts: 115
Joined: Sunday 11 January 2015 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Virutal Switch gets in Loop

Post by RayAmsterdam »

Add an extra condition to the 'else if' to prevent it getting triggered all the time it meets the condition 'switch off'. For example 'switch=off' and 'light=on'.
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: Virutal Switch gets in Loop

Post by emme »

that blocky does not make too much sense to me... but maybe I did not well understood....

If it's 23.00 and switch "All Lamps" (is that a physical or a virtual?) is ON then toggle it
..than I think you know it triggers again... and so you check if the switch is off and switch off other lamps...

what does the switch does when it's on? does it has to light the same lamps?

...if this is the way... why don't you create a Group and timer it off at 23? that would much easyer and simple ;)

I see you also set a variable "All-out", you could also set it using the Off-Action of the same group setup:

Off-Action
https://127.0.0.1:8080/json.htm?type=co ... e&idx=<IDX of your variable>&vname=Alle-Uit&vtype=2&vvalue=1
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 1 guest