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

[Bug]: unable to write via modbus (tcp / rtu) #881

Open johnnyhero83 opened 1 month ago

johnnyhero83 commented 1 month ago

Describe the bug

For some reason I cannot not write into entity via solax modbus (tcp or rtu - doesnt matter). This is very new behaviour, it was normally working for few years now. But few days ago I updated HA core / system plus HACS custom intergation and this is not working now.
I tried to "unlock inverter" as this is stated in FAQ. The problem is there is no "unlock inverter" button as stated in FAQ. Where do I find this "button". There is only entity in integration that is called "solax lock state". But this entity cannot be changed via modbus if writing is not working. How do I access this entity to change it into unlock not using modbus? And will this help in order to be able able to write into entities after this one is set to "unlock"? Or this is nothing related to this issue?

Integration Version

2024.04.3

Homeassistant core version

2024.4.4

Inverter brand

Solax X3 Hybrid G4

Plugin used

plugin_solax.py

Serial prefix

H34A10

Inverter firmware versions

DSP 1.39 ARM 1.38

Connection Method

Solax dongle 3

Dongle firmware

V3.001.02

Detailed Error Log

Logger: homeassistant.components.websocket_api.http.connection Zdroj: components/websocket_api/commands.py:239 integrace: Home Assistant WebSocket API (dokumentace, problémy) První výskyt: 17:42:07 (1 výskyty) Naposledy logováno: 17:42:07

[547669662016] Modbus Error: [Input/Output] ERROR: No response received after 3 retries Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 112, in async_set_value await entity.async_set_native_value(native_value) File "/config/custom_components/solax_modbus/number.py", line 151, in async_set_native_value await self._hub.async_write_register( File "/config/custom_components/solax_modbus/init.py", line 512, in async_write_register return await self.async_lowlevel_write_register(unit, address, payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 504, in async_lowlevel_write_register resp = await self._client.write_register(address, payload[0], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 183, in async_execute raise ModbusIOException( pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] ERROR: No response received after 3 retries

Additional context

Thank you

matomatusov commented 1 month ago

Hi, @wills106 For writing, it is necessary to send the value 1AD4(hex) or 6868(dec) to the converter to the write single register 06x0000 right from the start and it will be unlocked. Is this the case in your integration?

johnnyhero83 commented 1 month ago

Hi, @wills106 For writing, it is necessary to send the value 1AD4(hex) or 6868(dec) to the converter to the write single register 06x0000 right from the start and it will be unlocked. Is this the case in your integration?

Ok, thanks. Can you post some manual for dumnies how to do it? I am using integration but I dont interfere with separate registres nor I dont know where to find them and change them…. So some link to something could help. I tried to search, but not really were sucessful

wills106 commented 1 month ago

The button has changed to a select. As you get feedback if it's locked or not.

I am guessing it's showing as locked on your Inverter?

image

wills106 commented 1 month ago

I have updated the Docs in 2024.05.3 Can you close the issue down if that solves the issue.

johnnyhero83 commented 1 month ago

The button has changed to a select. As you get feedback if it's locked or not.

I am guessing it's showing as locked on your Inverter?

image

Thanks. The problem was the field was not responding. It was not possible to call the action “Unlocked” Not sure if this problem was related to recent issues with integration or not. But it was not possible to change that field