-
Notifications
You must be signed in to change notification settings - Fork 75
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
Connection Refused - Leads to Unresponsive Home Assistant #235
Comments
I have the same issue. I just have a single meter with no battery. The Solaredge_m1_imported_kwh and Solaredge_m1_exported_kwh are always -0.0 even though the energy is exported to florid and imported from grid. |
I still consider it a problem that the integration causes HA to crash if it cannot communicate. Edit: changing this setting did not solve the connectivity problem. |
I have the same issue here, my inverter is connected over somewhat shoddy WiFi. This leads to frequent communication failures and makes my home assistant unusable with this integration enabled since it becomes unresponsive to the point of having to power-cycle it to get it back online about every 20-30 minutes. |
I worked around the issue using a different integration for now. I tried to debug this one, but had trouble setting up a development environment for it so I didn't pursue that any further. In case anyone else wants to replicate my results, here is a modbus config gist. This needs to be combined with a set of helpers that convert these values to proper sensors with units of measure, device_class, state_class and scale factor taken into account, etc. It's not a super-easy thing to do and using this integration would be heaps easier and recommended over this hack. |
Same issue here, got 3 inverters (two single phase and one 3-phase) and sinds a week or two I had communications failures with the 3-phase inverter and it keeps crashing HA. One thing to notice is that the 3-phase inverter has a newer firmware update (4.21.23) and the others are lagging behind with an older version. Searching now for another integration. |
I ended up going with https://github.com/WillCodeForCats/solaredge-modbus-multi - no issues so far |
Yeah already just installed it and renamed some sensors to keep my history. Works like a charm👍 |
Any update on this topic? This should be very urgent as HA is becoming unresponsive. Switching to a different integration is a hassle. |
I've replaced my inverter in the past. After making sure all settings were the same, the integration continued to work fine.
I replaced my inverter again yesterday (yay SolarEdge!). All modbus settings are the same and IP address the same. The inverter is connected via Ethernet. The integration worked for a while but then started reporting "connection refused". I've verified the inverter is still reachable.
More interesting is that if I allow this to continue, it causes HA to become unresponsive and I need to perform a "core restart". I have to disable the integration to prevent this.
Logs:
2024-05-23 13:43:09.410 DEBUG (MainThread) [custom_components.solaredge_modbus] Setup solaredge_modbus.solaredge
2024-05-23 13:43:39.415 INFO (SyncWorker_55) [custom_components.solaredge_modbus] modbus client is not connected, trying to reconnect
2024-05-23 13:43:39.416 INFO (SyncWorker_55) [custom_components.solaredge_modbus] successfully connected to 192.168.69.220:1502
2024-05-23 13:44:08.447 DEBUG (SyncWorker_55) [custom_components.solaredge_modbus] Could not read Active Power Limit
2024-05-23 13:45:35.575 DEBUG (SyncWorker_14) [custom_components.solaredge_modbus] Could not read Active Power Limit
2024-05-23 13:46:33.758 DEBUG (SyncWorker_51) [custom_components.solaredge_modbus] Could not read Active Power Limit
2024-05-23 13:47:02.783 DEBUG (SyncWorker_2) [custom_components.solaredge_modbus] Could not read Active Power Limit
2024-05-23 13:47:03.856 ERROR (SyncWorker_13) [pymodbus.logging] Connection to (192.168.69.220, 1502) failed: [Errno 111] Connection refused
2024-05-23 13:47:03.856 ERROR (SyncWorker_13) [custom_components.solaredge_modbus] Error reading modbus data
Traceback (most recent call last):
File "/config/custom_components/solaredge_modbus/init.py", line 247, in _refresh_modbus_data
update_result = self.read_modbus_data()
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 322, in read_modbus_data
and self.read_modbus_power_limit()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 737, in read_modbus_power_limit
inverter_data = self.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 305, in read_holding_registers
return self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/mixin.py", line 102, in read_holding_registers
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 176, in execute
raise ConnectionException(f"Failed to connect[{self!s}]")
pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.69.220:1502)]
The text was updated successfully, but these errors were encountered: