wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
499 stars 80 forks source link

[Bug]: Battery sensors not reloaded after update to 1.4.1 #740

Open stumpf84 opened 2 weeks ago

stumpf84 commented 2 weeks ago

Describe the issue

After updating to from v1.3.3 to v1.4.1 there is a new entity 'Battery 1' and the values for the old and new battery entity is only loaded on startup of the integration. The polling frequency is set to 10 seconds

alias: Huawei Solar inverter data polling
description: ""
trigger:
  - platform: time_pattern
    seconds: /10
condition: []
action:
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: sensor.inverter_tagesertrag
mode: single

ModbusProxy is used. All values except the battery entities are correctly updated. Found this in the debug logging:

ValueError: invalid literal for int() with base 10: 'discharging' ValueError: could not convert string to float: 'discharging'

Describe your Huawei Solar Setup

Inverter Type: SUN2000-10KTL-M1 Inverter Firmware version: V100R001C00SPC159 sDongle present: Yes sDongle Type: sDongleA-05 (WiFi / Ethernet) sDongle Connectivitiy: Ethernet sDongle Firmware: V200R022C10SPC108 Power meter present: three phase Optimizers Present: No Battery: LUNA2000-SO 10kWh Battery Firmware version: V100R002C00SPC127 Huawei Solar integration version: 1.4.1

How do you connect to the inverter?

Via the SDongle, wired connection

Upload your Diagnostics File

Drag & Drop your Diagnostics File here. config_entry-huawei_solar-188103012c9738d35d122f30b29c5b16.json

Upload your relevant debug logs

