huawei_solar: [Bug]: Wrong values from battery sensor

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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

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.

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.

No, you can disregard my post saying that you would need to use 2022.11.0b0. Just upgrade to beta version 1.1.4b2 and report back your findings.