ebaauw / homebridge-hue

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

Exposing "Time-Based Light" or "Natural Light" Scene via Homekit? #1131

Closed ns412 closed 1 year ago

ns412 commented 1 year ago

Issue

Hello! I really love your plugin. It kept my hue setup useful as I migrated to Homekit. The exposing of Scenes is very useful, and I very much appreciate the work you've put into this.

Hue has two versions of time based lights - the "Time-Based Lights" and the Natural Light Scene, added in a recent update.

Is there any way to expose this scene using homebridge-hue? It does show up in "My Scenes" in one of my room in the Philips Hue app, but does not show up in the scenes when exposed to homekit, although my other scenes do. I'm assuming that is because this is a different flavor of scene.

If there's no way to do that, is there a way to expose the time based lights setting?

My goal is to say "turn on downstairs lights" to my homepod, trigger an automation that turns on the "Natural Light" scene on all my rooms, and have hue auto-select a scene based on the time of the day.

Thank you in advance. Again, I appreciate all that you do!

ebaauw commented 1 year ago

I think the Time-Based Lights is a Hue lab formula, not a scene? Typically, these are triggered/enabled through some CLIP sensor, which Homebridge Hue already can expose to HomeKit. You'll need to do some reverse engineering to figure out how the formula works. Typically, each formula has a corresponding resourcelink listing the CLIP sensors, rules, and maybe scenes it's made of. If you cannot find that, do a compare of the full bridge state before and after installing the formula.

The link for Natural Light Scene seems to suggest it's not even available yet? Homebridge Hue has been offering this very function trough HomeKit Adaptive Lighting for two years already.

ns412 commented 1 year ago

The Natural Light Scenes are now available, but relatively recently (I think the last version update.) If you want to check it out - it's under "scenes" in each of the rooms for your hue lights.

Yea, makes sense. The Time-Based Lights will be my backup strategy if I can't get the Natural Light Scene working.

Thanks for your help!

ebaauw commented 1 year ago

it's under "scenes" in each of the rooms for your hue lights.

Do you mean in the Hue app?

ns412 commented 1 year ago

Yea, that's right - it's a scene in the Hue App, but doesn't seem to appear anywhere via homebridge-hue.

ebaauw commented 1 year ago

Probably because it's not a /scenes resource on the Hue bridge. I don't think they expose dynamic scenes through the v1 API, unless they work like other Hue labs formulae. In that case, you need to find an expose the CLIP sensor that enables/starts the scene.

I think Signify increasingly only expose new functionality through the v2 API. Maybe they expose dynamic scenes through that. I haven't yet looked at that in detail. Also, other than the event stream, I won't be using the v2 API in Homebridge Hue; that will be for Homebridge Hue2.