ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

Hue Zones to Homekit? #1179

Closed goshawk2929 closed 10 months ago

goshawk2929 commented 11 months ago

Issue

I have zones in my Philips hue app and have configured home bridge to expose those zones (which I believe is actually groups in configuration). They show up in HomeKit just fine. But if I turn on an individual light within that zone, the group flashes on and then returns to off state. SO when I use the Siri command to turn off the zone, it doesn't do it. I have tell Siri to turn entire zone on, then off, and it works. So I am guessing this is a zone state issue? Because when I tell Siri to turn zone off, it says ok and zone is off or already off?

I have 3 counter top led strips in a zone called Philips cabinets. That is what it is named and setup as in Philips and exposed in HomeKit. I want the zone feature because I don't want to group them within HomeKit because want to be able to control them individually at top layer.

Log Messages

Debug Files

12/9/2023, 11:53:52 PMHoobs Hue starting 12/9/2023, 11:53:56 PMHoobs HueERRORThe plugin "homebridge-hue" requires a Homebridge version of ^1.7.0 which does not satisfy the current Homebridge version of 1.6.0. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin. 12/9/2023, 11:53:58 PMHoobs HueLoaded plugin 'homebridge-hue' 12/9/2023, 11:53:58 PMHoobs HueLoading 1 platforms... 12/9/2023, 11:53:58 PMHoobs HueHuehomebridge-hue v0.13.69, node v16.20.2, homebridge v1.6.0 12/9/2023, 11:53:58 PMHoobs HueHueWARNINGwarning: planned changes, see https://github.com/ebaauw/homebridge-hue/issues/1070 12/9/2023, 11:53:58 PMHoobs HueHuesearching bridges and gateways 12/9/2023, 11:54:03 PMHoobs HueHueHue Bridge: Signify Netherlands B.V. BSB002 bridge v1961076030, api v1.61.0 12/9/2023, 11:54:03 PMHoobs HueHueWARNINGHue Bridge: warning: not using recommended Hue bridge api version 1.60.0 12/9/2023, 11:54:04 PMHoobs HueHueHue Bridge: 38 accessories 12/9/2023, 11:54:04 PMHoobs HueHuemasked debug info dumped to /var/lib/hoobs/hoobshue/homebridge-hue.json.gz 12/9/2023, 11:54:04 PMHoobs HueHueHue Bridge: 3 services 12/9/2023, 11:54:04 PMHoobs HueBridge is running on port 51836. 12/9/2023, 11:54:04 PMHoobs HueHueHue Bridge: event stream connected to https://192.168.1.6/eventstream/clip/v2 12/9/2023, 11:56:32 PMHoobs HueHueWARNINGheartbeat 146, drift 256 12/9/2023, 11:56:33 PMHoobs HueHueWARNINGheartbeat 147, drift 654 12/10/2023, 12:02:18 AMHoobs HueHueCabinet Strip 1: homekit on changed from false to true

ebaauw commented 11 months ago

if I turn on an individual light within that zone, the group flashes on and then returns to off state.

That’s weird. I would like to see a debug log of when that happens. Are these Hue light strips?

Homebridge Hue doesn’t know which lights are in a Hue bridge group; it’s up to the Hue bridge to reflect the group state correctly. By default, the On characteristic of the group accessory is mapped to the state/all_on attribute of the Hue bridge group. In this case, the group accessory should show on, only when all of its member lights are on. If you set anyOn in config.json to false, it’s mapped to state/any_on instead, and the group accessory will show as on, when any of its member lights are on. See https://github.com/ebaauw/homebridge-hue/wiki/Configuration. Note that in this case, you won’t be able to get Siri to turn the group on, when one of its member lights is already on.

Alternatively, you could create a HomeKit scene in Eve, or another decent HomeKit app, to set the Any On characteristic to off, and recall that scene from Siri.

CooperCGN commented 11 months ago

@goshawk2929 Are you using iOS 17? Because I think this might have to do something with iOS 17 and how it syncs the states between home hubs and iOS devices. And at least for me it is not hue exclusive as I have that problem with other HK devices too. It usually happens shortly after opening the Apple Home app. If I wait a while it seems to disappear.

It also happens on automations though. For example I have a group of the new Hue GU5.3 spots in my entry hall which are automatically turned off after a while. In the Homebridge log I can see the following entries:

[11/12/2023, 15:04:23] [Hue] LS Flur: set homekit brightness from 100% to 0%
[11/12/2023, 15:04:27] [Hue] LS Flur: set homekit brightness from 0% to 100%

It looks like after being turned off they turn on again after four seconds which definitely isn't happening.

ebaauw commented 10 months ago

Note that Brightness (or rather state/bri) does not necessarily reflect whether the light is on. Typically it goes to 0 while turning the light off, but resets to the previous value when the light has turned off.