[RELEASE] Virtual / Physical Switch Sync

No matter which relay I put the fan on, first or second, the Enerwave switch had problems turning it on and relay would chatter. Depending on how I put the relay into the box it would get worse and better - so I assume there is a bad connection inside the device. Returning the relay. Fan is rated at 0.4A, relay at 4.0A. I double checked all connections.

My issue was strictly poor connection. Once I completely removed the pull
chain switch from the equation and rewired, chatter stopped and light works
better. However the app doesn’t update status very quickly. I have the same
issue with a couple rsm1 relays that I installed.

1 Like

If they are rsm1 plus devices, try this handler for instant status updates.

1 Like

Just added that device handler and loaded it up. Thank you. I’ll report back after ive tried it out for a while. I plan on buying a few more of the RSM1 plus relays. They’re way cheaper than buying the 3 way switch kits. Just tough to fit in the boxes

1 Like

I have three Zooz power strips and I used your app to set them up and it works great. However, I have only one instance of this app and discovered I can only see the first power strip’s settings in the Simulator. Just wanted to confirm I need to make copies of this app for my other two power strips… Thanks!

Yep, you will have to install an instance of the app for each Power Strip. It should automatically name the app based on the device name that is selected so you should be able to easily tell them apart. Oh, and make sure you are using the new version of the app that is linked at the very top. This thread is actually the old one.

Thanks! I checked out the new version and it does make setting up the power strip easier. But I found the original version fits my needs better. I ended up creating three copies of the original app in ‘My SmartApps’ and adding my power strip name to the name of the app to differentiate. Then I used the Simulator and assign my physical and virtual switches. With this original version, I can go back to the Simulator anytime to see the virtual switch mappings. I can also use the Simulator to swap the virtual switches (e.g., if I had Switch1 mapped to ‘Floor Lamp’ and Switch 2 mapped to ‘Desk Lamp’, I can use the Simulator to change the mapping so that ‘Desk Lamp’ is now Switch 1, and ‘Floor Lamp’ is Switch 2). It seems with the new version, to do the change the virtual switch mappings, you would have to change the Label of the virtual switch (device) but that won’t work if you have set up rules/automation specifically for that virtual switch.

1 Like

Great, I’m glad it is working for you!

I have a Enerwave Dual Relay. It has been working for 6months + and all of a sudden it stopped this week. I was able to exclude and remove the devices but when I went to add them back in ST doesn’t see the second “switch”. I remember having issues when I set it up to have ST see the second switch but I can’t remember what I did. I have added the new SmartApps and DH but still no luck. I have tried turning off/on the switch 3 times (how I got the main one to add) to no avail. They both run outside lights. Any suggestions on how to readd the second switch/relay?

It might be that it didn’t assign the correct device handler to the device when you included it. You can go into the IDE and manually assign the Enerwave Dual Relay handler to it.


I have Fibaro Dimmer 2. I installed double switch on and I’d like to control other Fibaro RGBW on/off with the second switch (S2). I thought of two possible solutions. Set up group for S2 and RGBW but I don’t know how to do with Snartthings HUB. Second is to install virtual switches, It works with my gate opener, Fibaro Double Relay. I had to change the handler slightly to simulate a push button. It does not works with the Fibaro Dimmer. Can you help what should I change in the handler to make it compatible with your virtual switch app?


Which device handler are you using for the Fibaro Dimmer 2? If the handler supports the ability to enable the “scene” functionality of the Dimmer 2, you can have switch 2 send a button event and use a SmartApp like SmartLighting to turn on the Fibaro RGBW on that button event.


I use this one: https://github.com/codersaur/SmartThings/tree/master/devices/fibaro-dimmer-2
It is cabable to send scene commands. I have tried to configure it this way either but no success.
I could use Fibaro single switch now with two virtual switches with your smart app. It is a different light. Thanks for that. Unfortunatelly I have no success with the dimmer switch. As I don’t know how to configure scenes so far.



With that handler you will probably want to add the fibaro RGBW to Association group 4 to accomplish what you are trying to accomplish. Looks like you can do that in the preferences.

Association Group #4: Sends on/off commands (BASIC_SET) when Switch #2 (S2) is used.

My Dimmer 2 handler interprets scene events as button presses and allows you to use the switch events (double press, triple press, etc) in any SmartApp that can respond to button events. I think the direct association route (with Group #4) would be a better option for you though.

Hello @erocm1231. Thanks for your smartapp and handler.
I use a Zigbee switch named Lumi. It have 3 gangs with their Handler worked OK in a multi-chanel device. When I use your smartapp Virtual Device Sync to separate it to 3 independent switches, I can control physical device from app but the app not update status when I turn on/off from physical switch.
Can you help me?

Looking for a particular solution and wondered if this app would work.

I ran into an issue where a contact sensor had to be replaced. I then had to go into everywhere I used that contact sensor and readd. A real pain.

Would this app allow me to use the simulated switch in all my apps, then if the real switch is replaced I would only have to replace it here?

Where can I find the device handler for the Lumi? I’ll need to look at how it is written.

@Jwwhite This app only works with switches, but that is a good idea for a different app. I unfortunately don’t have time to create it though. If you use Z-Wave devices you can use the “Replace” option to swap out a device. If I can’t do that I usually rename the old device to “Device Name Old”, go into the SmartApps page for the device, and go through each listed SmartApp and change the Old device to the new one. A big pain for sure.

Thanks for your reply @erocm1231
Please see Lumi handler in my below link:


Thank you!

It looks like that device handler shouldn’t cause problems with Virtual device sync. When you switch the physical switch at the wall, does it show the state change in the main device handler?

Also, see if there are any errors in the logs.

When I switched the physical, it change state in the main device handler.
When I use webCore, I can set physical switch and virtual device sync status.