mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
375 stars 95 forks source link

Error: device: 1 address: 13050 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe #229

Closed smartmatic closed 3 weeks ago

smartmatic commented 10 months ago

Describe the bug HA Log throws errors and entities are randomly not available for some seconds. Then they appear again.

Your Sungrow inverter:

Home Assistant :

modbus_sungrow.yaml:

Inverter Firmware Status:

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior No errors like provided and entities should constantly available.

Screenshots Bildschirmfoto 2024-01-05 um 11 10 16

Additional context Behaviour that entities are shortly and randomly not available appears since HA update to 2024.1.0

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:375
Integration: Modbus (documentation, issues)
First occurred: 4. Januar 2024 um 15:10:58 (6370 occurrences)
Last logged: 10:51:46

Pymodbus: SungrowSHx: Error: device: 1 address: 13050 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 33047 -> Modbus Error: [Connection] ModbusTcpClient(192.168.178.36:502): Connection unexpectedly closed 0.0004031658172607422 seconds into read of 8 bytes without response from slave before it closed connection
Pymodbus: SungrowSHx: Error: device: 1 address: 13024 -> Modbus Error: [Connection] ModbusTcpClient(192.168.178.36:502): Connection unexpectedly closed 0.00040435791015625 seconds into read of 8 bytes without response from slave before it closed connection
Pymodbus: SungrowSHx: Error: device: 1 address: 13019 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 5007 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:375
Integration: Modbus (documentation, issues)
First occurred: 4. Januar 2024 um 15:10:58 (6420 occurrences)
Last logged: 10:56:58

Pymodbus: SungrowSHx: Error: device: 1 address: 13032 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 5007 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 5016 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 33047 -> Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Error: device: 1 address: 13021 -> Modbus Error: [Connection] ModbusTcpClient(192.168.178.36:502): Connection unexpectedly closed 0.0015299320220947266 seconds into read of 8 bytes without response from slave before it closed connection
NBD99 commented 10 months ago

I can confirm i have the same issue on a SH10RT inverter.

umrath commented 6 months ago

Since I've moved to modbus proxy I started to see similar effects. My battery related entity vanished while the rest stays available.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

umrath commented 3 weeks ago

The problem persists.

Gnarfoz commented 3 weeks ago

Communication errors can't really be fixed here. This package does no communication by itself. It's "merely" a big configuration file for Home Assistant's built-in Modbus functionality. That said, are you sure Home Assistant is the only thing accessing the inverter via Modbus? The Modbus stack on the inverter is notoriously unstable when multiple clients try to access it.