Skip to content

Additional special effects for Hue lights#7922

Merged
manup merged 15 commits intodresden-elektronik:masterfrom
ebaauw:hue-light
Sep 24, 2024
Merged

Additional special effects for Hue lights#7922
manup merged 15 commits intodresden-elektronik:masterfrom
ebaauw:hue-light

Conversation

@ebaauw
Copy link
Collaborator

@ebaauw ebaauw commented Sep 11, 2024

With the 1.116.3 / 67.116.3 firmware upgrade from May 2024, most Hue lights get additional special effects (see https://www.philips-hue.com/en-us/support/release-notes/lamps). There's also a new (undocumented) "sunset" effect, which basically is the reverse of the "sunrise" effect.

Most of these changes should be reflected by the API automatically when, the attributes from the Hue Effects cluster are re-read after the firmware update.

This PR adds support for the new "sunset" effect. It also brings the GUI up to date with the API ("opal" and "glisten" were missing and "prism" was still called "loop"). It enables the Hue-specific Startup Current X and Startup Current Y attributes, now that the GUI bug handling attributes with the same ID but different manufacturer codes has been fixed.
Finally, it removes the values for state/effect from the DDFs for the Hue lights, as these are exposed through capabilities/color/effects, and as they depend on the firmware revision.

While changing the C++ code, I also fixed the handling of special effects for (white and/or white ambiance) lights that don't support colorloop, see #7451.

Add support for "sunset" dynamic effect.
Add support for "sunset" dynamic effect.
- Fix/extend support for dynamic effects for Hue lights.
- Add support for "sunset" dynamic effect for Hue lights.
Remove values for `state/effect` since these are exposed through `capabilities/color/effect`.  Also, none of the other Hue lights have defined these values.
@ebaauw ebaauw added Device Improvement Additional tag to attach to a existing issue. Enhancement labels Sep 11, 2024
@ebaauw ebaauw added this to the v2.29.0-beta milestone Sep 11, 2024
@ebaauw ebaauw requested a review from manup September 11, 2024 19:45
@github-actions
Copy link
Contributor

github-actions bot commented Sep 11, 2024

Hey @ebaauw, thanks for your pull request!

Tip

Modified bundles can be downloaded here.
Relative expire date

DDB changes

Modified

  • philips/light_zb3_white.json : Hue white light ✔️

  • philips/light_zll_white_ambiance.json : Hue white ambiance light ✔️

  • philips/light_zb3_white_ambiance.json : Hue white ambiance light ✔️

  • philips/light_zll_A.json : Hue color ambiance light ✔️

  • philips/light_zll_B.json : Hue white and color ambiance light ✔️

  • philips/light_zll_C.json : Hue white and color ambiance light ✔️

  • philips/light_zb3_C.json : Hue white and color ambiance light ✔️

  • philips/light_zb3_C_gradient.json : Hue white and color ambiance gradient light ✔️

  • philips/light_zb3_C_festavia.json : Hue festavia string lights ✔️

Validation

Tip

Everything is fine !

🕡 Updated for commit 07febed

@ebaauw ebaauw marked this pull request as draft September 14, 2024 19:07
@ebaauw ebaauw removed the request for review from manup September 14, 2024 19:07
Better way to turn off special effect.
Improved handling of "effect": "none":
- Don't try to turn off colorloop on lights that don't support it;
- Explicitly urn off Hue special effect.
@ebaauw ebaauw added the Fix label Sep 14, 2024
Uncomment Hue-specific _Startup Current X_ and _Startup Current Y_, now that GUI bug has been fixed.
@ebaauw ebaauw marked this pull request as ready for review September 16, 2024 12:53
@hanskroner
Copy link
Contributor

@ebaauw - Apologies if this is only tangentially related to the PR. Have you come across any indication in the (extensive!) research you've been doing on the 0xFC03 cluster that would hint at effects like "sunrise" and "sunset" having a configurable duration?

@ebaauw
Copy link
Collaborator Author

ebaauw commented Sep 21, 2024

@hanskroner: No, I have not. The only writeable attributes I've discovered in the Hue Effects cluster are related to gradient lights, and I'm not aware of any additional parameters to the Set Effect command.

You can probably simulate sunrise (sunset) by setting bri and ct to minimum (maximum) values followed by setting these to maximum (minimum) with a long transitiontime. I've been using a 10-minute transitiontime (raw value 6000) for my wakeup routine, albeit only for bri.

@hanskroner
Copy link
Contributor

hanskroner commented Sep 22, 2024

@ebaauw - Thanks for the tip. I've started with a similar approach and then complicated it a bit by adding xy/ct transitions along with the bri increases, as stages (individual scenes executed in sequence). This works well until the sequence is interrupted - for example by someone turning off the lights.

The Q&A section in the marketing page for the wake-up feature mentions the sunrise duration (and brightness) being configurable through the Hue app: "Use the Hue app to customize how you want to wake up — how long your sunrise lasts, when it rises, and the intensity of the light. It’s a personal wake-up light designed by our lighting experts, and then customized by you." It might just be a separate feature not related to this sunrise effect. It's made me curious enough to go look for my Hue bridge and see what it's about.

EDIT: After dusting off my Hue bridge and experimenting a little, it seems that 0xfc03 uses command 0x00 to start the sunrise effect with configurable duration and max. brightness. Sample payloads I observed:

B3 00 01 FE 04 00 09 7D Sunrise effect, 10 minute duration, 100% max. brightness
B3 00 01 FE 04 00 09 65 Sunrise effect, 20 minute duration, 100% max. brightness
B3 00 01 82 04 00 09 7D Sunrise effect, 10 minute duration, 51% max. brightness

Is there a better place to discuss this (if there's interest)?

Demystify the code (at least a bit).
@manup
Copy link
Member

manup commented Sep 24, 2024

Perfect thanks 👍

@manup manup merged commit f601a6c into dresden-elektronik:master Sep 24, 2024
@github-actions
Copy link
Contributor

This pull request is now merged. The new DDB files have been uploaded to the store.

DDB Files

Modified

  • philips/light_zb3_white.json : Hue white light : with hash (051889ca92)

  • philips/light_zll_white_ambiance.json : Hue white ambiance light : with hash (dc43720a06)

  • philips/light_zll_A.json : Hue color ambiance light : with hash (87b288d7d2)

  • philips/light_zb3_white_ambiance.json : Hue white ambiance light : with hash (2a551ff24c)

  • philips/light_zll_B.json : Hue white and color ambiance light : with hash (c56c8a3570)

  • philips/light_zll_C.json : Hue white and color ambiance light : with hash (e6797a135f)

  • philips/light_zb3_C.json : Hue white and color ambiance light : with hash (441d90214d)

  • philips/light_zb3_C_gradient.json : Hue white and color ambiance gradient light : with hash (958e6da52d)

  • philips/light_zb3_C_festavia.json : Hue festavia string lights : with hash (b8de883531)

🕜 Updated for commit f601a6c

@ebaauw ebaauw deleted the hue-light branch September 24, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Device Improvement Additional tag to attach to a existing issue. Enhancement Fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants