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

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.

Hey, I have everything set up and while it does work, it doesn’t work consistently. If say 5 minutes passes and I try to turn on either of the virtual switches it sometimes says null first, then I switch it on again and it says off, then again and it may go to on. I’m not sure what’s causing the inconsistencies.

Any input would help immensely!

Thanks in advance.

Ok, gotcha. Can you post some logs from the app as long as a description of what was done to generate the log?

For example:

Turned the switch on at the wall:

Log output

Turned the switch off from SmartThings

Log output

OK. I’ll grab some logs when I get home.

Thanks!

I have a fan/light combo and a using this device to control both separately. They are controlled by 1 switch which is always on. I programmed a minimote to toggle the fan and light separately. Below is a log which occurred when I pressed the minimote to turn the light on but it did not come on:

c34842d4-d1a6-4456-9a90-9cda1e5ad342 2:28:45 PM: debug parsed 'zw device: 06, command: 600D, payload: 02 00 25 03 01 ’ to [[‘name’:‘switch2’, ‘value’:‘on’, ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘Z-Wave Relay’, ‘descriptionText’:Z-Wave Relay switch2 is on]]

It happened 4 times till it eventually came on:

c34842d4-d1a6-4456-9a90-9cda1e5ad342 2:28:59 PM: debug parsed 'zw device: 06, command: 600D, payload: 02 00 25 03 FF ’ to [[‘name’:‘switch2’, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Z-Wave Relay’, ‘descriptionText’:Z-Wave Relay switch2 is on]]

And turning it off:

c34842d4-d1a6-4456-9a90-9cda1e5ad342 2:49:55 PM: debug parsed 'zw device: 06, command: 600D, payload: 02 00 25 03 00 ’ to [[‘name’:‘switch2’, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Z-Wave Relay’, ‘descriptionText’:Z-Wave Relay switch2 is on]]

Having ran this test a few times I realise that 02 00 25 03 FF corresponds to turning switch 2 on and 02 00 25 03 00 is turning switch 2 off. 01 00 25 03 FF for turning switch 1 on and 01 00 25 03 00 for turning switch one off. 02 00 25 03 01 and 01 00 25 03 01 however seems to be the issue. I’m not sure why that code is being sent sometimes when I try to turn one of the switches on, or what it means…

Hi Eric,

Great stuff. First and foremost - THANK YOU! I’m fairly computer and electronics literate but not a programmer and the entire ST platform is so buggy and non intuitive - If it weren’t for people like you I would have thrown the Hub in the toilet some time ago. :slight_smile:

Went through the above process for loading the SmartApp and Virtual Switches for my Aeon DSC17103 and all works well. My switch numbers 1&2 are backwards, however. Not sure if this is only me but might want to check that out on your side. Not a big deal but still could be confusing when wiring it all up…

Reason for my writing to you is that for one of my case uses, I require my virtual switches to be momentary in nature, not binary. I need them to trigger on the Aeon switches for about 1 sec and then shut off. This momentary voltage will then trigger a timed relay for switch 1 that will run a 24v DC power supply that will lower my window blinds and a timed relay for switch 2 to reverse the polarity of the 24VDC power supply and raise the blinds.

I am wondering if you could give me your insight into how to make the virtual switches your SmartApp automatically created for me into a momentary switch instead. Maybe just some simple code to switch out? (no pun intended)

Or if I should make anther set of virtual ‘momentary’ switches to run the virtual switches your app made I guess that would work too but would start getting kind of unwieldy. Not that Smartthings is not unwieldly to begin with :slight_smile:

Thanks in advance for your help.

Marc

Looks like that is the logs for the switch. Can you post the logs for the SmartApp?

@Levahj I agree, the community is definitely what makes the platform. As for the switch reversal do you mean that the switches on your wall don’t match up with switch 1 & 2 in the handler?

As for the momentary switch, I’ll have to give it some thought. I put together something I thought might work, but because of a race condition it is giving me issues. I am going to rethink my approach.

Eric,

Yes, the switches on the wall (the Aeon DSC17103 outputs to be specific) dont match up with 1 & 2 in the handler. No big deal because I just renamed the names myself but thought it was interesting no one else had mentioned it to you before.

Much appreciated if you can figure out the coding on making it a momentary switch. I’m getting all the other relays and things required to run the blinds correctly going but without a momentary switch in ST to run this Aeon DSC17103 I am kind of screwed!

Hi again,

Just found this in a separate thread. Dont know if this may help you with the code?


To make it momentary, use code like:

switch.on()
switch.off(delay: 500)
Which would give you a half-second (500ms) momentary pulse.


Thx,

Marc

I am having the same problem with Enerwave Dual Relay. I added the new Smart App and Device Handlers. I changed the device type to Simulated Switch. In the ST app it shows 0 endpoints.
Thanks for your help!

Thanks, I have been able to create the momentary switch, the problem has been keeping the virtual and physical in sync.

@BolognaBiscuit You need to assign the Enerwave handler to the Enerwave switch. You can use the one posted here:

Ok. If there is anything I can do to help you de-bug the sync let me know. I would like to help if I can!

Just reporting back. I decided to install a downrod on the fan as it was too high up, and in doing so rewired the whole thing including the zwn-rsm2. I found a hot wire up in the ceiling, so I have hot, neutral and the wire from the switch. I wired it up the right way and everything works perfectly! I have both aux connecting to the switch wire so turning the switch on and off turn on both loads and your app keeps it all perfectly in sync with smartthings. It updates status in a second or less of a physical flip of the switch and in realtime when done in app.

Thanks again for all your work!