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)
282 stars 85 forks source link

[Bug]: Solis - No more update charge times working after update to 24.02.06 #771

Open nitronix17 opened 4 months ago

nitronix17 commented 4 months ago

Describe the bug

hi, After setting the charge times and pressing update I receive the error "No Response received after 3 retries. 429332428_1136869960540733_5744752540017351332_n

This does not happen in version 2024.02.05

Integration Version

2024.02.06

Homeassistant core version

2024.2.2

Inverter brand

Solis

Plugin used

plugin_solis.py

Serial prefix

???

Connection Method

RS485-USB

Detailed Error Log

No response

Additional context

No response

burden42 commented 4 months ago

yes solis user here too updated to 2024.02.6 and had zero connection to my inverter , no reading of any data . reverted back to 2024.02.5 and all came good again using modbus to tcp hardware as described here https://github.com/Jumpy07/Solis---SolisCloud-and-Home-Assistant?fbclid=IwAR1acuEvWkuDfk8j-1oICUASdsy4kTpmIFcNezVlOoo62F_Ehpm4CXqgJlc

wills106 commented 4 months ago

Does 2024.02.7b2 help with the issue?

Karssi commented 4 months ago

Does 2024.02.7b2 help with the issue?

Yes, it does. Thank you

nitronix17 commented 4 months ago

Here, the issue is not resolved 429476809_439220158445626_2140152160260384272_n 429501318_1763184660827427_3285604441863438665_n 431111026_6976919902417158_1138598376721199383_n

wills106 commented 4 months ago

Once the general issues with 2024.2.x are sorted we can look into specific issues. Hopefully get the connectivity sorted in the next day or two.

wills106 commented 3 months ago

Just released 2024.03.1 are you still getting the errors after updating?

luftdieb commented 3 months ago

Hi, I'm using 2024.03.3 and have just for one function this kind of errormessage. That means, all read parameter works great. But when I'm trying to change the Power Switch from Off to On, I'm getting this error. From On to Off, it works.

This problem is somehow news since ~3-6 weeks. I do also have a nodered flow, which try to switch between ON and OFF and also here, I'm getting also error message on same direction (OFF --> ON): "[error] [api-call-service:PowerSwitch on] Call-service error. AsyncModbusTcpClient.close() got an unexpected keyword argument 'intern'"

I've also followed up the recommendation from previous changelog comment to uninstall the Solax instance from HA and also from HACS, but this didn't change anything.

With Debug active, I'm getting this exception

2024-03-17 18:40:31.148 INFO (MainThread) [custom_components.solax_modbus.select] writing solis_modbus_ select register 43007 value 190 2024-03-17 18:40:51.664 INFO (MainThread) [custom_components.solax_modbus] exception Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.3.238:8899] : solis_modbus_ cannot read holding registers at device 1 position 0xa7ff NoneType: None 2024-03-17 18:40:51.664 DEBUG (MainThread) [custom_components.solax_modbus] assuming sleep mode - slowing down by factor 10 2024-03-17 18:40:54.244 INFO (MainThread) [custom_components.solax_modbus.select] writing solis_modbus_ select register 43007 value 190 2024-03-17 18:41:14.252 INFO (MainThread) [custom_components.solax_modbus] exception Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.3.238:8899] : solis_modbus_ cannot read holding registers at device 1 position 0xa7ff NoneType: None 2024-03-17 18:41:14.252 DEBUG (MainThread) [custom_components.solax_modbus] assuming sleep mode - slowing down by factor 10 2024-03-17 18:41:14.253 DEBUG (MainThread) [custom_components.solax_modbus] assuming sleep mode - slowing down by factor 10 2024-03-17 18:41:21.385 INFO (MainThread) [custom_components.solax_modbus.select] writing solis_modbus_ select register 43007 value 190

Also on my end, when I switch back to 2024.02.05, function works.

Hope that helps to identify the problem.

wills106 commented 3 months ago

There is mention of this 'intern' In the release notes for pyModbus 3.6.6 https://github.com/pymodbus-dev/pymodbus/pull/2080 but I'm not sure if I need to declare something extra? I need to read into this.

luftdieb commented 2 months ago

