Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when switching to off grid mode #226

Open
leonw1090 opened this issue Nov 29, 2023 · 4 comments
Open

Error when switching to off grid mode #226

leonw1090 opened this issue Nov 29, 2023 · 4 comments

Comments

@leonw1090
Copy link

Hi all!

I have the following error when switching to off grid mode. I want to force my goodwe to go off grid to protect the house from power spikes.

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:230
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: November 24, 2023 at 4:25:57 PM (2 occurrences)
Last logged: 7:29:27 PM

[140089903690944] ('No valid response received even after 5 retries', 1)
[140089710700352] ('No valid response received even after 5 retries', 1)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/goodwe/inverter.py", line 132, in _read_from_socket
result = await command.execute(self.host, self.timeout, self.retries)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/goodwe/protocol.py", line 109, in execute
await response_future
goodwe.exceptions.MaxRetriesException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 106, in async_select_option
await entity.async_select_option(option)
File "/config/custom_components/goodwe/select.py", line 136, in async_select_option
await self._inverter.set_operation_mode(
File "/usr/local/lib/python3.11/site-packages/goodwe/es.py", line 305, in set_operation_mode
await self._set_offgrid_mode()
File "/usr/local/lib/python3.11/site-packages/goodwe/es.py", line 364, in _set_offgrid_mode
await self._set_relay_control(3)
File "/usr/local/lib/python3.11/site-packages/goodwe/es.py", line 414, in _set_relay_control
await self._read_from_socket(Aa55ProtocolCommand("03270200" + "{:02x}".format(param), "03B7"))
File "/usr/local/lib/python3.11/site-packages/goodwe/inverter.py", line 137, in _read_from_socket
raise RequestFailedException(f'No valid response received even after {self.retries} retries',
goodwe.exceptions.RequestFailedException: ('No valid response received even after 5 retries', 1)

@tinuva
Copy link

tinuva commented Nov 30, 2023

I get the same error on the 5048ES.

The service is able to successfully set off-grid mode on the inverter, but because of this error, the integration still think the inverter is in the previous mode (eg. general or eco mode). So if you want to go back to the previous mode, you have to set another mode first. Eg. if you were in general and offgrid mode, you first have to set it to eco, then you can set it back to general to leave offgrid mode.

@mletenay
Copy link
Owner

Is it just problems of reliability of the commands ? (In that case increasing retry-count might help).
Or is it problem that the call to _set_relay_control always fails with your firmware version ?

@leonw1090
Copy link
Author

leonw1090 commented Dec 21, 2023 via email

@robotz0mbie
Copy link

I get the same problem on 5048ES, as @tinuva mentioned change to eco first then normal works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants