Closed tamas2001 closed 2 years ago
Hi, I have not encountered anything like this on this sensor. In the user part, there is a delay between the temperature request and the readings. https://github.com/smartboxchannel/SONOFF-SNZB-02-Temperature-and-humidity-sensor/blob/f7364cea28ee7245c4ccc99cfbb88bbd20c00d80/PROJECT%20SOURCE/TH_SONOFF/Source/zcl_app.c#L295
And in the driver, I left a comment in the reading function about the need for a delay, this is for those who will use the driver in their applications. https://github.com/smartboxchannel/SONOFF-SNZB-02-Temperature-and-humidity-sensor/blob/f7364cea28ee7245c4ccc99cfbb88bbd20c00d80/PROJECT%20SOURCE/TH_SONOFF/Source/hdc1080.c#L43
Post a debug here with data and battery voltage level.
By the way, today I posted a new firmware, a lot has been changed there, try it, although nothing has changed there in part hdc1080. (For this firmware, you need to use the new z2m converter)
Thanks very much for the details. Good to know that it should not caused by any timing issue, but probably any poor quality battery. So the battery is on 100%/3000v. Now I have replaced with a brand new energizer battery. Let's see if it could fix it. It is very interesting as I have few other devices with lower battery (even 24%) reported and no issue is observed there. It could happen that there is only problem with that particular device hardware. I will let you know tomorrow. What are the differences/new features in your new firmware compared to the old one?
I can confirm the issue is fixed with brand new quality battery!
I have checked certain similar issues reported:
https://github.com/closedcube/ClosedCube_HDC1080_Arduino/issues/11 https://github.com/closedcube/ClosedCube_HDC1080_Arduino/issues/13
Tried to add user_delay_ms(20) at two place in the code, but no success so far.