-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive lighting on iOS14 #766
Comments
Also very interested in this. It looks like Apple hasn’t updated their Specification yet though. (At least the non-commercial one.) |
Same here |
Don’t know yet. We’ll have to see how this will work natively with the Hue bridge. I understand Apple defined some new characteristics for that, but they’re TLV8, so we’ll have to reverse engineer the encoding of the schedule. My guess/hope is the schedule will translate to some rules or schedules on the Hue bridge, which Homebridge Hue should be able to do as well. |
I have everything here - anything I can help you with? A Wireshark recording maybe? |
What do you mean by “everything”? Do you actually have a light for which Home exposes the adaptive lighting? Please post some screenshots of what that looks like. The traffic between Home / the HomeKit runtime should be HAP and is encrypted. You would probably need to setup a man-in-the-middle to see anything useful in Wireshark. I’ve seen reports that they managed to do that for the Hue API, but I haven’t for HAP. Typically, you need a HomeKit app to see how the Hue bridge exposes the adaptive lighting characteristics to HomeKit and to reverse engineer how they work. They use a modified version of HMCatalog (distributed as XCode sample app) to reverse engineer the Eve history, see https://github.com/simont77/fakegato-history#how-to-contribute. Not sure if that still compiles with the latest versions of Swift, XCode, and iOS. Next, we need to figure out how the Hue bridge implements the adaptive lighting. I’m guessing/hoping it would be thru regular Hue bridge rules and/or schedules, and not in the light firmware. In that case, a full state dump ( |
Here are some screenshots: https://www.homekitauthority.com/philips-hue-homekit-adaptive-lighting-feature-close-to-launch/?amp=1 However this seems to be associated with the lights firmware. |
Do you actually have this running? Seen this before, not really useful for reverse engineering.
What makes you think that? The linked text and previous information suggests it's linked to the bridge firmware. |
If it’s linked to the firmware I am hopefully that the conbee is getting it - what do you think? |
No, I do not own a hue bridge, just Deconz.
Behause according to a hueblog.de post, only Philips Hue White and Color Ambiance Lights are supported. |
There are indeed some extra characteristic, as is also mentioned in homebridge/homebridge#2687. By the way, @jensflorian, the reason that those are the only lights supported, is probably because those lights are the only ones that support changing the color temperatures (Hue has some light that have a fixed temperature and are only dimmable, and some others that only have RGB support). |
Exactly! According to the latest non-commercial HAP docs, Color temperature characteristic only can be added to non-RGB lights and I think Adaptive Lighting characteristics only can be added to Light service with Color Temperature (and Brightness) characteristic only. RGB lights with both cold and warm white LEDs (so not RGBW lights) are tricky: When CCT LEDs used it disables the RGB ones completely and CCT disabled when RGB used 😁 BTW I’m also curious about the Adaptive Lighting code 🙌🤓 |
Just got a mail from Eve that their lightstrip now supports adaptive lighting with the latest firmware. It does mention, that Adaptive Lighting requires a home hub, suggesting the actual adaptations are triggered from HomeKit automations, rather than by the light itself. See https://www.evehome.com/en/eve-light-strip and https://www.evehome.com/en/blog/adaptive-lighting. |
I hope it will eventually be possible to imitate this feature in the plugin or in deCONZ using any CCT adjustable bulbs. |
My Hue bridge just received a firmware update and now supports Adaptive Lighting. I’ll have a detailed look this weekend. |
It has been implemented in the beta HAP-NodeJS. But it's accidentally called "Ambient Lightning": https://github.com/homebridge/HAP-NodeJS/blob/beta/src/accessories/Light-AmbientLightning_accessory.ts |
I've created a PR for that :) |
Should the early beta implementation be working with 5c006f0 installed? |
That’s still work in progress. I think I have the interaction with HomeKit working (without the need for Homebridge beta or HAP-NodeJS beta), but I am still working on updating the lights. |
Please try beta |
I tried the latest 0.12.1.5 now, and immediately as I clicked the button to active Adaptive Lightning in the Home app on iOS 14, homebridge crashed:
After restarting homebridge, it seemed to work fine for a bit (hard to say since it's just a white color when observed for just a minute), but after changing colors a few times in the Home app to test more it crashed again:
The light in question is a Gledopto RGB+CCT controller with a LED strip attached. |
Can you please provide the full debug logfile? I think HomeKit is sending a slightly different transition control value that Homebridge Hue chokes on. Note to self: need to guard this stuff with |
This is what I got with
|
Thanks. The LED-stripe is actually looking good. I think the type Error comes from the request to set adaptive lighting for the next light. Unfortunately, the log gives no clue which light that is. Can you list all the I'll cook a new beta version logging the raw value and guarding the parsing. |
|
Ah ok. Can this be set in config.json so it sticks? I don’t really need to change it more than once. |
I had it in config.json originally, but then wanted to test a number of values, so made it dynamic. Could do both: set startup value in config.json and still allow dynamic change. I don’t think you appreciate how the correction factor works: it is applied to the light’s brightness, not to the colour temperature. |
Add `birghtnessAdjustment` parameter, see #766.
Add `birghtnessAdjustment` config.json parameter, see #766.
Use `brightnessAdjustment` config.json parameter, insteaf of bridge/gateway characteristic, see #766.
Added Published v0.12.2. |
This test was done at 10:30pm. I think the ranges change throughout the day. With factor 10 the color doesn't change at all dimming from 0-full.
|
Got the following error on install:
|
Do you see the |
What iOS version are you on? What brands and models of lights do you have? Home seems to be sending a slightly different transition control setting here; I wonder what's causing the difference. |
Handle transition control setting without the `2.1.2.3` value, see #766.
Could you try v0.12.3. I hope it fixes the error, but lacking a debug log file, I cannot test it myself. |
I actually wonder if it'd be possible to add an offset to that. I also find the lights a bit too cool throughout the day and night settings on max brightness. (In all fairness, I know this is more on Apple's side since Homebridge-Hue is fairly in line with first-party adaptive lighting colors like eve strip or hue) |
That's what |
Ahhh, I see. This is what I understood in the first place, but then got confused after your comment to @llamafilm . Thanks for clarifying 👍 :) Suppose something a bit more verbose like |
I'm not very creative in making up names, I'm afraid, but there is a description in the Wiki: https://github.com/ebaauw/homebridge-hue/wiki/Configuration. |
@ebaauw so I'm running AdaptiveLighting on a variety of bulbs, Hue color 1st gen, Hue white ambiance 3rd, innr white ambiance, innr color, and they all look a bit bland, and not much change happens over the course of a day. Since I haven't got the official update from Hue yet, I have nothing to compare these bulbs to. I'm wondering if the gradual change is as Apple intended, and is homebridge-hue simply receiving the data from Apple and offering it up to the light, or is the plug-in or individual bulbs interpreting Apple's data in their own way |
Apple hasn’t published any design for this, so the only way is comparing it to lights that natively support adaptive lighting.
RTFM, #766 (comment) |
In my log i can see the following: [11/12/2020, 18:06:50] [Hue] Schreibtisch: set homekit supported transition configuration to {"configuration":[{"iid":11,"characteristic":1},{"iid":13,"characteristic":2}]} Its a Tradfri Bulb E14 WS opal 400lm on Firmware 2.3.50 on deconz 2.7.0 But in HomeApp adaptive Lighting does not show up the function does not show up. All my devices are on IOS 14.2 . Homebridge is on 1.2.4 |
Haven’t seen that before. Did you restart your iOS device? Otherwise, turn on debug mode in Homebridge and capture and attach the log file, from Homebridge startup to running for a couple of minutes. |
I like the 181 mired during noon, but I don't like the minimum 333 mired during night time. With the brightness options <100% it is too yellowish during noon, with brightness >10% it's too white at night. I'd prefer the 500 mired during night and 181 during day, so to have the full spectrum between night and day. |
Hi there,
is there anything to to in homebridge-hue for supporting adaptive lightning in iOS14?
If so, I would love this feature :)
Kind regards,
Tim
The text was updated successfully, but these errors were encountered: