home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.27k forks source link

Netatmo webhooks and lights unavailable. #116752

Open djfanatix opened 2 weeks ago

djfanatix commented 2 weeks ago

The problem

Since the update to 2024.5.x Netatmo webhooks and lights don't work anymore. (they keep marked as offline) They have been working fine for long time.

What version of Home Assistant Core has the issue?

core-2024.5.1

What was the last working version of Home Assistant Core?

core-2024.4.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Netatmo

Link to integration documentation on our website

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

Diagnostics information

home-assistant_netatmo_2024-05-04T07-12-34.322Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-05-04 09:11:57.403 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 350, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x03'
      ^

Additional information

I did try:

home-assistant[bot] commented 2 weeks ago

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

Code owner commands Code owners of `netatmo` 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 netatmo` 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)


netatmo documentation netatmo source (message by IssueLinks)

cgtobi commented 2 weeks ago

There are too many errors in that log to make reliable sense of it, especially since many com from custom components. I doubt that the excerpt is related to the Netatmo webhook.

djfanatix commented 2 weeks ago

Sorry, I put the wrong log, I edited a log and I have replaced it

propi62 commented 1 week ago

Same problem

Alomon31 commented 1 week ago

Same problem here. Reported on HA forum by other users as well: https://community.home-assistant.io/t/how-to-setup-netatmo-integration-using-webhooks-to-speed-up-device-status-update-response-times/385898/15 and https://community.home-assistant.io/t/netatmo-camera-light-issue-since-2024-05/724560/3

nrenou-git commented 1 week ago

problem seems to be on netatmo side. Dev portal is not woking for more than a week for me. dev Apps stays "desactivated" https://helpcenter.netatmo.com/hc/fr/community/posts/18630944611730-Dev-portal-issues

Alomon31 commented 6 days ago

True. Does anyone know a solution to continue using Netatmo integration fully on Home Assistant? Thanks

djfanatix commented 6 days ago

I think once you have the key, you can send local commands to the ip address of your camera.

crazykiwi2003 commented 3 days ago

Same problem here - lights unavailable... :-(

nrenou-git commented 3 days ago

netatmo dev website is working again, but i m still not getting any data from the webhooks lights entities unavailable from presences cameras and no data from the welcome camera ( tags detectors etc ... )

log info : service call : unregister webhook 2024-05-15 09:37:59.994 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 71 2024-05-15 09:38:06.168 DEBUG (MainThread) [homeassistant.components.netatmo] Unregister Netatmo webhook (d0...) 2024-05-15 09:38:06.168 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook unregistered 2024-05-15 09:38:06.291 DEBUG (MainThread) [pyatmo.auth] dropwebhook: <ClientResponse(https://api.netatmo.com/api/dropwebhook) [200 OK]> <CIMultiDictProxy('Server': 'nginx', 'Date': 'Wed, 15 May 2024 07:38:06 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, must-revalidate', 'Expires': '0', 'X-XSS-Protection': '1; mode=block', 'Access-Control-Allow-Origin': '*', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Powered-By': 'Netatmo', 'Content-Encoding': 'gzip')> 2024-05-15 09:39:01.218 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 71 2024-05-15 09:40:00.288 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 74 2024-05-15 09:40:25.342 DEBUG (MainThread) [homeassistant.components.netatmo] Unregister Netatmo webhook (d0...) 2024-05-15 09:40:25.342 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook unregistered 2024-05-15 09:40:25.443 DEBUG (MainThread) [pyatmo.auth] The Netatmo API returned b'{"error":{"code":7,"message":"Nothing to drop"}}' (406) 2024-05-15 09:40:25.443 DEBUG (MainThread) [homeassistant.components.netatmo] No webhook to be dropped for d0...

service call : register webhook 2024-05-15 09:42:01.825 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 72 2024-05-15 09:42:02.331 DEBUG (MainThread) [pyatmo.auth] addwebhook: <ClientResponse(https://api.netatmo.com/api/addwebhook) [200 OK]> <CIMultiDictProxy('Server': 'nginx', 'Date': 'Wed, 15 May 2024 07:42:02 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, must-revalidate', 'Expires': '0', 'X-XSS-Protection': '1; mode=block', 'Access-Control-Allow-Origin': '*', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Powered-By': 'Netatmo', 'Content-Encoding': 'gzip')> 2024-05-15 09:42:02.332 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://hooks.nabu.casa/gAAA...

Alomon31 commented 3 days ago

I've got webhooks working here again, did you try to regenerate your client id+secret? Then delete your integration and your credential information in HA, and set it up again. But my lights are still unavailable after multiple reboots and hours waiting... Any help?

nrenou-git commented 3 days ago

Yes i did all this, still the same, no data from netatmo servers.

RealGandy commented 3 days ago

Same issue here.

Cameras and webhooks are back but light is still showing as unavailable.

As the integration between HA and Netatmo is owned by HA, can someone do some investigations into what request is made and what response is expected for the light to be active again?

Or share info with consumers so we can approach Netatmo directly with evidence of what is going wrong.

Cheers

Alomon31 commented 1 day ago

According to Netatmo dev team (https://helpcenter.netatmo.com/hc/fr/community/posts/18630944611730/comments/18981824506258), the issue is now on HA side. @cgtobi , would you mind having a look at it? Thank you very much.