2024-06-18 09:31:47.791 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-18 09:31:47.792 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration huawei_solar which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-06-18 09:31:49.973 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-06-18 09:31:50.863 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.vog_l29_akkustatus for domain sensor with platform mobile_app
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 658, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'discharging'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 661, in state
    numerical_value = float(value)
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'discharging'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 600, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 914, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1355, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1000, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1061, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 665, in state
    raise ValueError(
ValueError: Sensor sensor.vog_l29_akkustatus has device class 'battery', state class 'None' unit 'None' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'discharging' (<class 'str'>)
2024-06-18 09:31:51.831 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'PauseMusicForDialog' failed to setup conditions and has been disabled: Unknown device 'a4ad1c910acd7519d162d8ee11496d25'
2024-06-18 09:31:52.185 ERROR (MainThread) [homeassistant.components.onvif] Keller: validation error while creating webhook subscription: Missing element Address (Subscribe.ConsumerReference.Address)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 529, in _async_create_webhook_subscription
    self._notification_manager = await self._device.create_notification_manager(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/onvif/client.py", line 493, in create_notification_manager
    await manager.start()
  File "/usr/local/lib/python3.12/site-packages/onvif/managers.py", line 68, in start
    renewal_call_at = await self._start()
                      ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/onvif/managers.py", line 223, in _start
    result = await notify_service.Subscribe(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/bindings/soap.py", line 152, in send_async
    envelope, http_headers = self._create(
                             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/bindings/soap.py", line 73, in _create
    serialized = operation_obj.create(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/definitions.py", line 224, in create
    return self.input.serialize(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/wsdl/messages/soap.py", line 79, in serialize
    self.body.render(body, body_value)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 232, in render
    self._render_value_item(parent, value, render_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 256, in _render_value_item
    return self.type.render(node, value, None, render_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/types/complex.py", line 307, in render
    element.render(node, element_value, child_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/indicators.py", line 256, in render
    element.render(parent, element_value, child_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 232, in render
    self._render_value_item(parent, value, render_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 256, in _render_value_item
    return self.type.render(node, value, None, render_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/types/complex.py", line 307, in render
    element.render(node, element_value, child_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/indicators.py", line 256, in render
    element.render(parent, element_value, child_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 226, in render
    self.validate(value, render_path)
  File "/usr/local/lib/python3.12/site-packages/zeep/xsd/elements/element.py", line 284, in validate
    raise exceptions.ValidationError(
zeep.exceptions.ValidationError: Missing element Address (Subscribe.ConsumerReference.Address)
2024-06-18 09:32:06.407 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_1_tagesentladung (<class 'custom_components.huawei_solar.sensor.HuaweiSolarSensorEntity'>) is using state class 'total_increasing' which is impossible considering device class ('energy_storage') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/wlcrs/huawei_solar/issues
2024-06-18 09:32:06.409 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_1_gesamtladung (<class 'custom_components.huawei_solar.sensor.HuaweiSolarSensorEntity'>) is using state class 'total' which is impossible considering device class ('energy_storage') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/wlcrs/huawei_solar/issues
2024-06-18 09:32:06.409 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_1_gesamtentladung (<class 'custom_components.huawei_solar.sensor.HuaweiSolarSensorEntity'>) is using state class 'total' which is impossible considering device class ('energy_storage') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/wlcrs/huawei_solar/issues
2024-06-18 09:32:06.410 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_1_lade_entladeleistung (<class 'custom_components.huawei_solar.sensor.HuaweiSolarSensorEntity'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/wlcrs/huawei_solar/issues
2024-06-18 09:32:06.418 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2239, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 603, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2616, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2242, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1853, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 715, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 605, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified
2024-06-18 09:32:06.420 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.pv_roof_energy'
2024-06-18 09:32:06.420 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2239, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 603, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2616, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2242, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1853, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 715, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 605, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified
2024-06-18 09:32:06.427 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.inverter_tagesertrag') | float) - (states('sensor.battery_tagesentladung') | float) + (states('sensor.battery_tagesladung') | float) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.pv_roof_energy_daily'
2024-06-18 09:32:06.439 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 642: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-06-18 09:32:07.046 WARNING (MainThread) [homeassistant.components.ssdp] Could not set up UPnP/SSDP server, as a presentation URL could not be determined; Please configure your internal URL in the Home Assistant general configuration
2024-06-18 09:32:25.895 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_1_lade_entladeleistung (<class 'custom_components.huawei_solar.sensor.HuaweiSolarSensorEntity'>) is using native unit of measurement 'W' which is not a valid unit for the device class ('energy') it is using; expected one of ['kWh', 'MJ', 'GJ', 'Wh', 'MWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/wlcrs/huawei_solar/issues
2024-06-18 09:39:19.711 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: state_1, state_2, state_3, alarm_1, alarm_2, alarm_3, pv_01_voltage, pv_01_current, pv_02_voltage, pv_02_current
2024-06-18 09:39:19.712 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32000 with length 20 from slave 1
2024-06-18 09:39:19.712 DEBUG (MainThread) [pymodbus.logging] Adding transaction 98
2024-06-18 09:39:19.712 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:19.712 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x62 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x0 0x0 0x14
2024-06-18 09:39:19.985 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x62 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x3b 0x0 0xb2 0xd 0xe 0x0 0x98 old_data:  addr=None
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x62 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x3b 0x0 0xb2 0xd 0xe 0x0 0x98
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] Getting transaction 98
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] [6, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40961, 3899, 178, 3342, 152]
2024-06-18 09:39:19.986 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x00']
2024-06-18 09:39:19.986 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: input_power, day_active_power_peak, active_power, efficiency, internal_temperature, device_status, startup_time, shutdown_time, accumulated_yield_energy, total_dc_input_power, hourly_yield_energy, daily_yield_energy
2024-06-18 09:39:19.987 DEBUG (MainThread) [huawei_solar.huawei_solar] Sleeping for 0.049382 seconds before making next call.
2024-06-18 09:39:20.039 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064 with length 52 from slave 1
2024-06-18 09:39:20.040 DEBUG (MainThread) [pymodbus.logging] Adding transaction 99
2024-06-18 09:39:20.040 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:20.040 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x63 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x40 0x0 0x34
2024-06-18 09:39:21.339 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x63 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x77 0xf 0xb4 0xf 0xb6 0xf 0x86 0x9 0x12 0x9 0x35 0x8 0xd0 0x0 0x0 0x0 0xdc 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xf2 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x5b 0x0 0x0 0x0 0x1 0x3 0xe8 0x13 0x8a 0x27 0x10 0x1 0xbc 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x50 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8c 0x66 0x71 0x55 0xb1 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5 old_data:  addr=None
2024-06-18 09:39:21.339 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x63 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x77 0xf 0xb4 0xf 0xb6 0xf 0x86 0x9 0x12 0x9 0x35 0x8 0xd0 0x0 0x0 0x0 0xdc 0x0 0x0 0x0 0xe2 0x0 0x0 0x0 0xf2 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x5b 0x0 0x0 0x0 0x1 0x3 0xe8 0x13 0x8a 0x27 0x10 0x1 0xbc 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x50 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8c 0x66 0x71 0x55 0xb1 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5
2024-06-18 09:39:21.339 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:21.339 DEBUG (MainThread) [pymodbus.logging] Getting transaction 99
2024-06-18 09:39:21.339 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] [0, 1143, 4020, 4022, 3974, 2322, 2357, 2256, 0, 220, 0, 226, 0, 242, 0, 995, 0, 91, 0, 1, 1000, 5002, 10000, 444, 3000, 512, 0, 26225, 7240, 65535, 65535, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 448, 6, 16483, 7, 11148, 26225, 21937, 0, 4, 0, 245]
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x04w']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x03\xe3']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00[']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'fq', b'\x1cH']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\xff\xff', b'\xff\xff']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x06', b'@c']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x07', b'+\x8c']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x04']
2024-06-18 09:39:21.340 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\xf5']
2024-06-18 09:39:21.340 DEBUG (MainThread) [custom_components.huawei_solar] Finished fetching BT2330398204_inverter_data_update_coordinator data in 1.629 seconds (success: True)
2024-06-18 09:39:31.345 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: state_1, state_2, state_3, alarm_1, alarm_2, alarm_3, pv_01_voltage, pv_01_current, pv_02_voltage, pv_02_current
2024-06-18 09:39:31.345 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32000 with length 20 from slave 1
2024-06-18 09:39:31.346 DEBUG (MainThread) [pymodbus.logging] Adding transaction 100
2024-06-18 09:39:31.346 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:31.346 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x64 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x0 0x0 0x14
2024-06-18 09:39:31.850 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x64 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x3b 0x0 0xb3 0xd 0x36 0x0 0x99 old_data:  addr=None
2024-06-18 09:39:31.850 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x64 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x3b 0x0 0xb3 0xd 0x36 0x0 0x99
2024-06-18 09:39:31.850 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:31.851 DEBUG (MainThread) [pymodbus.logging] Getting transaction 100
2024-06-18 09:39:31.851 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:31.851 DEBUG (MainThread) [pymodbus.logging] [6, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40961, 3899, 179, 3382, 153]
2024-06-18 09:39:31.851 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x00']
2024-06-18 09:39:31.851 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: input_power, day_active_power_peak, active_power, efficiency, internal_temperature, device_status, startup_time, shutdown_time, accumulated_yield_energy, total_dc_input_power, hourly_yield_energy, daily_yield_energy
2024-06-18 09:39:31.852 DEBUG (MainThread) [huawei_solar.huawei_solar] Sleeping for 0.049153 seconds before making next call.
2024-06-18 09:39:31.902 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064 with length 52 from slave 1
2024-06-18 09:39:31.903 DEBUG (MainThread) [pymodbus.logging] Adding transaction 101
2024-06-18 09:39:31.903 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:31.903 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x65 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x40 0x0 0x34
2024-06-18 09:39:32.791 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x65 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x83 0xf 0xb7 0xf 0xb7 0xf 0x87 0x9 0x18 0x9 0x30 0x8 0xd2 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x5 0x0 0x0 0x1 0x13 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x79 0x0 0x0 0x0 0x0 0x3 0xe8 0x13 0x89 0x27 0x10 0x1 0xbc 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8d 0x66 0x71 0x55 0xc1 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5 old_data:  addr=None
2024-06-18 09:39:32.791 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x65 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x83 0xf 0xb7 0xf 0xb7 0xf 0x87 0x9 0x18 0x9 0x30 0x8 0xd2 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x5 0x0 0x0 0x1 0x13 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x79 0x0 0x0 0x0 0x0 0x3 0xe8 0x13 0x89 0x27 0x10 0x1 0xbc 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8d 0x66 0x71 0x55 0xc1 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] Getting transaction 101
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] [0, 1155, 4023, 4023, 3975, 2328, 2352, 2258, 0, 256, 0, 261, 0, 275, 0, 995, 0, 121, 0, 0, 1000, 5001, 10000, 444, 3000, 512, 0, 26225, 7240, 65535, 65535, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 448, 6, 16483, 7, 11149, 26225, 21953, 0, 4, 0, 245]
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x04\x83']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x03\xe3']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00y']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'fq', b'\x1cH']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\xff\xff', b'\xff\xff']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x06', b'@c']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x07', b'+\x8d']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x04']
2024-06-18 09:39:32.792 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\xf5']
2024-06-18 09:39:32.793 DEBUG (MainThread) [custom_components.huawei_solar] Finished fetching BT2330398204_inverter_data_update_coordinator data in 1.448 seconds (success: True)
2024-06-18 09:39:42.798 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: state_1, state_2, state_3, alarm_1, alarm_2, alarm_3, pv_01_voltage, pv_01_current, pv_02_voltage, pv_02_current
2024-06-18 09:39:42.798 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32000 with length 20 from slave 1
2024-06-18 09:39:42.799 DEBUG (MainThread) [pymodbus.logging] Adding transaction 102
2024-06-18 09:39:42.799 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:42.799 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x66 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x0 0x0 0x14
2024-06-18 09:39:45.083 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x66 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x12 0x0 0xb6 0xd 0x36 0x0 0x9b old_data:  addr=None
2024-06-18 09:39:45.083 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x66 0x0 0x0 0x0 0x2b 0x1 0x3 0x28 0x0 0x6 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xa0 0x1 0xf 0x12 0x0 0xb6 0xd 0x36 0x0 0x9b
2024-06-18 09:39:45.084 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:45.084 DEBUG (MainThread) [pymodbus.logging] Getting transaction 102
2024-06-18 09:39:45.084 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:45.084 DEBUG (MainThread) [pymodbus.logging] [6, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40961, 3858, 182, 3382, 155]
2024-06-18 09:39:45.084 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x00']
2024-06-18 09:39:45.084 DEBUG (MainThread) [huawei_solar.bridge] Batch update of the following registers: input_power, day_active_power_peak, active_power, efficiency, internal_temperature, device_status, startup_time, shutdown_time, accumulated_yield_energy, total_dc_input_power, hourly_yield_energy, daily_yield_energy
2024-06-18 09:39:45.084 DEBUG (MainThread) [huawei_solar.huawei_solar] Sleeping for 0.049550 seconds before making next call.
2024-06-18 09:39:45.134 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064 with length 52 from slave 1
2024-06-18 09:39:45.135 DEBUG (MainThread) [pymodbus.logging] Adding transaction 103
2024-06-18 09:39:45.135 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-06-18 09:39:45.135 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x67 0x0 0x0 0x0 0x6 0x1 0x3 0x7d 0x40 0x0 0x34
2024-06-18 09:39:46.566 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x67 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x8c 0xf 0xb0 0xf 0xb6 0xf 0x83 0x9 0xe 0x9 0x32 0x8 0xd3 0x0 0x0 0x0 0xf8 0x0 0x0 0x0 0xfe 0x0 0x0 0x1 0xc 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x72 0xff 0xff 0xff 0xff 0x3 0xe8 0x13 0x8a 0x27 0x10 0x1 0xbb 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x60 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8e 0x66 0x71 0x55 0xd0 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5 old_data:  addr=None
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x67 0x0 0x0 0x0 0x6b 0x1 0x3 0x68 0x0 0x0 0x4 0x8c 0xf 0xb0 0xf 0xb6 0xf 0x83 0x9 0xe 0x9 0x32 0x8 0xd3 0x0 0x0 0x0 0xf8 0x0 0x0 0x0 0xfe 0x0 0x0 0x1 0xc 0x0 0x0 0x3 0xe3 0x0 0x0 0x0 0x72 0xff 0xff 0xff 0xff 0x3 0xe8 0x13 0x8a 0x27 0x10 0x1 0xbb 0xb 0xb8 0x2 0x0 0x0 0x0 0x66 0x71 0x1c 0x48 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x60 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xc0 0x0 0x6 0x40 0x63 0x0 0x7 0x2b 0x8e 0x66 0x71 0x55 0xd0 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0xf5
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] Getting transaction 103
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] Frame check, no more data!
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] [0, 1164, 4016, 4022, 3971, 2318, 2354, 2259, 0, 248, 0, 254, 0, 268, 0, 995, 0, 114, 65535, 65535, 1000, 5002, 10000, 443, 3000, 512, 0, 26225, 7240, 65535, 65535, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 448, 6, 16483, 7, 11150, 26225, 21968, 0, 4, 0, 245]
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x04\x8c']
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x03\xe3']
2024-06-18 09:39:46.567 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00r']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'fq', b'\x1cH']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'\xff\xff', b'\xff\xff']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x06', b'@c']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x07', b'+\x8e']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\x04']
2024-06-18 09:39:46.568 DEBUG (MainThread) [pymodbus.logging] handle: [b'\x00\x00', b'\x00\xf5']
2024-06-18 09:39:46.568 DEBUG (MainThread) [custom_components.huawei_solar] Finished fetching BT2330398204_inverter_data_update_coordinator data in 3.771 seconds (success: True)

Please confirm the following:

celodnb commented 2 weeks ago

I'm seeing the exact same issue, for now I'm staying with the older version of the integration...

stumpf84 commented 2 weeks ago

I'm seeing the exact same issue, for now I'm staying with the older version of the integration...

Maybe a noob question but how can I downgrade to 1.3.3? When selecting the version by clicking 'Redownload' the version always resets to 1.4.1. grafik

The 'Learn more' link leads to a non existing site.

celodnb commented 2 weeks ago

Maybe someone else should answer, that has more knowledge than me, but I also couldn't seem to downgrade the integration, so I ended up rolling HA back to my last backup (I make a backup reach morning, so I had one from a few hours before), where the integration was on 1.3.3.

Until someone can help explain why the battery entities don't update, or what I need to do to fix it (of anything at all), or explain how it now works, I won't be upgrading this integration.

stumpf84 commented 2 weeks ago

This is the correct link for the downgrade documentation https://experimental.hacs.xyz/docs/use/entities/update/

Downgrading to 1.3.3 seems to work. Since the battery is fully charged and the sun is shining, I cannot check if the the SOC and Charge/Discharge power is updated, but the Bus voltage is updated periodically.