[RELEASE] Switch Bindings

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...

jwetzel1492 For now, this is a simple workaround for me that I can use in conjunction with your "switch bindings" app, hopefully the virtual fan controller will be added in the future to select as a master device. Just wanted to share.

Hi @sven, I have an update for you! You should go back to my main code branch for Switch Bindings. The experiment was not the correct route to go. The real solution is that we need a Virtual Fan Controller that implements more capabilities. It should be able to behave as a fan controller, as a dimmer, and as a switch. (Because the real devices behave as all 3 at the same time.) So I made a new driver for a better virtual fan controller, and I've finished testing it with Switch Bindings. You can choose it as just a normal device in Switch Bindings, and you can select it as the primary device. Let me know if this works for you!

This is great! Unfortunately I can't remotely log into the machine at the location where I have all my fans on separate switches.... Windows must have forced an update or something and froze my remote machine. If I can't find someone to go and reboot it for me, I may not be able to test until I go there next weekend. I will keep in touch and let you know! Thanks!

I just installed this, and get this error when I go to add a switch binding:

Error 404

Child app not found for namespace: joelwetzel and name: Switch Binding Instance
The Page requested could not be found
If you are seeing this screen repeatedly, please contact Support. For assistance, email support@hubitat.com or go to community.hubitat.com.

Did you install both of the custom apps?

D'oh. Working great. Thanks.

I have to start out with a big shout out to you guys who pave the way for automation enthusiasts like me. I understand the relationships and the protocols but don't ask me to code....so greatly appreciate the code you guys post.

I bought 6 of the ikea dimmer pucks today as they were basically giving them away ( 1.99) and from posts on the community from you, Royski and Ryan 780 i was able to get the device paired and binded.

It's not working too well at the moment. Paired before i could even press the button, the instructions were easy to follow for the apps code and the binding was simple. I binded the puck to a jasco / GE dimmer. The light is pretty jittery after i binded to the puck. Going to try another dimmer in the house at some point but even if this doesnt work...it was only 12 bucks and a great experiment to learn how to maximize the power of this system.

Will post this again on another thread from Royski to also show my appreciation.

Appreciate all the info you guys post.


Oh, interesting. I don't have any of the ikea pucks, unfortunately, but when you say "jittery", that almost makes me think they are sending multiple level reports back to the hub. Then Switch Bindings would be responding to each of them, and jitter could be introduced by the semi-random timing of it all. (In contract, GE dimmers only send a single level report back, after you stop changing the level.)

Can you describe the "jitter" a little more? Or turn on logging inside Switch Bindings and send me part of your logs?

1 Like

Its certainly the sending out multiple levels. Theyre so sensitive, but the switch driver I use, a quarter turn clockwise/anticlockwise and I like them, Very on/off'able :slight_smile:

Thanks for the follow up.
What I observed was the light would change brightness levels several times after any change on the puck. And there must be some type of lag in the system as the light would continue to change brightness levels even after the level was changed on the dimmer itself.
It’ll be the week end before I get an opportunity to rebind the puck and make some better observations but I will certainly will get more detail
And on another note. If you send me your address I can send a puck.

Hi All, I just published a bunch of changes on Github!

Much thanks to @storageanarchy / Sandood. He sent me a pull request containing most of the changes that are being released today.

  • Ability to toggle between 2-way binding or 1-way binding. (With 1-way binding, changes sync from master to slaves, but not vice-versa.)
  • Better control over polling
  • Much more sophisticated configuration pages. (Thanks Sandood!)
  • When binding dimmer levels, the setLevel to the slave devices now has a duration, so that the level doesn't "jump" so jarringly.



I've just installed your newest version, and I'm getting these errors in my logs:

errorjava.lang.NullPointerException: Cannot invoke method currentValue() on null object on line 197 (reSyncFromMaster)

I'm guessing it's trying to get a dimmer level from a device that doesn't support dimming? In this case, the 'slave' device is a smart outlet.

Other than that, it seems to work well. Thanks for your work on this!

Thanks for the bug report! I will get this fixed up tonight.

The bug is now fixed and new code published up to Github. Thanks!

1 Like

When I try to save switch bindings I get the following error
Metadata Error: Parent App 'joelwetzel:Switch Bindings' not found on line 19

Did you install both of the apps?