[RELEASE] Virtual Device Sync


#1

This is an adaptation of my app from SmartThings. It allows you to easily create virtual switches for multi-channel devices that can be used in Apps and automations:

It creates virtual devices for each endpoint, and keeps them in sync with what the real device is doing.

  • It creates the virtual devices for you.
  • 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). These probably need to be ported over to Hubitat still.

when the App 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 (Many of these still need to be ported):

  • Inovelli 2-Channel NZW37 & NZW97
  • Monoprice Dual Relay
  • Enerwave Dual Relay
  • Aeon SmartStrip
  • zOOZ Power Strip
  • Aeon Dual Micro Switch
  • SmartLife RGBW Controller
  • Fibaro RGBW Controller (with this handler43) as well as the handler by @zcapr17 here9
  • Philio PAN04
  • Probably most other Dual Relay Switches

Make sure you also install the Driver for the type of virtual device that will be created.

Virtual Dimmer Driver for H801:


Monoprice Dual Relay 11990
[RELEASE] Fibaro FGS-222 Double Relay Switch - Driver
#2

This will be useful for the digital-loggers web power switch, if I can port it!! Thank you


#3

Thanks for this. I've been using it for a while, on a multi endpoint zigbee switch. However, been getting these errors in logs....

2018-11-28 12:53:47.062 pm [debug](http://192.168.1.217/installedapp/configure/678)physicalHandler called with event: name:switch1 source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: null device: LS - Front Door

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:53:46.981 pm [debug](http://192.168.1.217/installedapp/configure/678)virtualHandler called with event: deviceId 611 name:switch source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: null device: LS - Hall Lights

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:30:31.321 pm [debug](http://192.168.1.217/installedapp/configure/678)physicalHandler called with event: name:switch1 source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: null device: LS - Front Door

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:30:31.265 pm [debug](http://192.168.1.217/installedapp/configure/678)virtualHandler called with event: deviceId 611 name:switch source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: null device: LS - Hall Lights

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:19:06.645 pm [debug](http://192.168.1.217/installedapp/configure/678)physicalHandler called with event: name:switch1 source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: null device: LS - Front Door

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:19:06.590 pm [debug](http://192.168.1.217/installedapp/configure/678)virtualHandler called with event: deviceId 611 name:switch source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: null device: LS - Hall Lights

[app:678](http://192.168.1.217/logs/past#app678)2018-11-28 12:15:39.813 pm [debug](http://192.168.1.217/installedapp/configure/678)physicalHandler called with event: name:switch1 source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: null device: LS - Front Door

#4

That just looks like the debug output that is there for informational purposes. I don't see any errors there.


#6

Where do I find the virtual device drivers to install? I looked on your github but didn't see them in your hubitat branch in the with the other drivers? I am needing virtual dimmers.


#7

@dcoffing Hmmm, they look like they are there. They have "child" in the name. Here is the link to the dimmer:


#8

Thanks!! I just wasn't thinking name level was the dimmer driver :slight_smile:


#9

This is the error that I get when I attempt to use Virtual Device Sync with H801 loaded with SmartLIfe RGBW. It is as if the dimmer driver isn't being found. Is this the correct driver that I loaded? I was trying to see what dev handlers I used in ST to see if it gives me a clue


#10

@ericm, I think the confusion is that you have the app in the Inovelli repo and the drivers in your personal repo.

@dcoffing, I looked at the code in the app and it's pointing to a "simulated dimmer" driver. Try installing this one from @ericm's personal repo


#11

That did it @stephack :clap::clap: Thank you sir!


#12

Oh yeah, I didn't realize I had Device Sync in the Inovelli repository. I'll straighten things out and put a link for the drive in the original post.


#13

I was having "weird" issues and lots of performance issues with the HE hub that it appears to be caused with the way I used the Virtual Device Sync and related simulated dimmer driver. @ericm FYI: The HE system on the surface works perfectly fast when I just use the physical switch and watch the simulated dimmer channels get triggered and the errors are logged. It only shows up as a real weird issue when I use this in my routine mode to shut down a bunch of my lighting at night when things get so slow and bogged down that it appearslike the nothing triggered when it fact it seems hung up in a bunch of all my 5 H801 devices.

I was going to copy the thread over here but here is the link with the log errors.

Basically the device errors are the simulated dimmer switches and the app:353 is the Virtual Device Sync associated with those specific 5 channels of the H801 RGBWW Controller.


#14

@dcoffing I haven't yet tested the Virtual Device Sync app when used with the H801s separate channels in Hubitat so it may need some work. Since Rule Machine can control the channels by itself using custom commands have you thought about using that instead of creating virtual devices for all the channels?

Edit: I think I am going to create child devices for the separate channels. The device sync app was created before child devices were a thing. Now that child devices exist, they are a better way of doing it.


#15

That would be awesome. I look forward to testing it for you :slight_smile:

I setup Rule Machine with custom commands to operate the lights for now and will patiently wait for the child device modification.


#16

FYI:

I need to do some consolidation and clean up on it, but it is working for me.


#17

So you have already made the changes bro?
UPDATE: Its working great for me. No need for Virtual Device Sync now with your updated changes using parent-child technique.


#18

HAppy New Year @ericm

Fancy finding you here. how are things over on the HE side of the Home Automation world.
I have just started on my slow steady migration and done my first 2x motion sensors and a Fibaro Single Switch.

Tomorrow I plan to attack my first Fibaro Dual Switch zwave plus fgs-223.
Shall I use this virtual device sync to get things working on both end points?


#19

I think it might be supported natively now? The post below from Mike was in late Aug. And if it isn't it must be real close.


#20

As @dcoffing says, there might already be support for it. If not, then you actually don't need to use Virtual Device Sync since the driver is created with child devices.


#21

@ericm thanks for that.
I updated my hub firmware to 2.0.4.109 yesterday.

When I look at the list of Device Types available, via Device Information on existing switch, I see Fibaro Switch and Generic Z-Wave switch listed but no Dual switches. Are you saying the hub will identify it as a dual switch and create the child devices for me, as part of the Inclusion process?