question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mi Scale V1 outputs old value after HA restart

See original GitHub issue

There is a little problem with the output of the integration which is, i think, related to the restore_state somewhere here https://github.com/custom-components/ble_monitor/issues/292#issuecomment-820149472

When HA is restarted the integration outputs three values when i step on the scale. One as soon as the scale “connects” and then two afterwards after measuring is finished (display stops blinking). The first is the old value which was “saved” for the restore_state. The following two values are the correct ones which are shown on the scale display. From this moment on the integration outputs only two values as soon as the scale display stops blinking after i step on it. This works perfect until HA is rebooted.

As a sidenote: One value is send when the display stops blinking and resend when i step off the scale. Could one of them be omitted on integration level? The “step off” value is useless and i have to drop it manually every time.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:52

github_iconTop GitHub Comments

1reaction
Ernst79commented, May 28, 2021

What I tried to explain is that if a user has a scale that is 3 rooms further, with bad RSSI, it might have missed the message at 22:30:58. In that case, it has a second change of getting the weight from the message at 22:31:01. This isn’t an incorrect weight (it is also 87.8 kg). This message is saying, the last stabilized weight was 87.8 kg and at the moment, there is nobody on the scale.

The scale sends more of them (i guess) but they are ignored as they are identical.

If that is the case, than I agree with your change. But we need to verify.

We can verify by adding another log line in the file at line 180 behind packet_id. At this point there hasn’t been any filtering.

        packet_id = xvalue.hex()
        _LOGGER.error("Data received from scale: %s", data.hex())
1reaction
Ernst79commented, May 27, 2021

Hmm, I have to dive into this, its indeed strange that it only happens after a restart and not after 24 h. I don’t have a quick answer, will look into it later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exploring Custom Firmware On Xiaomi Thermometers
Once the activation process is complete, you select a firmware binary, tap “Start Flashing”, and wait as the progress indicator ticks up towards ......
Read more >
2021.12: New configuration menu, the button entity, and ...
A revamped config menu, Z-Wave SmartStart, lovely Area cards, the button entity, local only users, and blueprint scripts.
Read more >
Commands - Tasmota
Power returns the status of first defined power output (usually Relay1) ... After this amount of time, the power will be turned OFF...
Read more >
Xiaomi Smart Scale with Domoticz, NodeRed, Raspberry and ...
The Raspberry part is now OK, you may reboot it. The above script requires python 3.6, and that should be OK for most...
Read more >
Deploying and Scaling Microservices with Docker and ...
... ask Kubernetes to do -- - Start 5 containers using image `atseashop/api:v1.3` ... scale pod pingpong --replicas=3 ``` ] We get the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found