home-assistant/core

Solax remains in initialization on reboot

DeltaFox0018 opened this issue · 8 comments

The problem

When I run the server restart, the Solax integration stays in the initialization state and then goes to error
I am forced to deactivate it, restart the server and reactivate it

What version of Home Assistant Core has the issue?

core-2023.8.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

solax

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solax

Diagnostics information

home-assistant_solax_2023-08-31T19-08-13.872Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-08-31 21:07:50.843 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry AA292C39 for solax
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/solax/__init__.py", line 18, in async_setup_entry
    api = await real_time_api(
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/__init__.py", line 35, in real_time_api
    i = await discover(ip_address, port, pwd)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 102, in discover
    await discover_state.discover(host, port, pwd)
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 81, in discover
    await asyncio.sleep(0.5)
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 639, in sleep
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError: Global task timeout
2023-08-31 21:07:50.855 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
2023-08-31 21:07:52.825 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback DiscoveryState._task_handler(<Task finishe...imeoutError()>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 57, in _task_handler
    result = task.result()
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 69, in _discovery_task
    await i.get_data()
  File "/usr/local/lib/python3.11/site-packages/solax/inverter.py", line 61, in get_data
    data = await self.make_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter.py", line 75, in make_request
    raw_response = await self.http_client.request()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter_http_client.py", line 55, in request
    return await self.post()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter_http_client.py", line 70, in post
    async with session.post(url, headers=self.headers, data=data) as req:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 894, in start
    with self._timer:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError
2023-08-31 21:07:52.841 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback DiscoveryState._task_handler(<Task finishe...imeoutError()>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 57, in _task_handler
    result = task.result()
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/discovery.py", line 69, in _discovery_task
    await i.get_data()
  File "/usr/local/lib/python3.11/site-packages/solax/inverter.py", line 61, in get_data
    data = await self.make_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter.py", line 75, in make_request
    raw_response = await self.http_client.request()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter_http_client.py", line 55, in request
    return await self.post()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solax/inverter_http_client.py", line 70, in post
    async with session.post(url, headers=self.headers, data=data) as req:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 894, in start
    with self._timer:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError

Additional information

No response

Hey there @squishykid, mind taking a look at this issue as it has been labeled with an integration (solax) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of solax can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign solax Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


solax documentation
solax source
(message by IssueLinks)