Netatmo integration stopped working after update

Hi,

after updating to 2022.9.6 two days ago my netatmo integration stopped working.

here my current system data:

Home Assistant 2022.9.6
Supervisor 2022.09.1
Operating System 9.0
Frontend 20220907.2 - latest

I have the following error messages in the log:

2022-09-22 15:00:51.649 INFO (SyncWorker_2) [homeassistant.loader] Loaded netatmo from homeassistant.components.netatmo

2022-09-22 15:01:17.496 ERROR (MainThread) [homeassistant.components.homekit] HomeKit Netatmo Kamera Flur cannot startup: entity not available: {'include_domains': [], 'exclude_domains': [], 'include_entities': ['camera.netatmo_kamera_flur'], 'exclude_entities': [], 'exclude_entity_globs': [], 'include_entity_globs': []}

2022-09-22 15:02:00.975 INFO (MainThread) [homeassistant.components.netatmo.config_flow] Successfully authenticated

2022-09-22 15:02:00.981 INFO (MainThread) [homeassistant.setup] Setting up netatmo

2022-09-22 15:02:00.981 INFO (MainThread) [homeassistant.setup] Setup of domain netatmo took 0.0 seconds

2022-09-22 15:02:04.519 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo

File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 153, in async_setup_entry

File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 108, in async_setup

File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 204, in subscribe

File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 164, in async_fetch_data

Before the update everything was working perfectly.
Meanwhile I even reinstalled the integration (I suppose that was a stupid idea). Anyone with some ideas?

Regards
Oliver

By the looks of it this is not the full error/backtrace. Please check the logs and provide the complete error message to debug this.

Hi,

when reloading Netatmo I get the following log lines:

2022-09-25 21:18:41.323 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('169.254.123.197', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 153, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 108, in async_setup
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 204, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 164, in async_fetch_data
    await self.data[signal_name].async_update()
  File "/usr/local/lib/python3.10/site-packages/pyatmo/camera.py", line 649, in async_update
    await self._async_update_all_camera_urls()
  File "/usr/local/lib/python3.10/site-packages/pyatmo/camera.py", line 659, in _async_update_all_camera_urls
    await self.async_update_camera_urls(camera_id)
  File "/usr/local/lib/python3.10/site-packages/pyatmo/camera.py", line 724, in async_update_camera_urls
    ] = await self._async_check_url(
  File "/usr/local/lib/python3.10/site-packages/pyatmo/camera.py", line 731, in _async_check_url
    resp = await self.auth.async_post_request(url=f"{url}/command/ping")
  File "/usr/local/lib/python3.10/site-packages/pyatmo/auth.py", line 335, in async_post_request
    async with self.websession.post(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 169.254.123.197:80 ssl:default [Connect call failed ('169.254.123.197', 80)]

The IP address appears strange?!

Regards
Oliver

Please reboot your cameras to solve this issue.

Hi, that really did the job, would you please be so kind and add some explanation? I don’t want to die stupid. How come the ****** camera is preventing the integration from loading?

Regards
Oliver

For some reason the API has an invalid IP address that can’t be resolved. Should this issue come back with the next version of HA I need to investigate this further. So far I was not able to reproduce this issue in any of my environments.

Hi, I have this topic quit often. Happy to help here out with logs. Even you don’t reboot the devices the problem will be fixed in 2 to 3 days.
I reboot my ha instance quit often in one day. The problem is occurring seasonal all few weeks.
Weather, 4 presence and 2 welcome. The welcome seem to be the problem, for a couple of weeks I had only weather and 3 presence online, there wasn’t any issue.
But at all I have no access to the lights (nabu casa Remote Access is in place).
Pls let me know if you need traces or something else in the moment of this error.
Happy to help!