CJNE / ha-sunspec

Home Assistant customcomponent for SunSpec modbus devices
MIT License
63 stars 14 forks source link

only reconnecting after inverter restart #285

Open Zef-X opened 2 months ago

Zef-X commented 2 months ago

Version of the custom_component

0.0.26 SMA Tripower X 25 firmware 03.06.19.R

Configuration

Inverter not active on 192.168.20.103:502
Failed to connect to 192.168.20.103:502 slave id 126

Describe the bug

After restarting HASS or restarting the integration, SunSpec wont connect to Inverter. Stoping and starting Modbus Server or replugging Ethernet dosnt help.

When restarting Inverter, I get data as intended without problem. But again, when I wanna change the config SunSpec tells me it can't connect to Inverter even though data is recieved and everything works as intended.

Debug log

2024-08-22 15:11:36.089 WARNING (MainThread) [custom_components.sunspec] Inverter not active on 192.168.20.103:502
2024-08-22 15:12:25.419 WARNING (MainThread) [custom_components.sunspec] Failed to connect to 192.168.20.103:502 slave id 126
SmileyMan commented 2 months ago

Same. Reverted to 0.0.25

SmileyMan commented 1 month ago

Temp fix for me was downgrading to 0.0.25 and replacing sensor.py with sensor.py from 0.0.26 (Constants in use by 0.0.25 get removed Jan 2025).

Suspect "Bump pysunspec2 from 1.0.8 to 1.1.5" is the source of this new issue.

borrelan commented 1 month ago

That worked for me as well. Thank you for pointing me in the right direction @SmileyMan