Closed veeceeoh closed 6 years ago
mi sensors report when there is a change to be reported. humidity changes over 5% or 0.5 degrees on temperature etc.
even mi gateway itself does not have refresh/read sensors.
Besides setting the minimum and maximum time intervals for attribute reporting, the configureReporting()
command also allows the minimum change of value required to generate a report. So for example, it would allow you to required a 2% change in humidity before a attribute report would be sent to the hub.
It's a shame, because although Lumi / Xiaomi claims the Aqara sensors are ZigBee HA 1.2 compliant, the truth is they are not.
I haven't seen any evidence of the configureReporting()
command having any effect at all in the DTHs that are still using it.
I vote to remove the configureReporting()
command from all DTHs.
I also vote to remove the refresh button from all DTHs as well.
The DeviceHealth configuration automatically gets sent any time you open the settings for a device in the SmartThings mobile app and press "Save." So the refresh button isn't needed, and it just confuses users who think that it will refresh the reported values from their sensors. It doesn't do that, so let's remove it.
What does everyone else think?
I think your probably right on the configure reporting, and I also agree that the refresh is worthless.
I agree with @veeceeoh
Let's take out configure reporting and refresh.
I created a pull request for this
Refresh and configure reporting have been removed.
I have been doing a bunch of reading and research on what is the appropriate code to use for configuring attribute reporting time intervals. What I found should be used is:
zigbee.configureReporting(cluster, attribute, dataType, minReportTime, maxReportTime, minReqValueChange)
Most of the "official" supported ZigBee device handlers in the SmartThingsPublic repository use configureReporting to set up battery reporting, but it's been well established that Xiaomi devices use a very non-standard method for reporting battery voltage, so I tried making code to set up configureReporting for each devices
However, based on my own tests and testing of code by joelw135 and GSzabados that I came up with for the Original Xiaomi Temp / Humidity sensor, it appears that configureReporting commands are ignored.
I did some Googling, and found a discussion thread here on GitHub by some users of deCONZ (a graphic user interface-based ZigBee monitoring & control software solution) trying to use Xiaomi devices.
In the thread, one user posted this about reporting of attributes by Xiaomi devices:
So, this appears to confirm what we've been seeing - the Xiaomi devices will ignore configureReporting() commands (and also ignore readAttribute() commands as well), and they will send attribute reports at intervals according to Xiaomi's design.
If that's true, then there's no way we can help reduce the level of reporting for any users that are seeing their battery level drop rapidly.
If everyone agrees that configureReporting commands are ignored, then the code for the refresh() and configure() functions of all devices should be the same as what Brian has recently updated to for many of the DTHs: