New Netatmo integration

Think I was clutching at straws with the ZHA/Plex thing. Still the problem.

System load is fine, booting - CPU is around 30%, RAM at 5%, disk 22%.

Current Core log, there is a critical error this time, related not sure. You can see my custom integrations this time…

[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
2021-09-22 21:39:50 CRITICAL (SyncWorker_34) [concurrent.futures] Exception in worker
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 75, in _worker
    work_item = work_queue.get(block=True)
SystemExit
2021-09-22 21:40:00 CRITICAL (SyncWorker_4) [concurrent.futures] Exception in worker
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 75, in _worker
    work_item = work_queue.get(block=True)
SystemExit
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2021-09-22 21:40:55 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration presence_simulation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration argon40 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration browser_mod which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:40:55 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration astroweather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-22 21:41:48 INFO (MainThread) [homeassistant.components.netatmo.camera] Cameras are currently not supported with this authentication method
2021-09-22 21:41:48 INFO (MainThread) [homeassistant.components.netatmo.light] Cameras are currently not supported with this authentication method
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class AsyncCameraData added
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.camera] Adding cameras []
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class AsyncHomeData added
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.select] Adding climate schedule select entities [<Entity Netatmo House: Default>]
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No device data available
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class AsyncWeatherStationData added
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No device data available
2021-09-22 21:41:52 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class AsyncHomeCoachData added
2021-09-22 21:43:04 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] 
2021-09-22 21:43:04 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class AsyncHomeStatus-595df4b8xxxxxxxxxx added
2021-09-22 21:43:04 DEBUG (MainThread) [homeassistant.components.netatmo.climate] Adding climate devices []
2021-09-22 21:43:26 DEBUG (MainThread) [homeassistant.components.netatmo] Unregister Netatmo webhook (80a3a59af2df20095xxxxxxxxxxx)
2021-09-22 21:43:26 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook unregistered
2021-09-22 21:43:32 DEBUG (MainThread) [homeassistant.components.netatmo] No webhook to be dropped for 80a3a59afxxxxxxxxxx

System load is more than just CPU and RAM, it is actually more related to IO “preassure”. My impression is that the load is high and for some reason causes the Netatmo integration to fail. I need to investigate this.

OK Thank you Tobi. It is very random when entities appear as unavailable. Still seeing them sadly…
image

Do you recommend a local heating control solution? :slight_smile: :joy:

Have been thinking about ditching my Netatmo stuff for a local control.

You in the uk?

No, I’m from Germany. But you can try to control the Netatmo devices via HomeKit. I haven’t tried this myself but it is supposed to work.

Cool. Will look into Homekit if there is a local hook, thanks.

Busy day for me today…off to bed. Night!

Hi Tobi…I’ve seen something similar over the past month or so (similar to what’s described in the last few posts).
Nothing “odd” in the logs but if it helps it’s only the Climate side of things that shows as Unavailable for me. I’ve a full Weather Station and all entities/sensors for this load first time every time. The two climate devices I have sometimes won’t load after reboot but 90% of the time once I reload the component they load and are back available. Anecdotally this seems to happen less regular in the last couple of weeks with 2021.9.7 and OS 6.4 (all on a 4Gb Pi4 with SSD)

If you need logs or anything else to help let me know…

With regards to the Netatmo integration hardly anything has changed. Nonetheless I’ll check how to reproduce this.

1 Like

Sane here,
netatmo is unabalianble until a reboot.

It was runing fine for months, and since one of latest update, its unabaliable randombly.

If possible I’d kindly ask you to downgrade to a version that is working for you (reliably) and report back. This would greatly help finding the issue since nothing major has changed for the Netatmo integration in .9 or even .8.

Hey Tobi,

Downgraded to Core 2021.7.4 (was meaning to do this because of status issues relating to my Z-wave js lock), anyways…rebooted 5 times and Netatmo loaded up perfectly every time!!

This was before the introduction of the Energy integration, this doesn’t effect me so much.

Hope this helps!

Fyi, Core 2021.8 and higher resulted in UNAVAILABLE Netatmo entities also.

Rolled backed to stable 2021.7.4 and Netatmo loads fine.

**edit: DOH! Think I’ve found the cause.
Had a entity fail after setting up ‘Configure’ menu for public weather sensors on 2021.7.4. (something I was using previously).
Removed public weather sensor setup and normal entities loaded fine when rebooting 5+ times. :man_shrugging:

image

But that is still on 2021.7.4 or even with the 2021.8.* or 2021.9.* releases?

Public weather sensor, Yes but when Area name is configured it seemed to break Netatmo after reboot.
Generally the Netatmo integration appears fragile my end but more reliable after reboot on 2021.7.4.

However, last night the Internet went out for 15mins (very rare) and entities went to UNAVAILABLE but didn’t recover when internet came on!

My Homekit investigation came to a bump, found out my thermostat/relay is not Homekit compatible, to old… shame!

Fyi, I’m still fighting with this UNAVAILABLE entity and not finding a fix.
Either something is bad with the integration or changes Netatmo have made are not reflected in to HA.

If my router is turned off or in a reboot or Internet is down entities will become UNAVAILABLE and not recover - no errors in log while this happens.
Way back Netatmo did recover after 5/10 minutes.

If you can look into this I would be grateful.
If you are using the Cloud Netatmo integration, are you not seeing these issues?

I have even back dated my HassOS to 5.13 to see what happens…no difference.

Only see this error on startup and empty entities:

Logger: homeassistant
Source: components/netatmo/__init__.py:198
First occurred: 12:44:37 (1 occurrences)
Last logged: 12:44:37

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 198, in register_webhook
    await hass.data[DOMAIN][entry.entry_id][AUTH].async_addwebhook(webhook_url)
  File "/usr/local/lib/python3.9/site-packages/pyatmo/auth.py", line 351, in async_addwebhook
    resp = await self.async_post_request(WEBHOOK_URL_ADD, {"url": webhook_url})
  File "/usr/local/lib/python3.9/site-packages/pyatmo/auth.py", line 306, in async_post_request
    async with self.websession.post(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 619, in _request
    break
  File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 656, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

Ok, so this happens specifically after a network disconnect. This gives me a clue. I’ll take a look shortly.

Yes it seems to. Thank you.

I have a Pi-hole setup on my network, was going to look at that next. Don’t think it would interfere though…just Ad blocking. :slight_smile:

I did reboot my router today to see if this has any effect on my “prod” instance but it didn’t. I’d be really curious if the pi-hole has any effect.

Just to get the whole picture, what version are you currently running? When do the entities become unavailable? Right from the start, after a while and/or certain events?

Could I ask you to try the latest beta?

Morning,

To rule out the pi-hole, I have forced DNS (8.8.8.8) on thedevice HA is running on, then rebooted Host.
Before however there were no blocks seen in pi-hole log under the HA device, ‘api.netatmo.com’ was going through as ‘ok’.

I’m running core-2021.9.7

My scenario even after core/pi-hole/re-install changes…

Reboot = (High possibility) UNAVAILABLE
Internet/Router disconnect = UNAVAILABLE
Netatmo relay disconnect = UNAVAILABLE

If I manage to get a connection to the cloud via Netatmo and entities appear, if any of the above happens, entities do not recover.

Strangely though, some entities when using Netatmo public weather sensor # (setup via CONFIGURE) survive and update. This is not a device used locally by me though.

I’ll try the BETA connect if we get nowhere.

Need to get this sorted, starting to get cold now!! :slight_smile:

Question for you…

Would having NINE Netatmo thermostats slow things down and be causing the ENTITY UNAVAILABLE? I’m using multiple radiator valve thermostats with the additional main stat.

Bet not many people are doing the same as me AND using HA. Just wondering.

Don’t know, I have two thermostats and 3 valves, they sometimes become unavailable in HA, but it usually come back online without doing anything.
However, even when everything is working, the sync between HA and Netatmo cloud is very slow. In example, it takes one minute for the OFF command in HA to be applied in the Netatmo app and to the thermostat.