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.

[Bug]: Wrong values from battery sensor

See original GitHub issue

System Health details

System Information

version core-2022.10.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.5
os_name Linux
os_version 5.15.72
arch x86_64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content failed to load: unreachable
GitHub Web ok
GitHub API Calls Remaining 4888
Installed Version 1.28.3
Stage running
Available Repositories 1198
Downloaded Repositories 25
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 9.2
update_channel stable
supervisor_version supervisor-2022.10.0
agent_version 1.4.1
docker_version 20.10.17
disk_total 30.8 GB
disk_used 17.9 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Network UPS Tools (0.11.0), TasmoAdmin (0.20.0), SSH & Web Terminal (12.0.2), Samba share (10.0.0), Studio Code Server (5.4.0), File editor (5.4.1)
Dashboards
dashboards 2
resources 13
views 15
mode storage
Recorder
oldest_recorder_run 15 ottobre 2022 09:04
current_recorder_run 24 ottobre 2022 20:58
estimated_db_size 2499.09 MiB
database_engine sqlite
database_version 3.38.5
Xiaomi Miot Auto
component_version 0.7.0
can_reach_server ok
can_reach_spec ok
logged_accounts 0
total_devices 0

Huawei Solar Setup

Inverter Type: 10KTL-M1 Inverter Firmware version: SPC146 SDongle present: yes (FW SPC130) Power meter present: three phase DTSU-666H Battery: LUNA2000 2x10kWh

How do you connect to the inverter?

Via the SDongle, wired connection

Describe the issue

Sometimes i have these spikes from sensor.battery_charge_discharge_power that messes my statistics. The last one started from 03:45:30 to 03:45:41

Relevant debug logs

https://gist.github.com/xm4rcell0x/a0d703168001ba1ab65a49205209befe

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
wlcrscommented, Oct 29, 2022

In the core this was caused by the same problem: the integration receives an answer to another query than the one it made, resulting in wrong values being processed. It is not possible for me to detect that his has happened.

Hopefully this is a bug in the modbus-library that I’m using: I will be upgrading to the latest pyModbus version from the moment https://github.com/riptideio/pymodbus/issues/1146 has been resolved. However, I can’t give any guarantees that this will fix the problem.

1reaction
wlcrscommented, Oct 27, 2022

In case I receive wrong values, I now do a retry. This can cause timeouts if you’re trying to read too fast from the inverter, as the update-requests come too fast and the modbus-interface gets clogged up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symptoms of a Bad or Failing Battery Temperature Sensor
Symptoms of a Bad or Failing Battery Temperature Sensor · Surging Engine · Low Battery Voltage · Warning Light.
Read more >
Battery sensor: how it works, problems, checking, battery ...
Many electrical problems, including issues with the battery current sensor can be caused by loose or corroded battery terminals or moisture/ ...
Read more >
Intelligent Battery Sensor Troubleshooting Guide
The Intelligent Battery Sensor is relatively fragile and can be easily damaged if you're not careful. Some of the most common causes of...
Read more >
How to Fix a Windows 10 Laptop With Wrong Battery ...
Windows 10 laptop battery showing the wrong percent? Learn how to fix the problem and show the right battery level!
Read more >
10S battery MAUCH HV 200A 4-14S - ArduPilot Discourse
After 30 seconds of full throttle, i notice a BAD BATTERY error with a shown voltage of 26 Volt, ... What values came...
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