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

Yep the DH would not work right w/o that parse method. Funnily enough, I now just commented out the parse entirely and everything still works great but maybe it’s cached for a bit or it doesn’t mind /* */ comments around it… we’ll see if it holds up. I still expect to require/use that method as I’m obviously using a sendEvent as well.

FYI, I figured out why subscribeToCommand was NOT working — because none of my tiles were using the OFF() method — even though I had off() in the code for Alexa usage (it only runs on & off methods). If a tile action is NOT linked to the off() method then subscribeToCommand never fires as expected. On my parent/physical device, once I changed my tile to run the OFF method rather than CustomTrigger — all the sudden my log entries started coming in on the SmartApp/subscriber.

I’m going to re-write my SmartApp and parent DH to account for this. This will help me to get away from the crazy 3000 millisecond timeout check with the parent device. It was a workaround at best and at least I learned something.

Thanks again for not letting me give up! :slight_smile:

1 Like

My most sincere appreciation to Eric M.

Thank you so much.

1 Like

hello @erocm1231,
i am new to ST , tried my first fibaro relay switch, installed 3 of your device handlers and the smart app, i can see 1 switch as thing and 2 switches while i press the the thing, but the app is unable to create 3 separate things for this module ( no error while installing). so instead of getting 1 general and 2 virtual switches i get 1 “switch1” which contains 2 switches inside.
any suggestions ?
thank you

The device handler allows you to control both of the outputs by itself. The smart app is used to create the virtual switches so you can control each device from the ‘things’ menu or from within other smart apps like CoRe or smart lighting. For the smart app to create the virtual switches you do need to add the device handlers for the simulated devices as well. for the Fibaro 223 you need the Simulated energy switch and for the 222 the Simulated switch. Both are on the same Github location as the main handler.

@erocm1231 I can’t recall if it’s been asked before, but can you somehow make this work with non switches? For example the two unswitched outlets on the Aeon power strip? I’m using the modified HEM v1 DHT now to see too circuits, one with each lead, and would like to basically create virtual switches that JUST update the power reading of the HEM’s to the VS’s, so I can log them.

I’m guessing I’d have to add the switch attribute to the HEM DHT and assign each power/energy pair to a fake switch somehow. Then I could just use this SA like usual. Does any of that make sense?

I know @Mike_Maxwell kind of started the whole “monitor two things” with one DHT but that was for notifications and not power monitoring.

If anyone knows of any threads I’ve missed that talk about this, please do enlighten me!

I made this alternate power strip handler for someone a few months ago for the same purpose as you. It was a quick solution, but it should work.

3 Likes

I have a Fibaro 222 and wanted to use this App anyway after I installed both app and device handlers, I couldn’t find the Physical Device in the app… any suggestion please?

Which device handler are you using? Needs to have capability switch.

Hi @erocm1231 thanks for your reply, I use your device handler “Philio Pan04 Dual Relay Device Type modified for Relay Switch”

Sorry, so you are using the Philio Pan04 Device handler for the Fibaro 222? On top of that when you go to select a “Physical Switch” it doesn’t show up in the list of switches?

Unfortunately not, it only shows the Fibaro Relay in another app that is useless for me: https://raw.githubusercontent.com/Pukkahq/SmartThings/master/Fibaro%20FGS-222%20APP

I am using an Enerwave RSM2 Dual Relay Switch.
I installed all 3 device types, and everything seems like it is working. However, when I use the physical switch to turn it on or off, it never registers in SmartThings.

I looked at the logging, and nothing shows up when I flip the physical switch. The lights turn on or off, but nothing in SmartThings.

Any ideas?

UPDATE
After further searching, I was able to find a post about updating the configure of the device handler

All is working now.

1 Like

Glad you got it working.

When I turn off one virtual energy switch, all the virtual energy switches are turned off in on the smartthings app, but the actual devices are still on. This just started about a week ago. Everything was working good until then.

I deleted everything and when I try to add everything back. There is no next button to create the virtual switch.

I’m sorry, I can’t replicate this issue. Are you on Android or iOS?

Hi there. This seems to be the smart app that can fix my problem but I am using a multi switch called ZHC5010 (living in Denmark) - Doesn’t looks like it is fully support or can be manipulated to do so.

Any fixes for that?

It doesn’t seem like that device is a good match for this SmartApp. From the manufacturer:

ZHC5010 is a new Z-Wave wall switch module with four buttons, four LEDs and contains one relay output for controlling a local load. The insert is designed to fit in to a standard LK FUGA® wall mount box (size one-module).

If it has a single relay, then this app really isn’t necessary. This app is for devices with multiple relays like those mentioned in the first post.

Hi Eric,

I figured that out. Hmm. OK then. Next question is that if there is another better suited app for turning that single relay off?

It is really strange that the functionality isn’t built into the device handler to turn the relay on & off. I would try posting in the forum thread for the device.

1 Like