Netatmo in HA 0.105

Hello!

had a netatmo thermostat working until 0.107.1 version. Today I have updated to 0.111 and suddenly it stopped working.

I saw that there were breaking changes, something related to webhooks, and those only works in ports 443 and 80. Those webhooks are not for the thermostat (the only netatmo device that I have).

In my setup, I am using duckdns with port forwarding, and I use the port 8123 to access my HA instance, and I don’t want to change the port, because I had to change a lot of stuff, and also those ports are busy.

I have tryied to remove the integration and set up again, It looks like it connects properly to my netatmo dev account, but I doesn’t find any device,

The only error that I have is

Copy to clipboard

Logger: pyatmo.thermostat
Source: components/netatmo/climate.py:470
First occurred: 21:20:12 (1 occurrences)
Last logged: 21:20:12

Errors in response: {'status': 'ok', 'time_server': 1593285613, 'body': {'home': {'id': 'some id'}, 'errors': [{'code': 6, 'id': 'a mac address'}]}}

I have my client id and secret properly configured in configuration.yaml

Someone can point me how can I solve this without changing the ports if possible?

same here, suddenly yesterday after a non related reboot the integration stopped working.
I was already on the latest HA version…

File “/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 946, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 400, message=’’, url='https://api.netatmo.com/oauth2/token

resetted the key’s on dev.netatmo.com, also created a new app there.
All doesn’t help

Do you have your public url with the port 80 or 443? I think that this is my issue but I would like to confirm

  1. i removed the integration and after re-adding everything is fine again…

I have made available my HA instance in the port 443 and I still have the issue. Maybe @cgtobi can help?

The integration connects fine with netatmo, and gets registered (through config.yml)
The webhooks are not banned
I see in the logs:

2020-06-28 14:26:37 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://home.xxxxx.duckdns.org/api/webhook/[a id]

If I access trough browser, It says 405: Method Not Allowed (dunno if I need more params and call from any API client)

I don’t have netatmo error logs. This are the other logs with “netatmo” string. logger set as “info”. Should I look for another thing?

	Line 175: 2020-06-28 14:26:10 INFO (MainThread) [homeassistant.setup] Setting up netatmo
	Line 185: 2020-06-28 14:26:11 INFO (MainThread) [homeassistant.setup] Setup of domain netatmo took 0.1 seconds.
	Line 438: 2020-06-28 14:26:12 INFO (MainThread) [homeassistant.components.camera] Setting up camera.netatmo
	Line 439: 2020-06-28 14:26:12 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.netatmo
	Line 447: 2020-06-28 14:26:12 INFO (MainThread) [homeassistant.components.climate] Setting up climate.netatmo

I don’t see more things than

Errors in response: {'status': 'ok', 'time_server': 1593354373, 'body': {'home': {'id': 'a id'}, 'errors': [{'code': 6, 'id': 'a mac'}]}}

No entities in the component.

I am out of ideas now, what can I do or look for?

My setup is Home Assistant (not hassio), in a python env, port 443 forwarded to 8123 in the router. No reverse proxy, and this is my http is

http:
  ssl_certificate: HIDDEN AND WORKING
  ssl_key: HIDDEN AND WORKING
  base_url: https://home.xxxx.duckdns.org
  server_port: 8123

Ok, solved. As usual, was the user fault.

Looks like the relay failed at the moment of the update (Murphy law) and it wasn’t even accesible by the netatmo app. An old unplug and plug solved the issue :sweat_smile:

Sorry for the noise

1 Like

Glad to hear it’s working again.

Although it’s not required and doesn’t add functionality right now I suggest to get webhook working. It’ll improve responsiveness in an upcoming release.

Check the pre-release custom component for more info: Testers wanted - Netatmo integration

Sure, now I have it working, but if possible I recommend to make it available in other ports, as tons of users have their instance only available in the default 8123 port

There is nothing I can do about the port since that is dictated by Netatmo.

A post was split to a new topic: Netatmo Presence stopped working

Sorry for the silly question, I’m new to HA, do you add this in the configuration file just after the Netatmo initial config ?

netatmo:
client_id: YOUR_CLIENT_ID
client_secret: YOUR_CLIENT_SECRET

Yes, this is exactly all you need:

# Example configuration.yaml entry
netatmo:
  client_id: YOUR_CLIENT_ID
  client_secret: YOUR_CLIENT_SECRET

See the integration documentation.

Thank you for the reply, sorry my post wasn’t very clear, I have this and it’s working fine, I was wondering how do you get the light and sensor too? with the current settings I only have the live stream of two cameras but nothing else, I was wondering if I had to also add in the configuration file the code that @gerard33 posted on mar 28

To get the light working you need webhook. Please check your logs to see if your webhook is working.

If you see a line in the logs like the following, you’re good:

2020-11-01 01:07:49 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered

1 Like

Thank you I’ll check this in a min but it’s probably not gonna work for me (for now) as I have an issue with SSL(assuming it’s required)

As long as you’re using your personal dev account non-SSL should work, but I would not recommend it.

Logger: homeassistant.components.netatmo
Source: components/netatmo/init.py:159
Integration: Netatmo (documentation, issues)
First occurred: 20:30:40 (3 occurrences)
Last logged: 20:33:58

Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 443 and 80. (21) when accessing ‘https://api.netatmo.com/api/addwebhook

Although that was an hour ago, not sure that was before I have the live streaming working

From some days netatmo add in for climate - i also own weather station - it is not working in HA dockerized on rpi3. No update HA. It suddenly show in log an error related to webhook that in past i never used. The netatmo climate worked nice for many years and now suddenly i found this error. The entities of course are unavailable. I tried to patch refreshing client and secret in configuration.yaml. Any suggestion?

First, please don’t hijack old threads with different topics.

Second, please give more information about what version you’re currently running on.

First excuse me for coming in this thread.
Ha frontend ver. 20210407.3-latest
Ver. core-2021.4.3
I uninstalled today the netatmo plugin and after reinstall i found all entities unavailable. More than this installing plugin it recognizes only the weather station but output entities all unavailable.
In configuration.yaml:

netatmo:
  client_id: 12312312312312345 
  client_secret: 123123123123123123311

Error in log:

2021-05-12 16:38:08 ERROR (MainThread) [homeassistant.components.netatmo] Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 80, 88, 443 and 9443. (21) when accessing 'https://api.netatmo.com/api/addwebhook'

More than this I also have in configuration.yaml

homekit:

For years the plugin worked flawlessy . I don’t understand. Thanks for your time