Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Handle invalid inverter ID at setup #460

Open
3 tasks done
WillCodeForCats opened this issue Oct 25, 2023 · 1 comment · Fixed by #515
Open
3 tasks done

Handle invalid inverter ID at setup #460

WillCodeForCats opened this issue Oct 25, 2023 · 1 comment · Fixed by #515
Assignees
Labels
bug Something isn't working

Comments

@WillCodeForCats
Copy link
Owner

Describe the bug

Handle condition where an invalid inverter ID was configured when adding the integration.

Expected behavior

Change to a more user friendly response.

Screenshots

No response

Diagnostic File

N/A

Debug logs

This error originated from a custom integration.

Logger: custom_components.solaredge_modbus_multi
Source: helpers/update_coordinator.py:290
Integration: SolarEdge Modbus Multi (documentation, issues)
First occurred: 10:22:27 AM (2 occurrences)
Last logged: 10:22:45 AM

Unexpected error fetching SolarEdge Coordinator data: Modbus Error: [Input/Output] ERROR: No response received after 3 retries
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus_multi/__init__.py", line 194, in _async_update_data
    return await self._refresh_modbus_data_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus_multi/__init__.py", line 232, in _refresh_modbus_data_with_retry
    raise ex
  File "/config/custom_components/solaredge_modbus_multi/__init__.py", line 229, in _refresh_modbus_data_with_retry
    return await self._hub.async_refresh_modbus_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus_multi/hub.py", line 384, in async_refresh_modbus_data
    await self._async_init_solaredge()
  File "/config/custom_components/solaredge_modbus_multi/hub.py", line 202, in _async_init_solaredge
    await new_inverter.init_device()
  File "/config/custom_components/solaredge_modbus_multi/hub.py", line 732, in init_device
    inverter_data = await self.hub.modbus_read_holding_registers(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus_multi/hub.py", line 478, in modbus_read_holding_registers
    result = await self._client.read_holding_registers(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymodbus/client/base.py", line 207, in async_execute
    raise ModbusIOException(
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] ERROR: No response received after 3 retries

Home Assistant Version

2023.10.5

solaredge-modbus-multi Version

2.4.7-pre.2

Installation Type

HAOS

Read the Instructions

Additional Context

No response

@WillCodeForCats WillCodeForCats added the bug Something isn't working label Oct 25, 2023
@WillCodeForCats WillCodeForCats self-assigned this Oct 25, 2023
@WillCodeForCats
Copy link
Owner Author

This is not a critical problem (you can just delete and re-add the integration) but there are probably ways it can be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant