wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
315 stars 98 forks source link

[Bug]: 'Sofar' - 'HYD KTL10-3PH' Some connection error - from time to time integration stops. #804

Closed hubertozog closed 2 months ago

hubertozog commented 6 months ago

Describe the bug

From time to time the integrtion stops. All data freez wont get updated. There is no any real error in logs. Integration just hangs... To make it work even reboot of HA wont help. Also on the inverter there is no RS485 icon. If i try to send some request by RS485 usb adapter via modpool all works. I dont have any idea what its the issue. Sometimes it work for 5 days, sometimes issue will occure after one day...

Integration Version

2024.03.1

Homeassistant core version

2024.3.0

Inverter brand

Sofar

Plugin used

plugin_sofar.py

Serial prefix

SP2ES110N

Connection Method

Waveshare adapter RS485 to ETH

Detailed Error Log

2024-03-13 17:44:30.798 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Client is not connected

024-03-13 15:29:18.277 DEBUG (MainThread) [custom_components.solax_modbus] connect modbus 2024-03-13 15:29:24.535 INFO (MainThread) [custom_components.solax_modbus] exception 'NoneType' object has no attribute 'write' : Sofar cannot read holding registers at device 1 position 0x445 NoneType: None 2024-03-13 15:29:24.536 DEBUG (MainThread) [custom_components.solax_modbus] assuming sleep mode - slowing down by factor 10 2024-03-13 15:29:24.536 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved

Additional context

No response

ppiwowar commented 6 months ago

After 3 days (of downgrading to ....3) it stopped again. Testing 2024.03.8b1 now ....

hubertozog commented 5 months ago

For now on newest version - any issue, but in meanwhile many reboots of the HA. Gonna update in the end of the next week.

hubertozog commented 5 months ago

OK after 10 days, I didnt noticed any issue with the integration. Gonna try pasive mode right now. But normal oparation in self use works perfect without any issue on newest version. One more time thanks for your hard work!

ppiwowar commented 5 months ago

Unfortunately lost the connection to inverter again. Do you have any idea how to reset the inverter AVOIDING COMPLETE SWITCH OFF? I am now more hesitant for switch-off as I have just installed a battery. To switch it off I need also to shut down battery (all DC). Of course I tried everything else - integration reload, Waveshare RS485 to ETH adapter reset. Like before these do not work. Only inverter switch off helped then.

lieglw commented 5 months ago

I am in a similar situation with my second inverter. I did a system restart and then waited a few miniatures and then did a HA restart and back it was. But I have Solax with WLAN connected.

Zwer2k commented 5 months ago

The FIrmware error that was introduced with version V110022 (possibly even in V110002) still exists in current versions (V110051 and V111151). Sofar does not seem to be able to eliminate the error permanently. Unfortunately, the only solution is to switch off the inverter completely, i.e. also switch off the battery :-(

Zwer2k commented 5 months ago

One more question for those who have problems: How many devices do you use to read the data? I use the HA-Solax integration and also EVCC. If I also connect my test HA with Solax integration (i.e. read out with 3 devices), the error seems to occur even more frequently

ppiwowar commented 5 months ago

One more question for those who have problems: How many devices do you use to read the data? I use the HA-Solax integration and also EVCC. If I also connect my test HA with Solax integration (i.e. read out with 3 devices), the error seems to occur even more frequently

My inverter sends data to Solarman portal through Wi-Fi logger. HA-Solax Integration connects through WaveShare ETH to RS485 directly to RS485 inverter port. No other devices on this RS485 bus. Polling frequency is 1/15 seconds. (Strangely: I recall cases when I discovered hang-up within, say 10-20 minutes, reloading the integration was enough to bring back to normal operation.)

Zwer2k commented 5 months ago

In the past there were problems with the Solax integration, but these should have been resolved. If it is a problem with the integration, then a restart of HA or the integration should be sufficient. Of course, it is also possible that WaveShare is somehow communicating in a strange way (I also use WaveShare), so that the inverter firmware cannot cope with it. However, this should not lead to such hang-ups
I also use Wi-Fi logger, but it is not affected by the problem

ppiwowar commented 4 months ago

Do I need termination resistors at both ends of RS485 bus - at Waveshare adapter side and Sofar inverter side? If yes, then is below the right way o install them.

"My RS485 Adapter does not work reliably

Have you double checked that the termination resistor is installed on both ends? On the adapter side make sure that it has a termination resistor in the adapter. If not add it. On the inverter side Sofar inverters also require a termination adaptor on the last connected inverter. Not that on the COM Port the PINs 1 and 2 (A+) and PINs 3 and 4 (B-) are internally connected with each other. So if your signal cable is connected to PINs 1 and 4 you can use the PINs 2 and 3 to connect your termination resistor."

wills106 commented 4 months ago

Are people still having issues or can this be closed now?

ppiwowar commented 4 months ago

Bang! After stable work for more then 2 weeks it stopped today few hours after upgrading HA Core 2024.5.3 -> 2024.5.4. I have discovered 15 mins. after the stop and tried with reversing upgrade, restarting the coverter ETH-RS485, reloading the integration. None has helped ..... I have to restart the inverter and battery which is a bigger procedure....... SolaX Inverter Modbus version = 2024..05.3

ppiwowar commented 4 months ago

Oh, I have forgot to mention, I have also updated system time ... Precisely: 10:19 Upgrade HA Core 2024.5.3 -> 2024.5.4, restart 10:26 Update System Time command sent to inverter 11:26 Integration stopped sending data So the STOP happened exactly 1h after I pressed Update System Time. BTW, I have never updated system time before....

hubertozog commented 4 months ago

In my instalation evereything wokrs till yesterday. Storm and Waveshare died xD But from my point of view, integration works perfect.

wills106 commented 2 months ago

Can this be closed down now?

Zwer2k commented 2 months ago

With the latest Sofar firmware and Waveshare RS485 to ETH everything works stable for me. Thank you

ppiwowar commented 2 months ago

Could you specify which Sofar firmware version you are on so it is rock solid stable, please.Pozdrawiam/Regards, PawelWiadomość napisana przez Zwer2k @.***> w dniu 03.08.2024, o godz. 11:43: With the latest Sofar firmware and Waveshare RS485 to ETH everything works stable for me. Thank you

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

hubertozog commented 2 months ago

Same here, rock solid.

Newest version of integration and firmware of inverter.

ppiwowar commented 2 months ago

OK. Thanks. Let’s gst it closed then.Pozdrawiam/Regards, PawelWiadomość napisana przez hubertozog @.***> w dniu 03.08.2024, o godz. 13:25: Same here, rock solid. Newest version of integration and firmware of inverter.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>