Need serious help synchronizing two light switches


#1

1) Give a description of the problem
I simply want these two light switches to mirror each other. If you turn one on, the other turns on. If you turn one off, the other turns off. If you dim one, the other dims. I have tried a few SmartApps (trendsetter and DimWithMe) and neither have worked for me, so I wanted to create a piston.

2) What is the expected behavior?
I’m looking for the two switches to mirror each other.

3) What is happening/not happening?
It’s all buggy. Sometimes the other switch will turn on 5s after I turn one switch off. Sometimes when a switch turns on it will be set to minimum dim level. Note that I wrote this before I knew there were “Complex Ifs” so sorry about the deep nesting. It seems like I must be missing something straightforward.

In the log below, I simply turned one switch on and then back off, but when I was done the switch that should have been mirroring the “off” position turned back on again (after mirroring the off initially).

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

OK, I turned on LEGO Room Remote (very bottom log entry), then turned it off again. I’m wondering if the dim levels are being read as the switch is dimming towards off?

3/28/2018, 11:15:51 PM +181ms
+1ms	╔Received event [LEGO Room Remote].switch = on with a delay of 367ms
+10119ms	║Piston waited at a semaphore for 10018ms
+10180ms	╚Event processed successfully (10181ms)
3/28/2018, 11:15:51 PM +116ms
+1ms	╔Received event [LEGO Room Remote].level = 99 with a delay of 304ms
+194ms	╚Event processed successfully (194ms)
3/28/2018, 11:15:48 PM +840ms
+1ms	╔Received event [LEGO Room Switch].switch = on with a delay of 294ms
+139ms	╚Event processed successfully (139ms)
3/28/2018, 11:15:36 PM +408ms
+1ms	╔Received event [LEGO Room Remote].level = 93 with a delay of 309ms
+10188ms	║Piston waited at a semaphore for 10099ms
+10343ms	╚Event processed successfully (10343ms)
3/28/2018, 11:15:36 PM +409ms
+1ms	╔Received event [LEGO Room Remote].switch = on with a delay of 309ms
+10262ms	║Piston waited at a semaphore for 10168ms
+10301ms	╚Event processed successfully (10301ms)
3/28/2018, 11:15:40 PM +925ms
+1ms	╔Received event [LEGO Room Remote].switch = off with a delay of 283ms
+154ms	╚Event processed successfully (155ms)
3/28/2018, 11:15:38 PM +648ms
+1ms	╔Received event [LEGO Room Switch].switch = off with a delay of 294ms
+169ms	╚Event processed successfully (169ms)
3/28/2018, 11:15:27 PM +381ms
+2ms	╔Received event [LEGO Room Remote].level = 6 with a delay of 315ms
+10252ms	║Piston waited at a semaphore for 10122ms
+10322ms	╚Event processed successfully (10322ms)
3/28/2018, 11:15:36 PM +370ms
+1ms	╔Received event [LEGO Room Remote].switch = off with a delay of 303ms
+156ms	╚Event processed successfully (156ms)
3/28/2018, 11:15:29 PM +649ms
+1ms	╔Received event [LEGO Room Switch].switch = on with a delay of 297ms
+162ms	╚Event processed successfully (162ms)
3/28/2018, 11:15:27 PM +342ms
+2ms	╔Received event [LEGO Room Remote].switch = on with a delay of 304ms
+175ms	╚Event processed successfully (175ms)

#2

I want to follow this thread.

I did the same thing with 2 lights in my home. I couldn’t get it to work using a single piston. The ping-pong effect was crazy, if it even worked at all. I had to use 2 pistons (attached). I will occasionally get a single ping-pong using 2 pistons but that only seems to happen when you flip the switch on and off very quickly. The ping-pong only seems to last for one cycle though so I could live with it since it rarely shows up.


#3

Just tested this and it seems to work with no “ping pong”


#4

I’ll give it a shot tomorrow and see what it does here. Thanks!


#5

DomSim, I tried yours out and had some troubles initially. I disabled the dimming support and focused on just on/off, and I changed them to require “physical” change to trigger the events, and it seems to be working OK now.

For dimming, my particular switches seem to report in the dimming level changes during their soft-dim-off. So when you turn it off, it shows the dim levels decreasing, which seem to get sent to the other switch after the “off” event, thus turning the back on again.

I’m OK with dimming not syncing at this point since I probably won’t dim much in that room.

Thanks for the help!


#6

I am not sure what is happening behind the scenes, but my guess would be if you are dimming by a dial on the wall, the numbers are changing the whole time the dial is moving. (ie: 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, before stopping on 40) So there may be a hammering of commands being sent to the second bulb. Maybe if the dimming was done all at once (by a command being sent) there would not be that issue you mentioned above.

Just a guess

Alternatively, maybe adding a delay AFTER the dim happens (3 seconds?) and then have it set the final dim number to the 2nd bulb…


#7

Yeah, I was at work so I waa testing by controlling through smartthings. Never tried to adjust from the switch itself, but that makes sense. It is continuously sending out the changes.


#8

Just food for thought, but I do what you ask in your original post using my Alexa device and ZERO code in webCoRE…

I can say, “Alexa, turn off Den” and all lights in my Den will be turned off at once.
I can say, “Alexa, turn on overhead lights to 40%” and only those lights will adjust.

It really quite handy… Especially because each device can be in multiple groups.

If you have an Alexa, just log in, choose Smart Home, then Groups:
http:// alexa.amazon.com/


#9

Just restored and tried it since I’m home. Worked perfectly here. GE dimmers. Only thing that may be different, I am using a different DTH for my dimmers to allow faster ramp up rate when turned on.