I am developing a Zigbee based Temp/Humidity (and pressure) sensor and have gotten to the point of wanting to get it playing nice in environments such as ST. I currently have two versions of a device handler that function to different extents and am needing a little help understanding what I am doing wrong.
How exactly does ST handle humidity values from a Zigbee (or any) sensor? Based on the log, ST seems to only care about the integer part of the value sent to the hub. For instance, the humidity measured value attribute is set to 4258 (42.58 %rh). When ST reads this attribute however all that is logged is 42. It does seem like some rounding is happening but I am unable to manipulate the humidity value as a decimal.
I would like to be able to view the values of temperature and humidity with their decimal portion. The new ST app shows this in the graph that is part of the temperature and humidity tile but I think it would be nice to see this as the value as well. After finding an implementation of this created by another user, I have temperature showing a decimal in the old ST app but it completely breaks the new ST app, showing no tiles. Is it possible for the new ST app to support decimal/float values or am I out of luck?
Is there any reason an attribute would be reported twice on an update in value? I have randomly begun seeing cases where the temperature value, when reported, creates two log entries back to back and I am unsure why. I may have to use a sniffer to check the zigbee traffic but thought it might be a fluke. This double reporting does not always happen but does often enough to be a concern if I am actually reporting multiple times but the same value from the sensor.
The following gist has both versions of my DTH. _V1 is the version that works best but is not trying to show a decimal in the app. A log has also been included to show how humidity values are not coming across the same way as my temperature values.
Thanks for your help,