It seems, new version create different problem now. I'm using V2024.04.3 with latest HA version. Now, NodeRed report "[error] [api-call-service:PowerSwitch on] Call-service error. Modbus Error: [Input/Output] ERROR: No response received after 3 retries". If I enable debug information, I'm getting this output:

2024-04-14 20:16:30.544 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-04-14 20:16:30.544 DEBUG (MainThread) [custom_components.solax_modbus] Trying to connect to Inverter at 192.168.3.238:8899 2024-04-14 20:16:30.548 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.3.238:8899 2024-04-14 20:16:33.439 INFO (MainThread) [custom_components.solax_modbus.select] writing solismodbus select register 43007 value 190 2024-04-14 20:16:54.493 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-04-14 20:16:54.493 DEBUG (MainThread) [custom_components.solax_modbus] Trying to connect to Inverter at 192.168.3.238:8899 2024-04-14 20:16:54.497 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.3.238:8899 2024-04-14 20:17:06.249 INFO (MainThread) [custom_components.solax_modbus.select] writing solismodbus select register 43007 value 222 2024-04-14 20:17:28.481 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-04-14 20:17:28.481 DEBUG (MainThread) [custom_components.solax_modbus] Trying to connect to Inverter at 192.168.3.238:8899 2024-04-14 20:17:28.483 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.3.238:8899

Now I have the situation, I can't revert back to 2024.02.05, because HACS only allow to select last 5 versions, and so, oldest version I can select is 2024.03.7, which have also a problem with controlling PowerSwitch function :-( .

Beside this, fetching values works good as before :-)

What can I do ?

wills106 commented 2 months ago

image

wills106 commented 2 months ago

Are you trying to talk to the Inverter with this Integration and NodeRed at the same time?

luftdieb commented 2 months ago

Are you trying to talk to the Inverter with this Integration and NodeRed at the same time?

This could be the cause, which does not seem to be a problem in the older version. The interval in HA is set to 15 seconds and in NodeRed there is a cyclic check every 5 minutes and for testing, a manual trigger is also available. If HA and NodeRed colide, this can cause simultaneous access to the inverter.

wills106 commented 2 months ago

Modbus is only designed to have a single Mater and multiple slaves.

You have introduced two masters, so you have introduced collisions etc and you are trying to use Modbus in a way it's not designed to be used.

wills106 commented 2 months ago

The Solis Inverters aren't exactly Modbus compliant to begin with!

luftdieb commented 2 months ago

I did not give you full explaination about my NodeRed setup. It's not using a parallel Modbus communication to inverter. Instead I'm using with NodeRed the Solax entity of power switch, which perform the action over the existing solax-inverter modbus channel.

wills106 commented 1 month ago

Is this issue still relevant or has it been resolved now?

luftdieb commented 1 month ago

Thanks for asking. But unfortunately my NodeRed Flow, where I'm still just controlling the HomeAssistant Solax entity still report error with latest version of Solax (2024.05.3). Here are some outputs of NodeRed:

sent data : msg : object domain: "select" service: "select_last" data: object entity_id: "select.solis_modbus_power_switch" msg : string[92] "Call-service error. Modbus Error: [Input/Output] ERROR: No response received after 3 retries"

After enabling debugging I'm getting this output with trigger from NodeRed flow or also same via HA control instance image

2024-05-18 18:28:36.643 INFO (MainThread) [custom_components.solax_modbus.select] writing solismodbus select register 43007 value 190 2024-05-18 18:28:56.651 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-05-18 18:28:56.651 DEBUG (MainThread) [custom_components.solax_modbus] Trying to connect to Inverter at 192.168.3.238:8899 2024-05-18 18:28:56.659 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.3.238:8899 2024-05-18 18:28:57.600 INFO (MainThread) [custom_components.solax_modbus.select] writing solismodbus select register 43007 value 222 2024-05-18 18:29:17.788 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-05-18 18:29:17.788 DEBUG (MainThread) [custom_components.solax_modbus] Trying to connect to Inverter at 192.168.3.238:8899 2024-05-18 18:29:17.791 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.3.238:8899

That means, I'm really interested finding a solution :-) As you can see on the picture the instance is somehow or maybe just sometimes switching... But it's not reliable. If there is a chance to provide further debugging information, please let me know.