[RELEASE] Homebridge Hubitat v2.0

How are you clearing the cache?

Clearing the accessories cache (checking the dir) and deleting the contents of the persist dir.

The modes are actually virtual devices so the fact that your log files indicate that no devices were added or removed indicates that you have a stuck device. The only way that I know to fix this is to delete your accessories and persist directories. To do this you need to first locate the directories. Typically the default it is .homebridge.

  1. CD into your .homebridge folder
    • cd .homebridge/
  2. Delete Persist and accessories
    • sudo rm -rf Accessories
    • sudo rm -rf persist

Doing this will break all your bridge connections in Homebridge and any HomeKit automations you have setup in your home app. You will need to remove the stale bridges and re-add them to HomeKit and redo any automations you may have that were tied to the removed bridge(s).

Yep, did all that last night rebuilt everything and it still didn't work. Hubitat Away mode (only selected that this time) will not show up and logs say zero devices added. It shows up in the device data from the app within Hubitat:

{"name":"Mode - Away","basename":"Mode - Away","deviceid":"4","status":"Online","manufacturerName":"Hubitat-v2","modelName":"Mode Device","serialNumber":"Mode4","firmwareVersion":"1.0.0","lastTime":1616669621248,"capabilities":{"Mode":1},"commands":{"on":1},"deviceflags":{"virtual_mode":1},"attributes":{"switch":"off"}}

Can you attach a screenshot of your device selection from the Homebridge v2 app?

Screenshot

Guys i don't recommend deleting the cache anymore. The config-ui-x web interface allows you to remove individual devices from the cache.

Click of the 3 vertical dots top right > Homebridge Settings > Manage Cached Accessories > Remove Single Cached Accessories

3 Likes

I don't generally mess with my modes so something might be broken... Let me do some testing

I currently have version 2.3.2 of the Tonesto7 Hubitat ---> Homebridge App and want to upgrade to the latest version (2.5.0). I have already updated the Homebridge plugin to 2.5.2 on my Hoobs. What is the best way to go about upgrading the Hubitat app and preserve my devices and configurations?

Yes the community Hubitat Package Manager

3 Likes

I just installed Hubitat Package Manager.... I wished that I had done this long ago.... great concept and much easier that I had imagined... Thanks for the tip!

2 Likes

So was playing around adding a pico to HB.. would it be possible to use the device name instead of the device#? Ex. "PicoDen_1","PicoDen_2","PicoDen_3"... vs "25_1","25_2","25_3".... etc.

Would make it a bit more manageable I think..

Hi

Is anyone else finding that if you enable adaptive lighting that every time the colour temperature changes (as the day goes on) the setcolourtemperature command turns the light on again (even if it is turned off)

I've tried to show in the below video an example lamp set with adaptive lighting alongside the Hoobs log output, basically it results in the lights being on all of time of the colour is set to adaptive lighting (like below):

(Very short) video clip here to try and explain and visualise what is going on: 5 April 2021 - YouTube

Cheers
Guy

This will happen if you haven’t enabled color prestaging.

Thanks for the info - do you have any information on how to enable this please (my bulbs are Hue's paired to a bridge connected via LAN to HE)?

Your Hue bridge is Homekit compatible. If you add it to Apple Home and enable Adaptive Lighting, this shouldn’t be an issue. This is the only way I know of to accomplish this. Robert will probably give a much more detailed response.

1 Like

Hubitat's built-in Hue Bridge integration, if that's what you are using, does not support prestaging. However, with any device that has a prestaging preference, it's worth noting that turning it on is not without side effects. Hubitat convention is that a "Set Color Temperature" command will turn on a bulb if it is not already on, so enabling this setting may fix this issue on HomeKit but cause other apps to act unexpectedly (basically, you--or the app--has to explicitly issue an "On" command in these cases now, and many don't by default...or can't at all). I wrote a custom Hue Bridge integration that technically supports this, though I've deprecated this feature in the latest version in favor of the below. In any case, it wouldn't be an easy replacement since you'd effectively have to set up all your Hue bulbs and groups like new devices.

In platform 2.2.6, Hubitat introduced a new "level prestaging" capability. I'm hoping that they will extend this to color temperature and color too in the near future. (The former should be pretty easy, almost the same; the latter seems a bit more challenging due to multiple elements contained in a "color" and other factors, but I'm hoping all are do-able.) This is what I plan to use in my integratino going forward. If HomeKit can distinguish on its end between "stage this color temperature" and "turn the device on to this color temperature," then an HomeKit/HomeBridge integration should be able to make use of these standard and possibly-future-standard Hubitat commands. Until then...I think @Ken_Fraleigh's ideas are the only options. :slight_smile: (And the former, again, really isn't if you're using the native Hue Bridge integration on Hubitat.)

3 Likes

Thanks to both bertabcd1234 and Ken_Fraleigh for the info - I'll add the devices in using the Native HomeKit integration for now :+1:

2 Likes

I use the native Homekit with Hue for Apple Home, plus Robert’s CoCoHue app to integrate with Hubitat. I haven’t had any issues with it set up this way. It’s really the best of both.

1 Like

As a beginner here with HB & Apple Homekit, how do you get separate icons to show like accessories. My motion sensors are grouped into one icon above accessories. Thank you.

Are you talking about this grouping?