[RELEASE] Switch Bindings 2.0

Update: Latest version also allows binding of fans.

2 Likes

Would it be possible an option to name the child instances?

This is done and updated to GitHub now. There is an optional override to name the child instances. You only need to pull the new code of switchBindingInstance.groovy.

1 Like

Thanks for this. I removed a stack of rules with this.

Only using it for switches at present. Thanks!

1 Like

Thank you so much for this app!!! It's exactly what I have been trying to do for ages.

Joel,

Thanks for your app. This is working great for me. One request. If possible could your app work with the virtual fan HE Driver?

It works great as a dimmer but I can't use the physical fan in a dashboard, so I have to use the virtual device. See (Composite Child Devices and Dashboards). So I'm using a virtual dimmer thanks to your solution. But I'd love to be able to use the HE fan template in the dashboard instead. (the template works but won't show states, which was the original problem)

jwetzel1492, I know it was asked above, but adding my request as well to add fan controllers.

You may or may not know that the GE Fan controllers only work well with one Fan Switch per fan. So in my case I have 3 fans above my workbench (with 3 GE fan controllers) and in another instance I have 4 fans (with 4 GE fan controllers) in a gazebo.

I now have to make all my workbench fans operate from one virtual switch and all of my gazebo fans work from another. I was / am struggling with this in RM. I tried the Fan Combo app by Ryan that I believe is partially from your adapted code, but while the rule works the fan status does not update due to the response time of the Zwave plus Fan controls. It seems that when the app fires all fans to a set level at the same millisecond, only one response gets back to the Hubitat and the other collide and are therefore not received. This also seems to be the issue Greg is having with your app controlling his fans using a dimmer. I tested this by creating a simple rule assigned to a standard switch that turns each fan on with a 1 second delay between each and the fan status is updated correctly. I am just having a heck of a time in creating this rule with all of the fan states, and it seems your app has a delay function that might also be applicable. If you get bored on a rainy day please consider it!

Have you tried my app with your 4 fans yet?

I did, and I also played with the timing a little on a 3 fan setup I have. Only one fan switch (besides the one that I pushed) shows the updated status. I also wanted to use a Virtual Fans Switch as the master, but your app does not allow this as an option, only a virtual dimmer.

Ah, I'd really like to get this fixed. Your use case is a very good one. Can you tell me the model # of your fan controllers?

I am using the GE Zwave Plus smart Fan control Model # 14287

Hubitat recognizes it as device type 18756

From a simple turn on rule I created as a tes, it seems a 1 second (maybe less) delay between each switch being activated is all that is required to have the switch status return to the hub

Ok, I'm testing some code to support Hubitat's Virtual Fan Controller. I had to add an extra preference to select fan controllers, because Hubitat's virtual driver only implements the FanControl capability.

Here's a link to the branch with the new code:

Can you try it out and see if it helps? I only have one GE fan controller, so my test was using a dashboard with the one real GE fan control, and one Virtual Fan Controller, and making sure it synced their speeds bi-directionally.

One other note: Ideally it would work for really general cases like "If I bind a light bulb and a Virtual Fan Controller, then when I turn off the bulb, the fan should also turn off." That isn't implemented yet, but will be coming if this first test helps you out with binding just fan controllers to each other.

Also, @bravenel , would it be possible to add Capability.Switch to your Virtual Fan Controller driver? Your GE Smart Fan Control driver implements it, and a fan controller is definitely a superset of a switch.

Hi Joel, I just tried out the new code. I added my fan controllers in the new section (fan controllers) in you app; however, the app still requires a at least one switch (in the switch category) to continue or it will not let me save it. (see screenshot)

Moving forward I just added a light to get by the popup.

The fan controllers do function and sync to the set speeds of the master; however, reporting remains the same issue. Only one of the fans reports its correct physical state.

I also tried to add my "virtual fan controller" switch as a master, but it is not in the selection list..

Also, FYI, all of these fans are located in a workshop away from the Hub so they are all likely going through the same zwave repeater back to the hub, which may be part of the issue.

RE "virtual fan switch as the master": Unfortunately, I can't do this unless Hubitat adds the switch capability to their virtual driver. That picker can only pick from one capability type. A lot of this will get much, much easier if they add the switch capability. (I'm tempted to write my own virtual fan driver, actually.)

RE "requiring at least one switch": Ah, yes. I didn't think to make that field optional.

RE "reporting": I wish I had more than one GE fan controller to test with. My guess is that you're right and that it's a z-wave issue. Followup question: If you make a RM rule that simultaneously sets the speeds of all 4 fans, do they correctly report back their new speeds to the hub?

Ok, I understand on the master, not being available, that is unfortunate and a bit limiting if there should be a single device in the binding that you wish to have set differently on occasion.

RE: the reporting issue... Yes, I just tested the rule I made again with no delay between each fan activation and the reporting does NOT report correctly, if I put a 1 second delay between each action it DOES report correctly. As a test I used your app with a few zwave switches in the same area and they do report back directly so this issue also seems to be isolated to the GE fan controllers and not the necessarily the repeater they are relaying through???. I also understand that reporting works with the Hampton zigbee controllers. grrr...

Is it possible to get a second repeater in the middle?

There are actually a few repeaters within a few feet of one another. I can't control which ones it hops through...

jwetzel1492, As a thought I changed all three of my GE Fan controller drivers to the "generic zwave smart switch" as well as the dashboard tiles to standard on-off switches then used your app to bind them and they all reported back fine. Seems like this may be a driver issue more than anything....

Edit: I switched them back to the fan driver and then used your app to bind them all both as fan a controller and also as a switch and it reported correctly about 80% of the time...