Hello,
after wasting so much time setting up Netatmo integration in Home Assistant, this post is my last ditch effort before giving up.
My domotic system is all branded “Biticino with Netatmo” devices, for a total of about 50 devices as follows:
- 1 DIN gateway [FC80GT]
- many dimmer switches [N4411C]
- many shutter controls [N4027C]
- 4 connected modules for socket [N4531C]
- many lighting micro module [3584C]
- 1 wireless motion sensor [3585C]
- 1 Wireless Night&Day scenario control [N4574CW]
- 1 Wireless Home&Away scenario control [N4570CW]
- 1 DIN smart relay for light control [FC80RC]
- 2 Smarter with Netatmo thermostats [XW8002]
This is the context:
- Home Assistant Core on docker via Container Station in a QNAP nas (tried stable version 2022.11.4 and also latest 2022.12.7).
- Caddy reverse proxy on docker via Container Station in the QNAP nas, config file:
(https_header) {
header {
Strict-Transport-Security "max-age=31536000; includeSubdomains"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "same-origin"
}
}
xxxxxxxxxxx.duckdns.org {
import https_header
reverse_proxy http://192.168.2.2:8123
}
-
Port 443 open and forwarded to 192.168.2.2 (NB: port 80 can’t be used for custom mapping on my router because is reserved).
-
Set external URI in HA to
https://xxxxxxxxx.duckdns.org
-
Set http block in configuration.yaml:
http:
use_x_forwarded_for: true
trusted_proxies: 10.0.3.3
-
HA already reachable from remote via
https://xxxxxxxxx.duckdns.org
-
Registered app in dev Netatmo portal (never got banned, I check every time), used Client ID and Secret to store credential in HA and added integration Netatmo using credentials (no Home Assistant Cloud).
-
Netatmo webhook successfully registered:
2022-12-21 18:54:00.586 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: `https://xxxxxxxxxxxx.duckdns.org/api/webhook/verylongstringtoken`
2022-12-21 18:54:00.827 DEBUG (MainThread) [homeassistant.components.netatmo.webhook] Got webhook data: {'user_id': 'yyyyyyyyyyyy', 'user': {'id': 'yyyyyyyyyyyy', 'email': '[email protected]'}, 'push_type': 'webhook_activation'}
2022-12-21 18:54:00.827 DEBUG (MainThread) [homeassistant.components.netatmo.webhook] None: {'user_id': 'yyyyyyyyyyyy', 'user': {'id': 'yyyyyyyyyyyy', 'email': '[email protected]'}, 'push_type': 'webhook_activation'}
2022-12-21 18:54:00.830 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered
-
Adding a dimmer switch to my Home, turn on the light (and the light already turn on, so integration works correctly) but the icon lights up after 5 minutes.
-
Listening to
netatmo_event
shows nothing and nothing! -
In order to check if webhooks arrive to HA I tried to configure an automation with a webhook trigger to turn on the same light. Sending the POST request
https://xxxxxx.duckdns.org/api/webhook/madiawhtest-lGBpol3FqO61NF9jD_nHdxXH
in POSTMAN turns on the light, so webhook are correctly received by HA.
The question is simple: are Netatmo webhooks working or am I wasting my time? Do they work for my devices (i.e. dimmer switches N4411C and power switches N4531C)?
Thank you very much folks.