So I figured out how to fix this issue in ZHA, though it’s kind of not recommended since it involves sshing into the core and changing a line in the code.
The problem is the following line in the zha component of core:
Here we se that in the config for temperature Measurement a value of 50, or 0.5 degrees, is hardcoded into zha.
I have sshed into the core and changed this line by hand, afterwards you have to reconfigure or reconnect the device in ZHA, then you can enjoy the interval however you like.
I set it to 20 since it seems to give me messages when temp changes 0.1-0.2 degrees.
However this is not recommended since:
don’t ever ssh into the core if you don’t know what you are doing
this will probably break with every update to core.
Now what would be the next steps ?
Well imho, ZHA should do 2 Things:
Add the Option to set those global Variables in configuration.yaml
Add the option to set those values for each device individually inside of the zha GUI.
If someone can explain to me how to access data from configuration.yaml inside of the core code I might be able to build a PR for 1.
Can someone maybe tell me how to contact zha devs most efficently so this can be fixed asap ?
I think I understand how to pull values out of configurtion.yaml and might be able to add a PR.
Thanks @mikihacia! A funny thing I discovered is that my sensors seem to disable reporting for attributes whose reporting configuration is NOT updated during the same pairing cycle.
For example, if I updated the reporting configuration for temperature but not humidity I would gain reporting on temperature but lose reporting on humidity. My current workaround is to update all four attributes during the same cycle by pressing the Apply-button for each attribute in Zigbee2Mqtt and observe the response status in the gui.
“The secret to success is constancy to purpose” (Benjamin Disraeli).
In this case that means learning a minimum about zigbee, zigpy and/or zha-device-handlers quirks, examine existing code, test, retest, … .
Another way to configure the sensor is using zha-toolkit as I described here:
The report configuration of the sensor is only done when the device joins the network or when you ask for it. So when you configure it using the zha-toolkit it will keep the configuration (unless you repair or reinitialise (which fails in general because the device is sleepy)).
I have three sensors configured this way and they have been running for quite a while like that using the Generic thermostat.
I had to increase the minimum change on some sensors to 0.15°C because there was much noise at 0.10°C. The zigbee command had to be sent around 50 times before succeeding because the device is sleepy, but with the method described on the link above that’s not a problem.
I’m not good wth HA, how can i install zha-toolkit and how can i add my sonoff sensors like this? Because my sensor is updating sometimes each 1 hours. It’s really not good. ı want to change this.
@GroupPolicy You best install HACS first which gives you access to other components. Once that is installed, zha-toolkit is amongst the default components.
Does someone know how to adjust the sensitivity / reporting when using deconz (hardware + software)? This is what the sensor looks like via REST request:
I’m getting extreme temperatur reports of ±200° occasionally since I’ve been using a reporting interval of 1m. Does anyone else get this problem too?
And do you know a possible fix? It’s messing up my homeassistant graphs
I have three of these connected via ZHA. I’ve not seen the spikes with them.
I have had occasional error spikes with other unrelated integrations. In the Developer section the Statistics tab allows you to clean up erroneous values which works ok if the errors are rare. Find the sensor name and click on the chart icon on the right of the sensor row. You need to note the approximate date and time of the figure you want to correct in order to locate it.
If the errors are only occasional this may be good enough to make your charts readable.
Dear,
I have SNZB-02 and SNZB-02D
The problem is that the battery capacity decreases very quick and I want to increase the reporting to 10 minutes.
SNZB-02 :
I have configured the SNZB-02 device as follow : 10 minutes reporting
I found a faster method. Just wake up the sensor, for example by blowing into it, and then accept the changes in the Reporting tab. No need to re-pair, it works for me every time.
I is weird, because I canno update reporting parameteres…
When I updae numbers, duplicate is created… when I want delete original … if dupliacte exist, duplicate is deleted…
if is there only original … nothing deleted…