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

APSysttem integration - solar_max_output update fails with TimeoutError #121419

Closed
alfwro13 opened this issue Jul 7, 2024 · 8 comments
Closed

Comments

@alfwro13
Copy link

alfwro13 commented Jul 7, 2024

The problem

This error is logged every 30 seconds at night when the inverter is offline:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1025, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1122, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1104, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1007, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.100', 8050)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/apsystems/number.py", line 48, in async_update
    self._attr_native_value = await self._api.get_max_power()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/__init__.py", line 239, in get_max_power
    response = await self._request("getMaxPower")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/__init__.py", line 86, in _request
    async with ses.get(url, timeout=self.timeout) as resp:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 581, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 944, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1257, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1226, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1033, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.100:8050 ssl:default [Connect call failed ('192.168.1.100', 8050)]````

### What version of Home Assistant Core has the issue?

core-2024.7.1

### What was the last working version of Home Assistant Core?

core-2024.6.x

### What type of installation are you running?

Home Assistant OS

### Integration causing the issue

APSystems

### Link to integration documentation on our website

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

### Diagnostics information

_No response_

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
see above
```


### Additional information

_No response_
@home-assistant
Copy link

home-assistant bot commented Jul 7, 2024

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

Code owner commands

Code owners of apsystems 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 apsystems Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


apsystems documentation
apsystems source
(message by IssueLinks)

@mawoka-myblock
Copy link
Contributor

That's strange as I can't replicate it in my setup

@alfwro13
Copy link
Author

alfwro13 commented Jul 7, 2024

My logs are flooded with that error after sunset and they stop at sunrise (so basically when the the inverter goes offline at night)

@casa-feuer
Copy link

Hello,
i have also problems with the max_output value:
Since changing from HACS to main HA Plugin, i can not see or set the max_output anymore.
The value and input field are missing.
But i also have that errors in my logfile.

Regards Johannes

Logger: homeassistant.helpers.entity
Quelle: helpers/entity.py:944
Erstmals aufgetreten: 9. Juli 2024 um 21:26:03 (8860 Vorkommnisse)
Zuletzt protokolliert: 18:38:16

Update for number.ez1fassaderechts_maximale_leistung fails
Update for number.ez1garagelinks_maximale_leistung fails
Update for number.ez1mbalkonrechts_maximale_leistung fails
Update for number.ez1mbalkonlinks_maximale_leistung fails
Update for number.ez1fassadelinks_maximale_leistung fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/apsystems/number.py", line 48, in async_update
self._attr_native_value = await self._api.get_max_power()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/init.py", line 239, in get_max_power
response = await self._request("getMaxPower")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/init.py", line 86, in _request
async with ses.get(url, timeout=self.timeout) as resp:
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 608, in _request
await resp.start(conn)
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 971, in start
with self._timer:
File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in exit
raise asyncio.TimeoutError from None
TimeoutError

@casa-feuer
Copy link

After installing the latest HA Update (7.2) the Input field ist available again.
But still timeout Errors:
Logger: homeassistant.helpers.entity
Quelle: helpers/entity.py:944
Erstmals aufgetreten: 20:37:37 (1812 Vorkommnisse)
Zuletzt protokolliert: 22:51:11

Update for number.ez1fassadelinks_maximale_leistung fails
Update for number.ez1garagelinks_maximale_leistung fails
Update for number.ez1fassaderechts_maximale_leistung fails
Update for number.ez1mbalkonlinks_maximale_leistung fails
Update for number.ez1mbalkonrechts_maximale_leistung fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/apsystems/number.py", line 48, in async_update
self._attr_native_value = await self._api.get_max_power()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/init.py", line 239, in get_max_power
response = await self._request("getMaxPower")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/APsystemsEZ1/init.py", line 86, in _request
async with ses.get(url, timeout=self.timeout) as resp:
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 507, in _request
with timer:
File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in exit
raise asyncio.TimeoutError from None
TimeoutError

@mawoka-myblock
Copy link
Contributor

mawoka-myblock commented Jul 10, 2024

The error is unhandled intentionally as it shouldn't occur, but it's produced by the inverter, not the integration. And as I've already mentioned, I can't replicate the issue and for me, the issue is closed. Sorry for that. I've just checked personally and the TimeoutError pops up ~5 times a day and that's nothing to worry about.

@mawoka-myblock
Copy link
Contributor

@home-assistant close

@mawoka-myblock
Copy link
Contributor

@home-assistant rename APSysttem integration - solar_max_output update fails with TimeoutError

@home-assistant home-assistant bot changed the title APSysttem integration - solar_max_output update fails error APSysttem integration - solar_max_output update fails with TimeoutError Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants