[REQUEST] Add full hue_native_control option for native control of Philips Hue lights
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
調査の方向性
Start by reading the linked Bifrost format specification and the referenced ZHA Device Handlers issue; the requested work spans ZHA, zigpy, device handlers, and the ZHA UI. Identify where manufacturer specific cluster commands are handled in each project, then assess how to encode and decode cluster 0xFC03 and expose the effects. Done means Philips Hue native effects and related controls work across those layers, but the issue does not identify files or tests to guide implementation.
索引モデルが issue の本文から書いたものです。
説明
For reference also see this feature request for ZHA Device Handlers which asking about custom device support for this cluster:
Request add full support Philips Hue native control (a.k.a. "Hue Dynamic Scenes" or "Dynamic Lighting Scenes") with decode/encode of binary format used by Philips Hue Zigbee devices which can be used to command custom "Bifrost effects" (atomic Bifrost frames on cluster 0xFC03 to control different firmware-supported special animated scene effect like example "Candle", "Fireplace", and "Colorloop" animation) supported by a few Philips Hue lighting products and support Zigbee frames in a manufacturer specific cluster implementation format on cluster 0xFC03 to zha, zigpy, zha-quirks/zha-device-handlers, and the ZHA integration UI:
Philips Hue lights supports this via Zigbee frames in a manufacturer specific cluster implementation format, on cluster 0xFC03.
This is already supported by Zigbee2MQTT and is needed if want to achieve feature-parity with Z2M and zigbee-herdsman, and more importantlly really needed if want to encurage users of the official Philips Hue Bridge and app to move/migrate to ZHA:
Zigbee2MQTT supports these Hue Effects / animations (effect names):
candle(Soft, flickering yellow/orange glow)fireplace(Dynamic flickering orange/red colors)colorloop(Cycles endlessly through the color spectrum)blinkbreatheokaysunsetsunrisesparkleopalglistenunderwatercosmossunbeamenchantnone,finish_effect,stop_hue_effectorstop_effect(Returns the light to its standard state)
These are supported by most Philips Hue series light products with color temperature, but see example these supported devices:
- https://www.zigbee2mqtt.io/devices/046677592530.html
- https://www.zigbee2mqtt.io/devices/8719514329843.html
- https://www.zigbee2mqtt.io/devices/8719514491229.html
- https://www.zigbee2mqtt.io/devices/046677592622.html
- https://www.zigbee2mqtt.io/devices/046677584658.html
- https://www.zigbee2mqtt.io/devices/046677577957.html
- https://www.zigbee2mqtt.io/devices/915005988101.html
- https://www.zigbee2mqtt.io/devices/929003711201.html
- https://www.zigbee2mqtt.io/devices/929002294102.html
- https://www.zigbee2mqtt.io/devices/9290030211.html
These dynamic scenes animations are also supported by deCONZ (Zigbee gateway from Dresden Elektronik) too:
This type of specialized message is necessary to support many of the advanced features in Hue lights, such as:
- Multiple colors ("gradient") in LED strips.
- Light Effects ("Candle", "Fireplace", "Fireplace", "Colorloop", etc.).
- Combining effects with color settings.
The use case for this is not only to add feature-parity with the support for this manufacturer specific cluster previously only avalable via a proprietary Philips Hue Bridge, but also to allow users to fully replace their Philips Hue Bridge to instead get a better user experience when only using Zigbee2MQTT for their Philips Hue lighting Zigbee devices.
Note! This new feature requested for zha is directly related to fact that a developer named Mihonarium has this week now added hue_native_control option for native control of Philips lights to zigbee-herdsman-converters in an implementation where he has rewritted zigbee-herdsman's existing Philips manufacturer specific cluster encoder/decoder handling and adds full feature-parity support for Philips Hue native control with encode/decode of custom effects, with improved effect UX and configurable color wheel/effect interaction in Zigbee2MQTT UI with now now report state, support color+speed in a single command, and the color wheel/effect interaction is configurable.
Summary
Adds a
hue_native_controloption for native control of Philips lights.Rewrites the Philips
manuSpecificPhilips2encoder/decoder drafted by LaurentvdBos based on the Bifrost spec, fixing several data corruption bugs and adding missing functionality. Also improves effect UX: effects now report state, support color+speed in a single command, and the color wheel/effect interaction is configurable.Opt-in
By default, standard ZCL converters handle on/off, brightness, color, and color temperature. The behavior is unchanged from before this PR. The manuSpecificPhilips2 cluster can send all of these in a single atomic command, which is required for full effect support: changing color while an effect is running, stopping effects by changing color, and setting an effect with a specific color in one command. However, native control also changes some user-facing behavior (e.g., no simulated fade-to-off transition), so it is opt-in.
Users can enable it per-device in Z2M Settings → Settings (Specific), or globally via
device_options: { hue_native_control: true }in configuration.yaml.New features
All Bifrost effects — Added sunset, sparkle, opal, glisten, underwater, cosmos, sunbeam, enchant (13 total including no_effect, candle, fireplace, prism/colorloop, sunrise)
effect+colorin one command —{"effect": "candle", "color": "#FF4400"}activates the effect at that color atomically. Also supportseffect_speedin the same payload.
effect_color(new expose) — Sets the base color of the active effect without stopping it. Accepts hex or XY.
effect_color_mode(new per-device option) — Controls what happens when the regular color wheel is used while an effect is active:
"stop"(default): color change stops the effect (matches Hue app)"update": color change re-sends the effect with the new colorDeferred brightness on effect re-send — When re-sending an effect (via
effect_coloror "update" mode) with an explicit brightness, the brightness is sent as a separate command after the effect, since effects reset brightness on activation.
effectandeffect_speedaccess changed toSTATE_SET— Current values are now visible in the Z2M frontend and HA.
effect_speed— Settable via both the new path (philipsLightTz) and the effect converter.
gradient_scale/gradient_offset— Settable. Fixed-point 5.3 format exposed as float.
gradient_style— Fully settable (linear,scattered,mirrored). Was decoded but not writable.
gradient_xy— Lossless XY coordinates published alongside RGB hexgradient.
philips2_raw— Raw hex blob published for advanced clients (e.g. Bifrost) to decode independently.HSV→XY conversion — HSV colors are now converted correctly instead of being silently dropped.
transition→fadeSpeed— Mapped to the Bifrost spec's per-message fade speed field.Delayed state read after effect activation — Reads device state 1s after activating an effect to sync actual brightness.
(Feel free to remove or ask me to remove the effect_color, effect_color_mode, and related stuff if it goes against the overall philosophy.)
Encoder/decoder rewrite
Replaced the ad-hoc hex string parsing with structured
Encode/DecodeManuSpecificPhilips2functions usingDataViewfor proper binary field handling. The wire order follows the Bifrost spec (gradient colors before effect speed before gradient params — reversed relative to flag bit order). Each field type is defined as aHueTypeDetailsstruct withencode/decode/flag/maxLength, iterated in wire order.Limitations
After activating an effect, we sync the device state via a 1-second setTimeout, as some Hue effects change light color/brightness. If the device goes offline in the window, the error is silently caught. There could be more robust approaches.
Other
I made a very cool hass dashboard card (inspired by the Hue app, but better than it)! See #12008 (comment)
PS: I also think it is relevant to Open Home Foundation's roadmap discussion about shaping ZHA to have feature-parity with Z2M:
As well as being related to this guide for migrating from a Philips Hue Bridge to the ZHA (Zigbee Home Automation) integration in Home Assistant:
PPS: Another device that could also use native control of effect commands via quirks is Lidl Christmas led string HG0646:
Lidl Christmas led string HG0646 uses cluster 0x00FC to invoke invoked native effects commands for their device:
- 主要言語
- Python
- スター
- 96
- フォーク
- 84
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
zigpy/zha のほかの issue
-
Analog output numbers and analog input sensors show eleven BACnet engineering units as a different unit対応中かも @zigpy-review-bot が 2 日前に担当しました。 オープンbot: code audit
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
device specific quirks
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
entities
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
quirks
難易度 3/5 半日 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pydantic/pydantic-ai#14472 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
patrickballard/wheelgap#728 ·
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
choras-org/simulation-backend#58 ·
メンテナーはふだん 1 日以内に返信
-
backend part-1-modeling testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100