feat: Poll manuSpecificPhilips2 for Hue lights#32078
Conversation
|
Cool! Can you explain the logic behind polling a little bit, to make sure I understand it? Is it like this? |
|
@andrei-lazarov Correct. Same thing for device-to-device bindings. 😊 |
@Koenkk I was about to do that, but wouldn't it be better to confirm before polling that the |
Updated type assertions for readCluster and readAttrs.
|
I've been thinking: Why not use the state of the Hue Native Control device option to dynamically override the poll target? @Nerivec Would that be doable with existing APIs and also actually be testable? |
|
Not sure how this was implemented. I assume there's a zigbee2mqtt/lib/extension/configure.ts Line 70 in cfc7ab8 |
|
@Nerivec Would you mind sanity checking my test harness? 😊 I think the issue was that |
|
@andrei-lazarov Would you be able to test this PR on your end? |
|
Actually, looking at the philips branch in the context of the whole |
|
@Nerivec Edit: Actually, triggering the Hue branch for every poll is correct. We're simply swapping out the cluster/attribute used during polling to provide more accurate/efficient state updates for supported Hue lights with |
|
I think we're switching to the Hue-specific cluster as soon as possible without having to refactor the entire Also, lots of typos in my commit messages today, huh? 😅 |
|
I thought the intent was to make one request instead of many? This ends up same as before, just a different cluster used, doesn't it? Technically less attributes (bit smaller payload), but same number of requests. @Koenkk isn't there a way to keep this custom stuff in ZHC? Poll logic override like custom time read or something? |
Yes, just a different cluster (for now). See above. 😅
AFAIK no... But would be a much clearer approach tho. |
|
@Nerivec Let's put this PR on hold until we have a more maintainable way of implementing such overrides from ZHC. Cramming manufacturer-specific code into ZH/Z2M isn't the way to go. 😊 |
As mentioned in Koenkk/zigbee-herdsman-converters#12256 and #31960, Z2M automatically reads (i.e. polls) specific attributes (brightness, state, etc.) when a device is being controlled via Zigbee Bindings.
Instead of reading only a limited amount of standard attributes, the Philips Hue-exclusive
manuSpecificPhilips2cluster can be used to reduce airtime and improve responsiveness by fetching the complete device state with a single command.To my knowledge, the only Hue device that doesn't feature this cluster is the Hue Smart Plug, but it is capable of reporting anyways.
cc. @andrei-lazarov