Netatmo camera web hooks no events

Hello,

I’m facing difficulties to get netatmo-events of the presence camera .
Camera and web hook registration is ok. I have no idea what is happening.
//192.168.201.102 is the ip address of the camera
Details: see log.

‘’’’
2020-11-19 10:18:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class HomeCoachData added
2020-11-19 10:18:19 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class CameraData added
2020-11-19 10:18:19 DEBUG (MainThread) [homeassistant.components.netatmo.camera] Adding camera xx:xx:xx:xx:xx:xx Netatmo Oprit
2020-11-19 10:18:19 DEBUG (MainThread) [homeassistant.components.netatmo.netatmo_entity_base] New client camera.netatmo_netatmo_oprit
2020-11-19 10:18:20 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: http://xxxxxxx.myqnapcloud.com/api/webhook/009e1a4cd1d09986daf6e832259a90956bdecfd2602d14ce92c95b51310b4aa5
2020-11-19 10:45:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-19 10:47:57 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.201.102:80 failed: Connection refused
2020-11-19 10:47:57 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.201.102:80 failed: Connection refused
2020-11-19 10:47:57 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.201.102:80 failed: Connection refused
2020-11-19 10:51:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-19 11:11:52 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
2020-11-19 11:20:26 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
‘’’’
Thanks for your help.

You’re webhook is not correctly registered.

Please check your external and internal URLs under Configuration > General.

Also check whether the webhook for your dev account at Netatmo is banned.

Do you have the proxy set correctly in your configuration.yaml?

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - <your_proxy_ip>

I assume that one of these are not right, which also might explain your issues in the other thread.

Hi Tobi,

Thank you very much. I forgot to set the proxy in the configuration.yaml.
The complete config is now:
Router: forwards ports 80 and 443 to Nginx (port 8123 is not forwarded)
Nginx (docker) (SSL forced): routes ports 80 and 443 to 192.168.200.206:8123
HA (docker, same physical machine as Nginx):
Configuration > General: internal address : 192.168.200.206:8123 // external address: xxxxx.myqnapcloud.com
Configuration.yaml: I added
http:
base_url: !secret base_url
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
Remark: the base_url is necessary. The system functioned suddenly when I added the base_url in the http paragraph.
Netatmo app: the app is unbanned.

Result: “Mediabrowser” as new item in the navigation panel.
Mediabrowser > Media sources library > Netatmo library > Netatmo Oprit library. Here I can see the recordings done by the camera. :smile:

The log:
2020-11-22 01:21:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 01:21:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class WeatherStationData added
2020-11-22 01:21:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class HomeData added
2020-11-22 01:21:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 01:21:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class HomeCoachData added
2020-11-22 01:21:40 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class CameraData added
2020-11-22 01:21:40 DEBUG (MainThread) [homeassistant.components.netatmo.camera] Adding camera 80:ee:50:28:2f:70 Netatmo oprit
2020-11-22 01:21:40 DEBUG (MainThread) [homeassistant.components.netatmo.netatmo_entity_base] New client camera.netatmo_netatmo_oprit
2020-11-22 01:21:41 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: http://xxxxxxx.myqnapcloud.com/api/webhook/009e1a4cd1d09986daf6e832259a90956bdecfd2602d14ce92c95b51310b4aa5
2020-11-22 11:22:23 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
2020-11-22 11:22:24 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
2020-11-22 11:22:24 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
2020-11-22 11:22:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 11:22:49 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for af38266670f6b31ec88885208b1481f3f44dd93d8c0286fc202cdc296c992210
2020-11-22 11:27:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 11:28:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 11:32:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-22 11:38:39 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available

Do you have some remarks? Why so many ‘No weather station available’ in the log ?

I tried:

Example automation for webhooks based Netatmo events

  • alias: Netatmo event example
    description: “Count all events pushed by the Netatmo API”
    trigger:
    • event_data: {}
      event_type: netatmo_event
      platform: event
      action:
    • data: {}
      entity_id: counter.event_counter
      service: counter.increment

But I can’t find the entity_id: counter.event_counter

Thx for the help

I am pretty sure your webhook is actually not successfully registered. Your log is missing the following line:

INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered

For the counter you have to create one yourself.

Indeed . But I don’t see what is still wrong. What can I still do? Recreate an Netatmo-app?
Counter ok.

I’d suggest, double check whether webhook is banned on dev.netatmo.com, change your external address to https://xxxxx.myqnapcloud.com, drop base_url: from your configuration, it has been deprecated a while ago.

trusted_proxies points to your nginx I assume, which apparently is on the same machine. So that should be ok.

Do you have some kind of firewall that might be interfering?

Hi Tobi,

SUCCESS ! I changed external address from http:// to https:// ,dropped the base_url and unbanned (again) the web hook on dev.netatmo.com .

2020-11-23 16:39:41 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://xxxxx.myqnapcloud.com/api/webhook/009e1a4cd1d09986daf6e832259a90956bdecfd2602d14ce92c95b51310b4aa5

2020-11-23 16:39:41 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for 009e1a4cd1d09986daf6e832259a90956bdecfd2602d14ce92c95b51310b4aa5

2020-11-23 16:39:41 DEBUG (MainThread) [homeassistant.components.netatmo.webhook] Got webhook data: {‘user_id’: ‘588b4ca16b0affa9178b5f54’, ‘user’: {‘id’: ‘588b4ca16b0affa9178b5f54’, ‘email’: ‘[email protected]’}, ‘push_type’: ‘webhook_activation’}

2020-11-23 16:39:41 DEBUG (MainThread) [homeassistant.components.netatmo.webhook] None: {‘user_id’: ‘588b4ca16b0affa9178b5f54’, ‘user’: {‘id’: ‘588b4ca16b0affa9178b5f54’, ‘email’: ‘[email protected]’}, ‘push_type’: ‘webhook_activation’}

2020-11-23 16:39:41 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered

netatmo event counter as a control works fine.

Thx for your appreciated help

Awesome. I should put together a FAQ at some point.

1 Like