Hue wall switch module; LIDL Livarno Lux lights#4541
Hue wall switch module; LIDL Livarno Lux lights#4541manup merged 7 commits intodresden-elektronik:masterfrom ebaauw:master
Conversation
Don't expose unsupported `state` attributes `hue`, `sat`, and `effect` for LIDL Livarno Lux lights. See #4539 and Discord.
Device Mode for Hue wall switch module, see #4566.
|
I think this is good to go. Tested the Hue motion sensor: it still works as intended: all bindings and attribute reporting configurations are setup correctly, and Observing the event log (18 and 19 are the ZHATemperature and ZHALightLevel resources): And checking the resource afterwards: Interestingly, the motion sensor shows For reference:
|
|
The Hue Wall Switch Module is working for me with this PR, thanks Erik. |
manup
left a comment
There was a problem hiding this comment.
Thanks, looks good as usual, just a few notes for future PRs.
| deCONZ::NumericUnion dummy; | ||
| dummy.u64 = 0; | ||
| // add device mode value if not already present | ||
| if (bt.restNode->getZclValue(BASIC_CLUSTER_ID, 0x0034, bt.binding.srcEndpoint).attributeId != 0x0034) |
There was a problem hiding this comment.
A note for later PRs: it would be good to add some defines for the manufacturer specific Hue Basic Cluster attribute ids 0x0032, 0x0033, etc to get rid of some magic numbers.
There was a problem hiding this comment.
We use attribute IDs throughout the code, also for the standard attributes. Happy to change that, but that would be a biggie.
Of course (?) they are defined in general.xml. Would be nice if we can define/maintain them only once.
| // ResourceItem *item = sensorNode->item(RConfigPending); | ||
| // quint16 mask = item->toNumber(); | ||
| // mask &= ~R_PENDING_LEDINDICATION; | ||
| // item->setValue(mask); | ||
| // sensorNode->clearRead(WRITE_LEDINDICATION); |
There was a problem hiding this comment.
These relate to "Clear pending on receiving the attribute report, instead of on queueing the Write Attributes;"?
I think the commented out lines can be removed in further PRs to nix some dead code.
There was a problem hiding this comment.
Yes, just being over careful. And as I mentioned on Discord, Occupied to Unoccupied Delay isn’t reportable, so I kept the code for that attribute. Would really want to clear the pending on the Write Attributes Response, but I don’t think the API plugin handles these.
|
@manup, did you notice the change to Also these new Hue devices use “Signify Netherlands BV.” as manufacturer name. The Hue bridge API shows this for the Hue old devices as well (even though the Zigbee attribute still read “Philips”). Do we want to change that? |
config.devicemodewith possible values:"singlerocker","singlepushbutton","dualrocker","dualpushbutton"; cf Hue API;config.pendinglogic to handle updates ofdevicemode:RConfigPendingtoDataTypeUInt16;writeAttribute().general.xmlwith manufacturer-specific Device Mode attribute on Basic cluster;stateattributeshue,sat, andeffectfor LIDL Livarno Lux lights. See Issue on LIDL Livarno Lux light strip #4539 and Discord.uniqueid, see Hue Dimmer Switch (2021 model) #4287.TODO:
config.alert? Also missing for Hue dimmer switch family.