Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: SolaX X3-MIC Gen1 broken after upgrade #1175

Closed
Kars-de-Jong opened this issue Dec 24, 2024 · 8 comments
Closed

[Bug]: SolaX X3-MIC Gen1 broken after upgrade #1175

Kars-de-Jong opened this issue Dec 24, 2024 · 8 comments
Labels
bug Something isn't working solax

Comments

@Kars-de-Jong
Copy link
Contributor

Describe the bug

After upgrading from 2024.11.2 to 2024.12.1 the integration is completely broken for me.
All entities are unavailable.

Integration Version

2024.12.1

Homeassistant core version

2024.12.5

Inverter brand

SolaX Power

Plugin used

plugin_solax.py

Serial prefix

MU802T

Inverter firmware versions

ARM 1.38-1.02 DSP 1.33

Connection Method

USR-N510

Dongle firmware

N/A

Detailed Error Log

2024-12-24 08:18:18.496 INFO (ImportExecutor_0) [custom_components.solax_modbus.config_flow] detected HA core version 2024 12
2024-12-24 08:18:18.496 INFO (ImportExecutor_0) [custom_components.solax_modbus.config_flow] starting configflow - domain = solax_modbus
32m2024-12-24 08:18:18.691 INFO (SyncWorker_1) [custom_components.solax_modbus] trying to load plugin - plugin_name: solax
2024-12-24 08:18:33.881 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect
2024-12-24 08:18:33.936 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at x.x.x.x:502
2024-12-24 08:18:33.936 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX X3-MIC: trying to determine inverter type
2024-12-24 08:18:34.107 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX X3-MIC: reading serial number from address 0x0 failed; other address may succeed
2024-12-24 08:18:34.107 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX X3-MIC 0x0 serial number: None
2024-12-24 08:18:34.282 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX X3-MIC 0x300 serial number: MU802T
2024-12-24 08:18:36.329 INFO (MainThread) [custom_components.solax_modbus.button] hub.wakeuButton: None
2024-12-24 08:18:36.331 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x318 rtc
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x400 pv_voltage_1
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x401 pv_voltage_2
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x402 pv_current_1
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x403 pv_current_2
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x404 inverter_voltage_l1
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x405 inverter_voltage_l2
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x406 inverter_voltage_l3
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x407 inverter_frequency_l1
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x408 inverter_frequency_l2
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x409 inverter_frequency_l3
2024-12-24 08:18:36.332 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40a inverter_current_l1
2024-12-24 08:18:36.333 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40b inverter_current_l2
2024-12-24 08:18:36.333 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40c inverter_current_l3
2024-12-24 08:18:36.333 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40d inverter_temperature
2024-12-24 08:18:36.333 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40e measured_power
2024-12-24 08:18:36.333 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40f run_mode
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x410 measured_power_l1
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x411 measured_power_l2
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x412 measured_power_l3
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x414 pv_power_1
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x415 pv_power_2
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x423 total_yield
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x425 today_s_yield
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x435 inverter_power
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x437 total_grid_export
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x439 total_grid_import
2024-12-24 08:18:36.334 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x43b today_s_grid_export
2024-12-24 08:18:36.335 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x43c today_s_grid_import
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_voltage_1 is already used by sensor.solax_x3_mic_pv_voltage_1 - ignoring sensor.SolaX X3-MIC_pv_voltage_1
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_voltage_2 is already used by sensor.solax_x3_mic_pv_voltage_2 - ignoring sensor.SolaX X3-MIC_pv_voltage_2
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_current_1 is already used by sensor.solax_x3_mic_pv_current_1 - ignoring sensor.SolaX X3-MIC_pv_current_1
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_current_2 is already used by sensor.solax_x3_mic_pv_current_2 - ignoring sensor.SolaX X3-MIC_pv_current_2
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_voltage_l1 is already used by sensor.solax_x3_mic_inverter_voltage_l1 - ignoring sensor.SolaX X3-MIC_inverter_voltage_l1
2024-12-24 08:18:36.344 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_voltage_l2 is already used by sensor.solax_x3_mic_inverter_voltage_l2 - ignoring sensor.SolaX X3-MIC_inverter_voltage_l2
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_voltage_l3 is already used by sensor.solax_x3_mic_inverter_voltage_l3 - ignoring sensor.SolaX X3-MIC_inverter_voltage_l3
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_frequency_l1 is already used by sensor.solax_x3_mic_inverter_frequency_l1 - ignoring sensor.SolaX X3-MIC_inverter_frequency_l1
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_frequency_l2 is already used by sensor.solax_x3_mic_inverter_frequency_l2 - ignoring sensor.SolaX X3-MIC_inverter_frequency_l2
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_frequency_l3 is already used by sensor.solax_x3_mic_inverter_frequency_l3 - ignoring sensor.SolaX X3-MIC_inverter_frequency_l3
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_current_l1 is already used by sensor.solax_x3_mic_inverter_current_l1 - ignoring sensor.SolaX X3-MIC_inverter_current_l1
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_current_l2 is already used by sensor.solax_x3_mic_inverter_current_l2 - ignoring sensor.SolaX X3-MIC_inverter_current_l2
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_current_l3 is already used by sensor.solax_x3_mic_inverter_current_l3 - ignoring sensor.SolaX X3-MIC_inverter_current_l3
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_temperature is already used by sensor.solax_x3_mic_inverter_temperature - ignoring sensor.SolaX X3-MIC_inverter_temperature
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_measured_power is already used by sensor.solax_x3_mic_measured_power - ignoring sensor.SolaX X3-MIC_measured_power
2024-12-24 08:18:36.345 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_run_mode is already used by sensor.solax_x3_mic_run_mode - ignoring sensor.SolaX X3-MIC_run_mode
2024-12-24 08:18:36.348 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_power_1 is already used by sensor.solax_x3_mic_pv_power_1 - ignoring sensor.SolaX X3-MIC_pv_power_1
2024-12-24 08:18:36.348 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_power_2 is already used by sensor.solax_x3_mic_pv_power_2 - ignoring sensor.SolaX X3-MIC_pv_power_2
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_pv_power_total is already used by sensor.solax_x3_mic_pv_power_total - ignoring sensor.SolaX X3-MIC_pv_power_total
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_total_yield is already used by sensor.solax_x3_mic_total_yield - ignoring sensor.SolaX X3-MIC_total_yield
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_today_s_yield is already used by sensor.solax_x3_mic_today_s_yield - ignoring sensor.SolaX X3-MIC_today_s_yield
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_inverter_power is already used by sensor.solax_x3_mic_inverter_power - ignoring sensor.SolaX X3-MIC_inverter_power
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_total_grid_export is already used by sensor.solax_x3_mic_total_grid_export - ignoring sensor.SolaX X3-MIC_total_grid_export
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_total_grid_import is already used by sensor.solax_x3_mic_total_grid_import - ignoring sensor.SolaX X3-MIC_total_grid_import
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_today_s_grid_export is already used by sensor.solax_x3_mic_today_s_grid_export - ignoring sensor.SolaX X3-MIC_today_s_grid_export
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_today_s_grid_import is already used by sensor.solax_x3_mic_today_s_grid_import - ignoring sensor.SolaX X3-MIC_today_s_grid_import
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_grid_export is already used by sensor.solax_x3_mic_grid_export - ignoring sensor.SolaX X3-MIC_grid_export
2024-12-24 08:18:36.349 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX X3-MIC_grid_import is already used by sensor.solax_x3_mic_grid_import - ignoring sensor.SolaX X3-MIC_grid_import
2024-12-24 08:18:36.350 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC sensor groups: 1
2024-12-24 08:18:36.350 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning holding block: 0x318 0x31e [792]
2024-12-24 08:18:36.350 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x400 0x43d [1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1044, 1045, 1059, 1061, 1077, 1079, 1081, 1083, 1084]
2024-12-24 08:18:36.350 INFO (MainThread) [custom_components.solax_modbus.sensor] computedRegs: {'house_load': SolaXModbusSensorEntityDescription(key='house_load', device_class=<SensorDeviceClass.POWER: 'power'>, entity_category=None, entity_registry_enabled_default=True, entity_registry_visible_default=True, force_update=False, icon='mdi:home-lightning-bolt', has_entity_name=False, name='Inverter House Load', translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=<UnitOfPower.WATT: 'W'>, options=None, state_class=<SensorStateClass.MEASUREMENT: 'measurement'>, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=14367, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=False, newblock=False, value_function=<function value_function_house_load at 0x7f7ffa289ee0>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None), 'pv_power_total': SolaXModbusSensorEntityDescription(key='pv_power_total', device_class=<SensorDeviceClass.POWER: 'power'>, entity_category=None, entity_registry_enabled_default=True, entity_registry_visible_default=True, force_update=False, icon='mdi:solar-power-variant', has_entity_name=False, name='Inverter PV Power Total', translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=<UnitOfPower.WATT: 'W'>, options=None, state_class=<SensorStateClass.MEASUREMENT: 'measurement'>, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=8195, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=False, newblock=False, value_function=<function value_function_pv_power_total at 0x7f7ffaf30220>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None), 'pv_total_power': SolaXModbusSensorEntityDescription(key='pv_total_power', device_class=<SensorDeviceClass.POWER: 'power'>, entity_category=None, entity_registry_enabled_default=False, entity_registry_visible_default=True, force_update=False, icon='mdi:solar-power-variant', has_entity_name=False, name='Inverter PV Total Power', translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=<UnitOfPower.WATT: 'W'>, options=None, state_class=<SensorStateClass.MEASUREMENT: 'measurement'>, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=8195, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=False, newblock=False, value_function=<function value_function_pv_power_total at 0x7f7ffaf30220>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None), 'grid_export': SolaXModbusSensorEntityDescription(key='grid_export', device_class=<SensorDeviceClass.POWER: 'power'>, entity_category=None, entity_registry_enabled_default=True, entity_registry_visible_default=True, force_update=False, icon='mdi:home-export-outline', has_entity_name=False, name='Inverter Grid Export', translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=<UnitOfPower.WATT: 'W'>, options=None, state_class=<SensorStateClass.MEASUREMENT: 'measurement'>, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=8192, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=False, newblock=False, value_function=<function value_function_grid_export at 0x7f7ffaf305e0>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None), 'grid_import': SolaXModbusSensorEntityDescription(key='grid_import', device_class=<SensorDeviceClass.POWER: 'power'>, entity_category=None, entity_registry_enabled_default=True, entity_registry_visible_default=True, force_update=False, icon='mdi:home-import-outline', has_entity_name=False, name='Inverter Grid Import', translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=<UnitOfPower.WATT: 'W'>, options=None, state_class=<SensorStateClass.MEASUREMENT: 'measurement'>, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=8192, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=False, newblock=False, value_function=<function value_function_grid_import at 0x7f7ffaf30540>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None), 'hardware_version': SolaXModbusSensorEntityDescription(key='hardware_version', device_class=None, entity_category=None, entity_registry_enabled_default=True, entity_registry_visible_default=True, force_update=False, icon=None, has_entity_name=False, name=<UndefinedType._singleton: 0>, translation_key=None, translation_placeholders=None, unit_of_measurement=None, last_reset=None, native_unit_of_measurement=None, options=None, state_class=None, suggested_display_precision=None, suggested_unit_of_measurement=None, allowedtypes=8705, scale=1, read_scale_exceptions=None, read_scale=1, blacklist=None, register=-1, rounding=1, register_type=1, unit='_uint16', scan_group=None, internal=True, newblock=False, value_function=<function value_function_hardware_version_g1 at 0x7f7ffa289bc0>, wordcount=None, sleepmode=1, ignore_readerror=False, value_series=None)}
2024-12-24 08:18:51.752 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 693, in treat_address
    val = decoder.decode_32bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 380, in decode_32bit_uint
    handle = self._unpack_words(fstring, handle)
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 340, in _unpack_words
    handle = unpack(f"!{wc_value}H", handle)
