Closed tuaminx closed 4 years ago
For me, the same bug appears when I get off the MiScale just after measuring the weight, but before measuring the impedance. The expected behaviour would be in such case to send weight to mqtt without information about impedance, water etc.
I use bt-mqtt-gateway on docker and after the error occurs, whole container restarts - it's really annoying. It would be nice to have a fix for that.
Can you try the quick fix that I put on "Addition context"? Backup the file before modification just in case you need to get it back.
I had the same error message. The suggested modification did resolve the error message. I didn't validate the numbers yet.
Describe the bug Mi body composition scale v2 (universe version). There is an exception:
Exception: Impedance is too high (limit >3000ohm)
When print the value, it's 65533
To Reproduce I just use Mi body composition scale v2 (this version provide Impedance). It happens at the first time.
Expected behavior Impedance is about 635, no exception, the "non-weight" values are correct (protein, body-mass, etc.).
Config N/A
Debug gateway logs N/A
Server (please complete the following information):
Additional context
The reason is https://github.com/zewelor/bt-mqtt-gateway/blob/master/workers/miscale.py#L183 In my case,
data[24:26]
=ff
(1b1802a4e40702090e020ffdff3e35
) This is my dirty fix (not confirm it with any document yet)