Netatmo_event never fires

Hi all,

netatmo_event doesn’t seem to fire in my home assistant. Not even when I fire the event myself using the developer tools.

These are my facts currently:

  • my Home Assistant ports are open/reachable
  • I can acces my HA externally via a public subdomain
  • I have Home Assistant Netatmo integration installed and I have my Netatmo Themostat + Netatmo Presence camera working in my dashboard.
  • I have an automation listening for the trigger netatmo_event
  • I have my app set up in https://dev.netatmo.com/
  • I follow the netatmo cookbook examples in regards to setting up an automation
alias: automationMotionAthome
description: motion detected at home
trigger:
  - platform: event
    event_type: netatmo_event
    event_data:
      type: human
    id: anidforthisnetatmothing
condition: []
action:
  - service: mqtt.publish
    data:
      topic: netatmo/update
      payload_template: |
        {{ trigger.json | tojson }}
      retain: true
mode: restart
  • I have set the following 2 credentials in configuration.yaml
netatmo:
   client_id: !secret netatmo_client_id
   client_secret: !secret netatmo_client_secret

What am I missing?

@Friedrieck would you be able to help me out a bit? I cannot seem to detect any netatmo events being fired? I followed all the steps I saw here in the thread, but no netatmo events to be seen?

I’d really appreciate your help!

What port is your instance listening on (WAN facing)?

Ports 80 and 443 are forwarded

Please set the log level for the Netatmo integration to info and check of the webhook registers correctly.

I believe I see it registered. (thanks for helping me out @cgtobi by the way! Appreciate it a lot!)

netatmo log

I don’t think so. At least not from what can be seen in your screenshots.

The line in the logs should be something like:

hass[11732]: 2021-12-22 13:28:09 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://hooks.nabu.casa/someverylonguniquestringofnumbersandletters
hass[11732]: 2021-12-22 13:37:02 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered

Hi,
In the app screen on the dev site of Netatmo, you should also see whether your webhook is correctly registered or not.

When I had troubles, I had the following automation in place to see what was happening:

alias: Netatmo to log (ALL EVENTS)
description: Log all Netatmo events to system log
trigger:
  - event_data: {}
    event_type: netatmo_event
    platform: event
condition: []
action:
  - service: system_log.write
    data:
      message: 'contenu: {{ trigger.event.data }}'
      level: warning
      logger: netatmo_event
mode: parallel
max: 10
2 Likes

On dev site Netatmo I can see a green “v” icon

input fields redirect URL and webhook url could remain empty fron what I understood?

Right, I indeed couldn’t find that in my logs.

Am I missing some extra code in my configuration.yaml to register that netatmo webhook? In fact the Netatmo integration is running fine, my netatmo thermostats and camera are working fine too in Home Assistant.

No, just go to the services tab and trigger the netatmo.register_webhook service.

1 Like

It’s always unregistering for some reason, after it got registered?
I googled, found this Netatmo webhook unregisters immediately after registration, and double checked if I had done that. And I did.
trusted procies

I can’t find where I’m going wrong…

Actually it never registers successfully.

You also have to set the external URL in the general settings.

Yep, external URL was/is set correctly. For a while already we’re only using Home Assistant over the external url, and also with the mobile app. Successfully.

Just to double check, I perhaps might have put the wrong adress here. That trusted_proxies value I have in my configuration.yanl, should be what exactly? internal documentation for NGINX Home Assistant SSL proxy add-on is unclear or incorrect? · Issue #2152 · home-assistant/addons · GitHub

The internal IP adress of my main router, the public WAN IP adress, etc.?

Under trusted_proxies you ought to enter for example the ip of your reverse proxy.

Ok, my trusted_proxies value seemed to be correct all along, when I changed it to something else I couldn’t reach Home Assistant trough the external URL anymore. So that curretn value probably corresponds with my nginx reverse proxy


I’m getting an unspecified error when I call the service. Can’t see it appear in the logs. Hoped to learn more about the reason why…

This “unknown error” usually happens when the webhook is already registered. Please unregister manually (netatmo.unregister_webhook) and then try to register again.

1 Like

Excuse me for butting in, but my problem looks similar.
I’ve had Netatmo Camera webhooks running for years without problems, and suddenly it stopped.
I’ve verified the netatmo.developer page and my integration is active and ok.
If i use netatmo.unregister_webhook followed by netatmo.register_webhook everything checks out ok. All URLs are ok and has never been changed.
But using netatmo_event listener, never sees any events.
Any advice, please ?

Anyone had any luck?

I have the exact same problem, however, I never had it working.

How du you check the URL’s ? when I follow the link I’m just forwarded to the generals settings.
I am using duck DNS to generate my URL for external access.