You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my tempsensors always show 109% of battery which in my eys can't be correct value here, or? msg : Object object payload: object battery: 109 temperature: 20.9 humidity: 51 address: "a4:c1:xx:xx:xx:xx" _msgid: "ef91c9b2.cf4118"
This is now shown for some month so I even don't see any change in that value.
Can you check if your using the correct hex for the battery value here?
Kind regards
Ocean
The text was updated successfully, but these errors were encountered:
For me, it's also 109% - I'm trying to debug it, but I'm not completely sure about the code. msg.battery = data.toString().charCodeAt(0); Line 24, xiaomi-ble.js
This part gets the battery state - but data.toString() doesn't contain any battery information for me. It contains a domain name.
b8 08 convertes to 2232 (be aware of little endian!) the display states 22.3°C - this fits the 2232
3f convertes to 63, the display shows also 63%
-03 0c_ convertes to 3075 (also little endian!), which means 3075 mV or 3.075 V. This could be plausible because I'm using a fresh coin cell. A CR2032 coin cell has a nominal voltage of 3V.
So the doesn't report a percentage, it reports the voltage. A percentage could be calculated, based on the coin-cell discharge curve. There is already some code at zigbee-herdsman-converters which could be used for the conversion from voltage to percent.
Also it could be possible to return two battery fields, on with the percentage, one with the voltage.
I could prepare a pull request for all of that, I changed the code for me already and tested it.
But I only have LYWSD03MMC, so I can't check if my changes would work with other devices too.
Hi,
my tempsensors always show 109% of battery which in my eys can't be correct value here, or?
msg : Object object payload: object battery: 109 temperature: 20.9 humidity: 51 address: "a4:c1:xx:xx:xx:xx" _msgid: "ef91c9b2.cf4118"
This is now shown for some month so I even don't see any change in that value.
Can you check if your using the correct hex for the battery value here?
Kind regards
Ocean
The text was updated successfully, but these errors were encountered: