Hey guys!
I’m using the mirror behavior function is the smartlights app, but it s not working properly.
I tried with two brand switches, but doing the same.
So i want to mirror 2 switch to do the exact same function (turn on/off)
When i set up the mirror behavior, it is working, they are working fast and good.
BUT, when you press it a little faster, for example accidentally. The switches going crazy, and they going into an infinity loop turning on/off themselves.
Please check this video, so you guys can see it:
I tried with z-wave switches
And tried with zigbee switches as well
Is there a solution for this problem?
Thanks
Andrew
Hello!
The one what i tried is the neo coolcam z-wave switches.
The other is the zemismart push switches.
Both using the original handler (zwave switch, zigbee switch) local.
I guess you did use SmartLighting. Where you select copy behavior and the device to mirror.
If you did the set up to A mirror B and after in another rule B mirror A, that can cause the wires to cross.
You would expect that it would just mirror and it does in normal conditions, but with the quick change you are introducing a race condition which triggers and infinite loop with the two mirrors. One solution is to have only one mirror, but you need to make a decision which switch is the master to mirror, but that is not what you really want.
Second solution could be to add some rule through maybe WebCore, if the quick switching happens (Debounce?) to set all switches the same.
Third solution, do some rewrite on the DH, if custom DH, to not allow quick switching. (Debounce?)
Fourth solution, which is a mixture of two and three, add a virtual switch in the setup with a code not allowing debouncing. The limit should be about 3-5 seconds.
But you need to know, it means if you need to change quickly the light, it will not allow you. (There are some Philips non-smart adjustable brightness bulbs, which does change brightness with a quick on/off. You would be unable to use it.)
My problem is that i am not a pro programmer to write in Webcore or Custom DH.
Smartlighting included in smartthings so i thought it will work without problem.
So i cannot set this within smarttlighting?
Or this isn’t a known problem?
@BrianRain, please provide the product number for @JDRoberts and he might be able to help with some device specific settings. It is a quiet specific use what causes this issue. Denouncing might be a known issue, even if it is coming from a race condition.
Try to turn off the mirror just to confirm that it is done by ST. Beacuse what @JDRoberts comment suggests that is might be a know issue with these switches.
Try without the mirror do the quick tapping and see if it works normally.
They are works perfectly with smartthings if i choose “zigbee switch” in my devices. So they are local.
Also, when they are mirrored, and i tap on the app quickly… they do the same.
So its smartthings problem.
Can you help me guys somehow?
Thanks
Andrew
I guess the previous switch was a similar with local execution. Was it?
I understand. You are trying to mimic a two way switch. But the only difference in that setup, the switches are behaving as toggle switches, none of them has definite on and off state.
I think the local execution is fast enough to be able to cause a race condition in the cloud.
Probably the solution would be and extra virtual switch in mirror, but the DH for that has to have a debounce feature.
It should be like this:
A <—> V <—> B
Where A and B are your two switches and V is a the virtual switch. And <—> is the both way mirroring.
I wouldn’t suggest to modify the DH for the zigbee switch otherwise you would loose the local processing. That comes handy with other features which would might run locally, like motion sensors. And the Automations in the new App. Anyhow the Smart Lighting mirroring is running in the cloud.
The debounce should be something like the virtual switch would not change state if the previous command was less than 2-3 seconds ago.
@JDRoberts, any other idea? Does that switch has programmable debounce feature? Or any better solution in your mind what can kill the race condition?
Anyone can help with this?
I am going crazy… i built a new house, planned everything and this problem so annoying
It is always happening if the hub acts a little bit slower, and not immediately turns the second switch.
So you switch again, and BOOM. they going crazy…
I am ready to make videos or tests, just need to know how to solve this…
I don’t have two switches, but mirroring is really copying between devices. It is not working really well when it is both ways. Maybe try to build some pistons with WebCore with added debounce.
I encountered the same issue. In my case I created a virtual device for every switch in the house and mirror them both ways e.g. Virtual dining light ↔ physical dining light switch. With this setup, I can create a racing condition whenever the switch is press twice quickly. Did you manage to resolve your issue?
If you want 2 way mirroring so you can use the virtual or physical switch you can set up your routines a little differently.
The change will be in the Mirror Off routine. It has to have a delay to avoid looping and you’ll probably need to play with the delay duration to accommodate any lag on your devices.
Mirror On
If (any)
Virtual switch is on
Physical switch is on
Then
Turn on virtual switch
Turn on physical switch
Mirror Off
If (any)
Virtual switch is off for 2 seconds
Physical switch is off for 2 seconds
Then
Turn off virtual switch
Turn off physical switch
Thanks for responding @zincfusion@Terri_Baker! For the “Mirror Off”, do you implement it within a single routine? I tried that and my switch will off awhile after it is turn on.