3 way switch setup


#1

1) Give a description of the problem
I created a webcore piston that I felt would allow two third reality switches to be used on a 3 way switch. The plan was to setup a virtual switch that I used to keep track of the light being off and on. Anytime I physically pressed either of the third reality switches it would toggle the virtual switch. Webcore has a setting to only respond to a physical interaction. I then setup all my apps to control the virtual switch and when they turned the virtual switch off or on it would then toggle the third reality switch I labeled as the master.

2) What is the expected behaviour?
After initially sync the light with the virtual switch if I press a third reality switch it toggles the virtual switch. If I send a software update to the virtual switch then I want it to toggle one third reality switch, which would change the state of the light

3) What is happening/not happening?
The problem is when I send a software update from webcore to toggle a third reality switch, not a physical interaction, It treats it as a physical interaction and toggles the virtual switch. At this point the switch is no longer in sync with the light.

**4) Post a Green Snapshot of the piston!
Switch 35 and 39 are the third reality switches. 36 is the virtual switch

[image|45x37]


#2

Your problem is having two triggers in the same piston. You probably need to combine all into one if and just look for switching of any manner or split onto two pistons. Then within the if you can check if the changing switch went to on or off and make sure everything else lines up.


#3

Yes, webCoRE has this capability, but 99% of Device Handlers do not report any difference between physical and programmatic interactions… This mean (unless you have tested that device specifically), it is usually best to just trigger on ANY interactions…


The other thing that stands out is the following logic:

IF Switch 36 changes
    Then Change Switch 35
END IF

IF Switch 35 changes
    Then Change Switch 36
END IF

Do you see how this creates an infinite loop?


Seriously, this one piston can cripple your entire SmartHome, to the point where you may have to unplug your hub to regain sanity.


#4

Yes I see that and I am not running the piston, because it did not work. If it worked as I thought it would, then it is not a infinite loop because one changes only on a physical interaction and one on a programmed interaction. As you pointed out, however, this is will only work if the DTH has the capability to report the different interactions which this DTH obviously does not.

So I will probably have to go with a light sensor, to track whether the light is on or not.