[RELEASE] Homebridge Hubitat v2.0

Anyone been able to get this to work with Sonos? I'd like to have sonos play/pause/volume in homekit, but in the Homebridge App my sonos speakers don't show as Speakers in the 'device selector' - any ideas?

I've made changes to enable support for capability FanControl and to allow Light capability to co-exist with other services. This allows for fan & light drivers to show up in Homebridge. Included in this is a new 5-speed fan category.

Pull request has been sent. Changes are in GitHub - dineshpannu/homebridge-hubitat-tonesto7: Hubitat Homebridge Plugin

Thanks, I will review it and push it up

I will look into merging your changes, the issue is you removed logic that supports other custom fan devices. So I will need to manually merge these changes while preserving original logic

Right, I was afraid I might have been clobbering work that was required for other drivers. Do all Hubitat fan drivers not support FanControl? Do you have examples of ones that don't?

That is a good question.
Now that Iā€™m only worried about supporting Hubitat specifically I need to review the state of current fan drivers and maybe clean up the logic.

Most of your code changes were good except the service type and transforms. The order of detection of capabilities is important which is why lights and switches are are the bottom.

I genuinely appreciate other devs submitting fixes and updates.

3 Likes

Now that I take a closer look at HE_ServiceTest I see some of the issues you are talking about. It looked like the light test was being duplicated so I removed one. Now I see one may be for dimmable lights and the other for a light switch. I'll revert my changes to the bare minimum and ask for another review.

The changes I made to HE_Transform are OK I think. I haven't found any Hubitat fan drivers that operate without FanControl capability and its associated speed attribute. Converting all fan speeds to one of the 5 FanControl speeds is sane. The Hubitat fan driver converts it to it's fans supported speed.

I think my biggest problem is allowing for fan + light while also disallowing dimmable light + light switch, which I think is the purpose of the onlyOnNoGrps parameter in ServiceTest. I've also noticed that Homebridge-Hubitat doesn't work correctly with the Virtual Fan Controller. It forces it into Others category rather than one of the Fans category. I'll take a look at this too.

Really appreciate the feedback.

If you add the fan light component to the lights input it should handle the light without any code modifications

Hi @tonesto7 and group,
Long time user on Smarthings with Homebridge v2, recently migrated over to Hubitat with Homebridge v2.2.2, and still working out kinks on my C7 and version 2.2.2.

I'm finding that with this setup I have frequent occasions where the Apple Home app gets out of sync with the state of a switch or a dimmer. Especially if changes are made directly after each other.

Also, with a Homekit "Scene" activated (say a goodnight scene) where it relays a command to shut off 30-40 lights, close the garage door and lock 2 deadbolts, somewhere in that relay I'm finding that locks can take upwards of a minute before activating and some lights are 30 seconds (some are never on the first try, but work on the second push of the scene button)...

The same sequence on Smartthings with the scene button was almost instantaneous. The lock(s) if triggered manually via Homekit or a dashboard are instantaneous / very responsive...

Just wanted to give that feedback and see if anyone has any troubleshooting tips. The mesh is solid, It's almost like the C7 or the 700 series chip doesn't like a flood of instructions coming at it at once. The Apple Homekit app is my most repeatable instance of this. It's interesting and I'm having a hard time figuring out where the delay or breakdown in the command chain is.

Take care all, thanks @tonesto7 for making this all happen!
Jonathan

I was seeing that even with everything in HE. I have a button that does a similar routine and not all lights go off at the same time (they could be 30 to 45 seconds apart). I moved all the logic to Node-RED and I'm still seeing the same thing. I have a mix of Z-Wave (+ and non-plus) and Zigbee, so I suspect it's something to do with getting responses back to confirm on/off, lock/unlock states (but this is only a guess). Also, I was seeing the same thing when activating it from Apple Home.

I have a group of lights (10 Sengled Color+ bulbs with Zigbee Group enabled) - "Den Lights" that are HubMeshed from a C-5 to a C-4 and then exposed to Homebridge using the App. Turning it on/off in Apple Home is very fast. It's the only shared "device" I've done so far but will report back if I encounter the same issues as y'all.

Note: the reason for the seemingly convoluted setup is I am using the C-4 for Cloud/Networking connectivity,devices&apps. The C-5 is zigbee devices, C-7 is for Z-Wave and a Node-RED server for the rules. Also worth mentioning is the NR server is the only external system that deviates from my design, it's connects to all the hubs - still experimenting with optimal setup tho.

1 Like

Turning on/off individual lights (or even a Zigbee group) is very quick. It's when I have a sequence that turns off all lights and locks the doors (Zigbee bulbs, Z-Wave switches, Z-Wave locks) that I see the delay. I looking at last nights activity, the first button press ("hold") turned off all the Zigbee lights and some of the Z-Wave switches and the rest turned off about 40 seconds later (but required a second "hold" of the button). The doors were already locked so nothing happened there.

1 Like

mmm so if you create a scene in HE and expose that to HomeBridge?

(probably won't work with locks tho).

Or maybe a virtual switch..

I've "disabled" all my rules in HE for now and moved them to Node-RED. This is what the flow looks like

EDIT: I use Homebridge to control individual devices (whether local or remote) and also to activate so some lights based on Ring doorbell motion. I do have HE dashboards set up but prefer the Apple UI.

I'm even sure where to start with this... I have large scenes in Homekit and it takes 1-2 seconds to actuate all devices in the scene.

The latest iOS 14.4 update seems to have improved Homekit experience for me. The device status shows instantly now and commands are instant.

I've even tested turning on/off all my lights 70+ and they all actuate within 2-3 seconds.
This is a tough nut to crack because I know the plugin and habitat are functioning properly...
I've noticed issues with pre-14.4 iOS and also noticed slowness with the new Homebridge 1.3.0-beta.

I run Homebridge 1.2.5 on both of my instances.

2 Likes

If you group the devices in HE and expose that group device to NR?

edit: I see you have some groups already in the sequences. I will add some more devices to HB including lutron switch or two and see what happens.

Using 2.2.2 of your plugin and really amazed by how well it works. Working well on both my C-7 and C-4 HEs. Question - I noticed you are running HB 1.2.5. I'm still running 1.1.7 and all seems to be working well with the exception of a couple frozen devices occasionally in IOS. Did you notice any improvement going to 1.2.5 ? Trying to decide if the HB update is worth doing. Thanks!

I really don't think it's your app or the plug-in as I'm seeing the same (or similar) behavior if I use RM, Nodered or Homebridge. I'm running 1.2.5 for my "live" instance and just installed 1.3 beta on the "test" instance (very few devices on this).

At one point, someone had recommended (in RM) that I check if the device was "on" before sending the "off" command. I did that for all my Z-Wave devices but not for Zigbee. I carried the same logic over to Nodered. For a couple of lights, that are activated by a lux reading, I now keep the status of the device in a global variable and just check that before sending the "off" command. This is primarily to avoid having to get the state from HE every time the lux reading changes within the threshold range. Any thoughts if this approach should be used for other devices as well?

My understanding is the HE Device Node caches state so you can check it with little or no impact.

1 Like

Also be careful about using "Globals" if you want them to persist use a "file storage" based context...

https://nodered.org/docs/user-guide/context

Apologies for deviating off topic!!!