[OBSOLETE] Virtual Device Sync - Create Virtual Devices and Keep Them In Sync With a Physical Device

Update: Here is a great step by step on how use this SmartApp with multi-relay devices. It was written with the Enerwave RSM2 Dual Relay Switch in mind, but most of it is applicable to other devices as well. Thanks @Mike_Rolle

This is really just an upgraded version of my Virtual / Physical Switch Sync SmartApp. SmartThings currently doesn’t support using anything other than the first switch in a multi-switch (multi-channel) device in automations, routines, etc. This SmartApp solves that problem. It creates virtual devices for each endpoint, and keeps them in sync with what the real device is doing. This app improves on my other app in these ways:

  • It creates the virtual devices for you. This greatly speeds up the process.
  • It allows you to use a few different types of switches. Dimmer, Energy, and Standard.
  • It supports the SmartLife RGBW controller as well as the Fibaro RGBW controller. It creates a dimmer switch for each color channel (R,G,B,W1,W2 for the SmartLife - R,G,B,W for the Fibaro).

Like my other sync app, when the SmartApp updates the virtual device’s state to match that of the real device, it does not leave a bunch of messages in the “Recently” section for the virtual device.

It should work with the following devices. Let me know if it doesn’t:

  • Qubino Flush 2 Relays
  • Fibaro Double Switch 2
  • Monoprice Dual Relay
  • Enerwave Dual Relay
  • Aeon SmartStrip
  • zOOZ Power Strip
  • Aeon Dual Micro Switch
  • SmartLife RGBW Controller
  • Fibaro RGBW Controller (with this handler) as well as the handler by @zcapr17 here
  • Philio PAN04
  • Probably most other Dual Relay Switches

There are multiple things to install, so make sure you don’t miss something. There are

1x SmartApp
3x Device Handlers

Install this SmartApp:

Install these three device handlers. (Technically you only need to install the ones you need, but while you are doing it you might as well):

18 Likes

Eric,

I use this app and have it synced through github. I don’t see an update available in github though? is it just the icon change?

@erocm1231 or anyone else that may know… Can we use this (or natively) with the smartlife controllers to easily change colors with Alexa? Since this and the device handler effectively separate out each color channel as it’s own, it appears to not be as simple as a hue for example. With the virtual switches I can easily do RGB but that’s about it.

@greg This is a totally different app. I could not just release it as an upgrade of the old app as it wouldn’t work properly if you upgraded. I recommend you use this app for any new dual relays you may add, but it isn’t necessary to switch over from the old app with all your old devices.

@michaelahess I’ve never tried changing colors of a device with Alexa, so I will have to look into that. What is the verbiage like? With this app you could name the virtual dimmers that get created for the SmartLife controller to whatever you want and have Alexa adjust them as dimmable lights. For example, if I just named the virtual switches Red, Green, Blue, etc. I could say"

“Alexa set Red to 50%”

That would adjust the red channel to 50%.

Hi Eric, thanks! This is awesome!

It might be worth mentioning in the notes that you need to use this Device Type with the Fibaro RGBW: https://github.com/twack/smartthings-devices/blob/master/Fibaro-RGBW-3-beta.groovy

The Smarththings device type doesn’t have command "blueOn"

Thanks again!

1 Like

PS. I submitted a change to your simulated-dimmer to make it use the multiAttributeTile since it looks a bit nicer. Hope that’s OK.

I’d like to be able to hit a wall button for a garage door, and have my Simulated Switch change states to follow what my door just did. Seems like this app might get me closer…? I installed it but my GD00Z-4 doesn’t show up as a physical device. When I go into Create Virtual Devices I get “You are not authorized to perform the requested operation”

Using Simulated Switch to be able to control from IFTTT.

Hmm, I just figured out that Routines look like they can change a switch based on an event like door opening/closing.

The UI seems very bad for all this. I’ll that that when I get home.

This app is really just meant for what is in the description of the 1st post. Sounds like something CoRE or something else may do the job better.

1 Like

Hi Eric,
Need help.
Tring to use ZWN-RSM2
Installed the app, installed the 3 device handlers
Then I connect the dual switch, says it’s connected but I get nothing. Works as a single when I remove the device handlers.
When I go to the switch it shows switch 1 & 2 and a main on but nothing works. If I try config nothing happens.
Please let me know what I;m doing wrong.
I’m getting ready to but 2 single switches but they will not fit in my fan
Thanks

Never mind got it to work. Needed to take the next step in the app.
Thanks

1 Like

Glad you got it working. :+1:

First off. You creations are helping me a lot. I have the Aeon SmartStrip. I use your custom device type for it. Then I added your SmartApp (Virtual Device Sync) and your Device Handlers (Simulated Dimmer, Simulated Energy Switch and Simulated Switch) All working great.
My question is, when i added the Smart App for the Aeon SmartStrip it did not create a Simulated Energy devices for the non switched plugs. I was wondering if you plan to add it.
You may ask why. I want to trigger actions on other devices based on the power usage on the non switched plugs.
Thanks again for all your work.
Phil

Here is a device handler for the Aeon SmartStrip that will cause the Virtual Device Sync to detect 6 endpoints. Try that out as a quick fix and let me know if it works.

1 Like

Hi Eric,

That worked. Thanks for that. Everything is working well now. thanks,

Just two feedback items that I don’t need changed.

  1. In the smartstrip device the non switched outlets don’t have an icon.
  2. the virtual devices created, the non switched outlets are showing as switched outlets.
    I don’t need either fixed just providing feedback.

Thanks again!!!

1 Like

It doesnt work with Enerwave Dual Relay. It says Detected endpoints 0 … so no virtual devices are created like in manual procedure before … Or I am doing something wrong ??

Which device handler are you using?

I installed the app but haven’t been able to run it. I also don’t see any virtual switches or anything.

I’m using this device handler: [RELEASE] Enerwave ZWN-RSM2 (v1 & v2) & RSM2-Plus —Smart Dual Relay Switch Module

@Maciek @medikit Send a screenshot of what you are seeing. I have no problem with the Enerwave using the device handler mentioned.




As you can see from the pictures, this is the flow of the app. The end result is the two virtual switches that represent each endpoint on the switch (Enerwave RSM2 - 1, Enerwave RSM2 - 2).

Thank you so much for everything you’ve done. I am very new and this was my first app so I didn’t realize I had to publish it to find it. Further instructions here: https://support.smartthings.com/hc/en-us/articles/200881864-How-do-I-find-SmartApps-that-I-ve-published-

Would not have purchased the hub if it wasn’t for people like you.