struct.error: unpack requires a buffer of 4 bytes
2024-12-24 08:18:51.760 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:21:06.776 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:21:06.776 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:23:36.803 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:23:36.804 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:26:06.830 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:26:06.831 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:28:36.807 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:28:36.807 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:31:06.837 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:31:06.838 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:33:36.814 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:33:36.814 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:36:06.845 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:36:06.845 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:38:36.872 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:38:36.873 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
2024-12-24 08:41:06.852 WARNING (MainThread) [custom_components.solax_modbus] SolaX X3-MIC: read failed at 0x425: today_s_yield 
2024-12-24 08:41:06.853 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
  File "/config/custom_components/solax_modbus/__init__.py", line 670, in async_read_modbus_data
    res = await self.async_read_modbus_registers_all(group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 834, in async_read_modbus_registers_all
    res = res and await self.async_read_modbus_block(data, block, "input")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solax_modbus/__init__.py", line 784, in async_read_modbus_block
    val = decoder.decode_16bit_uint()
  File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
    return unpack(fstring, handle)[0]
           ~~~~~~^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes
...

Additional context

The inverter was in "Waiting" mode, which means some registers are unavailable. This worked fine with version 2024.11.2.

@Kars-de-Jong Kars-de-Jong added bug Something isn't working solax labels Dec 24, 2024
@Haydn23
Copy link

Haydn23 commented Dec 25, 2024

Hi, I have same issue, all showing Unknown

@wills106
Copy link
Owner

Looks like it's trying to setup two instances. If you delete the Inverter from the Integration and add it back in again does it load correctly?

@Haydn23
Copy link

Haydn23 commented Dec 25, 2024

have deleted mine and reinstalled, still same issue here. all items showing unknown. Only happened since last update.

@Haydn23
Copy link

Haydn23 commented Dec 25, 2024

2024-12-24 20:07:49.583 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: reading serial number from address 0x0 failed; other address may succeed
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x318 rtc
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x39a lock_state
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x320 mppt_scan_mode_pv1
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x35c q-curve
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x381 active_power_limit
2024-12-24 20:07:52.170 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x390 firmware_arm
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x394 firmware_dsp
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] holding register already used: 0x3a6 mppt_scan_mode_pv2
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x400 inverter_voltage
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x403 inverter_current
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x406 inverter_frequency
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x408 ct_power
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x409 measured_power
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40a pv_voltage_1
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40b pv_voltage_2
2024-12-24 20:07:52.171 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40d pv_current_1
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x40e pv_current_2
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x410 pv_power_1
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x411 pv_power_2
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x412 pv_power_3
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x413 inverter_temperature
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x414 control_board_temperature
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x415 run_mode
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x42b total_yield
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x42f total_grid_export
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x431 total_grid_import
2024-12-24 20:07:52.172 WARNING (MainThread) [custom_components.solax_modbus.sensor] input register already declared: 0x437 today_s_yield
2024-12-24 20:07:52.182 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_rtc is already used by sensor.solax_rtc - ignoring sensor.SolaX_rtc
2024-12-24 20:07:52.182 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_inverter_voltage is already used by sensor.solax_inverter_voltage_2 - ignoring sensor.SolaX_inverter_voltage
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_inverter_current is already used by sensor.solax_inverter_current_2 - ignoring sensor.SolaX_inverter_current
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_inverter_frequency is already used by sensor.solax_inverter_frequency_2 - ignoring sensor.SolaX_inverter_frequency
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_ct_power is already used by sensor.solax_ct_power - ignoring sensor.SolaX_ct_power
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_measured_power is already used by sensor.solax_measured_power - ignoring sensor.SolaX_measured_power
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_voltage_1 is already used by sensor.solax_pv_voltage_1 - ignoring sensor.SolaX_pv_voltage_1
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_voltage_2 is already used by sensor.solax_pv_voltage_2 - ignoring sensor.SolaX_pv_voltage_2
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_current_1 is already used by sensor.solax_pv_current_1 - ignoring sensor.SolaX_pv_current_1
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_current_2 is already used by sensor.solax_pv_current_2 - ignoring sensor.SolaX_pv_current_2
2024-12-24 20:07:52.183 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_power_1 is already used by sensor.solax_pv_power_1 - ignoring sensor.SolaX_pv_power_1
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_power_2 is already used by sensor.solax_pv_power_2 - ignoring sensor.SolaX_pv_power_2
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_power_3 is already used by sensor.solax_pv_power_3 - ignoring sensor.SolaX_pv_power_3
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_inverter_temperature is already used by sensor.solax_inverter_temperature - ignoring sensor.SolaX_inverter_temperature
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_control_board_temperature is already used by sensor.solax_control_board_temperature - ignoring sensor.SolaX_control_board_temperature
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_run_mode is already used by sensor.solax_run_mode - ignoring sensor.SolaX_run_mode
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_total_yield is already used by sensor.solax_total_yield - ignoring sensor.SolaX_total_yield
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_total_grid_export is already used by sensor.solax_total_grid_export - ignoring sensor.SolaX_total_grid_export
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_total_grid_import is already used by sensor.solax_total_grid_import - ignoring sensor.SolaX_total_grid_import
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_today_s_yield is already used by sensor.solax_today_s_yield_2 - ignoring sensor.SolaX_today_s_yield
2024-12-24 20:07:52.184 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_grid_export is already used by sensor.solax_grid_export - ignoring sensor.SolaX_grid_export
2024-12-24 20:07:52.185 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_grid_import is already used by sensor.solax_grid_import - ignoring sensor.SolaX_grid_import
2024-12-24 20:07:52.186 ERROR (MainThread) [homeassistant.components.sensor] Platform solax_modbus does not generate unique IDs. ID SolaX_pv_power_total is already used by sensor.solax_pv_power_total - ignoring sensor.SolaX_pv_power_total
2024-12-24 20:07:55.447 ERROR (MainThread) [homeassistant.components.command_line.utils] Command failed (with return code 1): cat /sys/class/power_supply/BAT0/capacity
2024-12-24 20:08:09.340 ERROR (MainThread) [custom_components.solax_modbus] Something went wrong reading from modbus
Traceback (most recent call last):
File "/config/custom_components/solax_modbus/init.py", line 670, in async_read_modbus_data
res = await self.async_read_modbus_registers_all(group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solax_modbus/init.py", line 834, in async_read_modbus_registers_all
res = res and await self.async_read_modbus_block(data, block, "input")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solax_modbus/init.py", line 784, in async_read_modbus_block
val = decoder.decode_16bit_uint()
File "/usr/local/lib/python3.13/site-packages/pymodbus/payload.py", line 373, in decode_16bit_uint
return unpack(fstring, handle)[0]

@CVKBaca
Copy link

CVKBaca commented Dec 25, 2024

Same problem for me. I did a rollback to version 2024.11.2

@wills106
Copy link
Owner

Can you all try 2024.12.2

@Kars-de-Jong
Copy link
Contributor Author

@wills106 Works for me now, thanks!

@wills106
Copy link
Owner

Closing down as resolved.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working solax
Projects
None yet
Development

No branches or pull requests

4 participants