core: Error setting up entry Home Assistant Cloud for netatmo since 2022.3
The problem
Since the 2022.3 update, the Netatmo integration didn’t work. After a delete/reinstall here is the issue. I have one camera and several temperature sensors.
For information the IP address 169.254.214.58 doesn’t mean anything, my local IP range is 192.168.x.x
What version of Home Assistant Core has the issue?
core-2022.3.0
What was the last working version of Home Assistant Core?
core-2022.2.9
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Netatmo
Link to integration documentation on our website
https://www.home-assistant.io/integrations/netatmo/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:166
First occurred: 17:35:38 (2 occurrences)
Last logged: 19:19:07
Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
File "/usr/local/lib/python3.9/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.9/asyncio/base_events.py", line 1056, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
return await fut
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('169.254.214.58', 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 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 144, 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 210, in register_data_class
await self.async_fetch_data(data_class_entry)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 166, in async_fetch_data
await self.data[data_class_entry].async_update()
File "/usr/local/lib/python3.9/site-packages/pyatmo/camera.py", line 649, in async_update
await self._async_update_all_camera_urls()
File "/usr/local/lib/python3.9/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.9/site-packages/pyatmo/camera.py", line 724, in async_update_camera_urls
] = await self._async_check_url(
File "/usr/local/lib/python3.9/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.9/site-packages/pyatmo/auth.py", line 335, in async_post_request
async with self.websession.post(
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 535, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/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.214.58:80 ssl:default [Connect call failed ('169.254.214.58', 80)]
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 230 (52 by maintainers)
Since I haven’t had any commits to 2022.4 so far the issue most certainly is not the integration itself.
Still the error for me
Good news for this issue besides all the possible solutions and workarounds presented. Thank you to everyone trying to mitigate this issue for others by sharing their way to handle this 👍🏼 @cgtobi and I were working on a fix and at least for my environment with a LOT of cameras and Netatmo devices it is working now with the fix linked above in
pyatmo. Basically I was just the tester, but hey, someone has to do the job and I am happy we have not to wait for the corporate to fix this one for us which normally does not happen or very slow if ever 😉The issue persists in 2022.4.6
@cgtobi I’ve added a thumb down reaction to your comment too. It doesn’t mean that I blame you or anyone else about any kind of “fault”. It just reaction to the comment that reads as a denial of the existing problem. Hopefully, you didn’t mean that. Those who are affected by this issue hope to see that someone with the knowledge is looking into the issue and, I believe, willing to help you as much as they can including me.
As I updated to the last version, I decided to dig in as it still fails. HA running in a docker container on a 8 bay nas, with multiple gbits ports. I checked the reported failing ip address and looked on the available interfaces. (
ifconfig -a) It corresponds to a bridge that does not have a linked interface. (brctl show; docker network ls) Looking more, it seems that that bridge was created by docker but is somehow orphan. I decided to delete it (ip link delete br-xxxxxxxxx type bridge) and restart HA, everything is working again. Hope it can help.I think the Issue is on an external component that your integration is calling and in the last dev version someone fixed.
Just my 5 cents
On Wed, 23 Mar 2022 at 18:12, Tobias Sauerwein @.***> wrote:
Just to make sure, everyone of you that is having this issue is using the HA Cloud Link option for the Netatmo integration?
No data are available on any sensors and the integration says “configuration failure. check the log”. I pasted the log in the original ticket.
@herzogt good to know. So, maybe a good idea to have a bunch of them “in stock” when you’re a camera owner.
Just a brief update from my setup - the issue disappeared after replacing the camera’s SD card. The integration is running fine for > 6 weeks now. Netatmo support checked the camera logs and saw a lot of vpn connection stability issues which seem to be related to a defective SD card. Some of the temporary system information are stored on the SD card as well, which may cause issues when writing to the card fails. In case anyone wants to give it a try - search for “MicroSD card pack” on Netatmo shop.
@wtaferner Thanks, found it. Yes, I am with you on this. It should at least be handled more gracefully and fallback to using the VPN address. Would you be be cool to run custom code or even do some code changes yourself? Feel free to ping me on Discord.
No problem. I’ll keep an eye out.
Can confirm the same issue with a Netatmo camera running firmware_revision 3010000 and HA 2022.7.7. Digging a bit on the Netatmo side shows that from time to time the API returns the wrong
local_urlattribute for the cam which breaks the integration. I verified the issue by retrieving the camera’slocal_urlby addingcommand/pingto thevpn_urlfrom the API’s/homestatusdata, e.g.:https://prodvpn-eu-9.netatmo.net/restricted/10.255.39.24/xxxxxxxx/MTU4NrXXX,,/command/pingThe response shows the brokenlocal_urlwith the 169.X.X.X IP address:{'local_url': 'http://169.254.233.145/6a9XXXXXXXXXXXX', 'product_name': 'Welcome Netatmo'}Power cycling the device resolves the issue for some time.
(for further information about the Netamo API commands check video-access I’m currently waiting for feedback from Netatmo support for this, but it seems to be an issue with the cams
local_urldata - at least for my setup@Cully81 thanks for the tip. I have been having this issue for 3 weeks. Restarted Netatmo weather, presence, welcome and then hassio and everything works fine now. Looks like a restart of the devices solve this issue
@cgtobi no, all devices are in the same LAN.
@Friedrieck maybe that is a good hint:
I have restarted my HA, router and firewall several times in the last days. All without success.
After your tip I did the following today:
Restarted my two Netatmo Presence and restarted my HA: Error persists.
Restarted my Netatmo Welcome and restarted my HA: Error persists.
Restarted my two Netatmo Presence, the Netatmo Welcome and restarted my HA: error persists
Restart my Netatmo Weather Base and restart my HA: error persists
Restarting my two Netatmo Presence, the Netatmo Welcome, the Netatmo Weather Base and restarting my HA: Error no longer exists!
Of course, this may have happened by chance?! But only after I restarted all Netatmo devices and after that my HA, it runs again.
Maybe someone else can verify this?
I assume, yes, it was more for the rest of the audience. As mentioned by @tunisiano187 before, these problematic IPs are APIPA ones (169.254…), which means, AFAIK, that the device could not get a proper IP address. Now, why?
The issue gone away also at my side but I changed nothing, no HA version update or changes in my configuration. After restart Netatmo reconnect now without problems. Maybe the problem was at Netatmo side
Hello, It now works again for me, even after multiple HA restarts. Here what I did:
After doing that all my devices appeared available again providing all the informations.
I hope it may help you too.
I have the same problem on 2022.5.5, Home Assistant Supervisor 2022.05.3, Home Assistant OS 8.1 It started with 2022.5.5 with Error setting up entry Configuration.yaml for netatmo.
I have reinstall it and somethimes it work but after short time the cameras error out in the stream and when I restart HA the error is back. Error setting up entry Configuration.yaml for netatmo
@cgtobi I use configuration.yaml with a weather station and a presence outdoor camera.
Even removing rebooting, and adding it again doesn’t solve the problem.
I have v2 but to be honest, I don’t believe that the problem ist caused in that way. Firstly I can’t say that the devices are disconnected between the reportings. Furthermore I have fixed IPs; how could this be a impact?
Nope. I updated to core-2022.4.7 right now and it is still the same error.
So if I get the post about the IP Address right, this is a local Address. @cgtobi could you reproduce the problem? As I wrote my steps where:
And there was the error!
Well the weatherstation, valves and camera are still available via app. The camera is also still available as a generic camera. The webhooks doesn’t seem to work either.
Does anything else work as expected? If so, please open a separate issue as this seems different.
@buhito81 please remove the integration, restart HA and re-install the integration again.
the version DEV published recently is working fine! “Home Assistant 2022.4.0.dev20220323”
OK, I made a backup, I’m ready. I will update tomorrow when I get home from work. Tell me what informations you want (logs, integration logs…) Regards
@cgtobi, yes i can do that. it’s possible… What should I do exactly? just upgrade to 2022.03? I’am with core core-2022.2.9 and Netatmo work fine in this version… HA propose me to upgrade now in core 2022.3.6. (i will juste make a backup before ;- ))
As I wrote before, I already had similar issues in the past with my Presence cameras. The novelty here is that the whole Netatmo integration was not set up.
But in the past, I solved my issues with the Presence cameras by rebooting them individually (power off and on), then rebooting HA.
So, for those still having the behaviour in this issue, maybe try that (if not already done)?
If I restart my router (and obtain a new external IP address), the Netatmo integration works again. (without rebooting HA)
Still, the Netatmo integration seems to run well on HA core 2022.2.9 and 2022.2.8 (which are my backups versions).
Restarting the host didn’t help.
You can try with this method. With the update version of HA it’s work for me
https://www.home-assistant.io/integrations/netatmo/#development–testing-with-your-own-client-id
Same for me and if i restore the backup made before the upgrade Netatmo still doesn’t work.
Edit: i rostore to the previous version and deleted netatmon integration. Instaal the new version and then install again the netatmo integration and everythings works now
(netatmo with configuration.yaml)
Same here! It is the entire integration failing (climate, weather, cameras). I also note there is no ‘reload’ option in the integration box menu. There is no option to download the diagnostics either. I had issues of this kind in the past, but it was limited to the Presence cameras. If it is the same cause, then now it affects the entire integration setup. Log: