I've been working on my own driver for various Hue devices in particular the motion sensors - nothing against the official driver but mine allows setting of sensitivity, led and various reporting intervals.
I've come up against an issue which also seems to be present in the official driver and that is that the devices frequently leave and rejoin the network.
I think that I've tracked this down to some similar behavior that was seen on another platform (deconz) where it was found that the devices were expecting a ZCL default response (0x0b) to be sent in response to the attribute report message (0x0a). If it didn't get this then the device resent the report as a broadcast ... and then eventually the device leaves and rejoins, which may or may not result in a new 16-bit address.
In the HE raw ZigBee logs I see this for all my Hue motions over time:
P62019-02-27 11:27:43.933 profileId:0x104, clusterId:0x406, sourceEndpoint:2, destinationEndpoint:255 , groupId:0, lastHopLqi:255, lastHopRssi:-58
P62019-02-27 11:27:42.425 profileId:0x104, clusterId:0x406, sourceEndpoint:2, destinationEndpoint:1 , groupId:0, lastHopLqi:255, lastHopRssi:-58
P62019-02-27 11:27:33.973 profileId:0x104, clusterId:0x406, sourceEndpoint:2, destinationEndpoint:255 , groupId:0, lastHopLqi:255, lastHopRssi:-58
P62019-02-27 11:27:32.362 profileId:0x104, clusterId:0x406, sourceEndpoint:2, destinationEndpoint:1 , groupId:0, lastHopLqi:255, lastHopRssi:-58
I can see this happening with my ZigBee sniffer i.e. after several iterations of the unicast report / broadcast report the device will leave and rejoin, but I'm still learning ZigBee so I may be way off in my understanding of this being the same issue as was seen on deconz.
Rather than hassle HE staff to diagnose further, my rather simplistic idea is to send a default response success message to these incoming reports and see if the leave / rejoin problem goes away.
So my question is how to do that? Is there a way to send a raw ZCL default response reply to an incoming message?
Maybe @mike.maxwell or @chuck.schwer can point me in the right direction?