core: Error setting up entry SMA Solar for sma

The problem

SMA Solar integration is not starting.

What version of Home Assistant Core has the issue?

core-2022.2.0

What was the last working version of Home Assistant Core?

core-2021.12.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SMA Solar

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/sma/__init__.py:54
First occurred: 12:03:30 (1 occurrences)
Last logged: 12:03:30

Error setting up entry SMA Solar for sma
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 327, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sma/__init__.py", line 54, in async_setup_entry
    sma_device_info = await sma.device_info()
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 362, in device_info
    await self.read(self._device_info_sensors)
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 292, in read
    result_body = await self._read_body(URL_VALUES, payload)
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 205, in _read_body
    await self.new_session()
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 247, in new_session
    body = await self._post_json(URL_LOGIN, self._new_session_data)
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 177, in _post_json
    return await self._request_json(hdrs.METH_POST, url, **params)
  File "/usr/local/lib/python3.9/site-packages/pysma/__init__.py", line 118, in _request_json
    async with self._aio_session.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 559, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 913, in start
    self._continue = None
  File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Most upvoted comments

That’s in interesting workaround for the issue, @rwinjanssen ! Thanks for sharing! Hopefully someone can fix the issue in HomeAssistant with this information (I’m not a programmer myself so don’t have the sufficient skills to look at it I’m afraid). I’ll see whether I might be able to use your fix as well with that reverse proxy to remedy it in the mean time.