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...
Virutal Switch gets in Loop
Moderator: leecollings
- 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
could you please plaste the blocky script?
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
Re: Virutal Switch gets in Loop
emme wrote:could you please plaste the blocky script?
-
- Posts: 115
- Joined: Sunday 11 January 2015 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Virutal Switch gets in Loop
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'.
- 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
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
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"
"We always done this way"
Who is online
Users browsing this forum: No registered users and 1 guest