How to trigger automation on event sent by netatmo presence camera?

I build a bit further on this example, wanted to have the Netatmo presence detecton inform HA once I’m home. Using the Netatamo events for this.

Created two template sensors to filter out the Person-IDs, as I noticed sometimes my welcome camara sees two faces at the same time.:

friendly_name: 'Netatmo Person'
value_template: '{%- if state_attr("sensor.netatmo_webhook", "persons") != None %}{{state_attr("sensor.netatmo_webhook", "persons")[0]["id"]}}{% endif %}'
friendly_name: 'Netatmo Person'
value_template: '{%- if state_attr("sensor.netatmo_webhook", "persons") != None %}{%- if state_attr("sensor.netatmo_webhook", "persons")|length > 1 %}{{state_attr("sensor.netatmo_webhook", "persons")[1]["id"]}}{% endif %}{% endif %}'

Created an automation to inform HA presence that I’m home, based on my unique person ID code from Netatmo.

- alias: Y Occupancy On
  - entity_id: sensor.netatmo_person_id0
    platform: state
    to: 'fe73d1bc-2230-4de7-03a903c8940d'
  - entity_id: sensor.netatmo_person_id1
    platform: state
    to: 'fe73d1bc-2230-4de7-03a903c8940d'
  - data:
      payload: home
      topic: location/y
    service: mqtt.publish
1 Like

Hey Giel, I tried to use your “binary movement sensor”

but on checking config there’s something invalid:

Invalid config for [sensor.template]: value is not allowed for dictionary value @ data['sensors']['netatmo_webhook_trigger']['device_class']. Got 'motion'. (See ?, line ?).

Are there any changes at device_class in the mean time?

I’m desperate. I just can’t make the netatmo webhooks work. Found this in my logs:

## Log Details (ERROR)

Logger: homeassistant.components.netatmo
Source: components/netatmo/
Integration: netatmo ([documentation](, [issues](
First occurred: 8:58:58 PM (1 occurrences)
Last logged: 8:58:58 PM

Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 443 and 80. (21) when accessing ''

The mentioned ports are free in my router.
Is there anybody who can help?

I also have problems to get MQTT run (see my post above). I´m completely new at MQTT.
I added


to my configuration.yaml and installed “Mosquitto Broker” add-on. Is my device_class problem an mqtt-problem?

Sorry, but it`s all new for me. :expressionless:

Did you follow the instructions in the documentation? Did you double check the http config in your configuration.yaml? Do you use a reverse proxy?

Hey Tobi, my http config is

 base_url: !secret http_base_url
 ssl_certificate: /ssl/fullchain.pem
 ssl_key: /ssl/privkey.pem


I don’t use a reverse proxy.

Yes, I followed instructions but I’m not sure if everything is allright. I’ve done my best. Have you any hints what I can look for? Which docu do you mean exactly? So much new stuff for me. It’s a little bit confusing.

If you access specifying the 8123 port, that means that you redirected that port to your home Assistant on your router? Did you also redirect port 443 and/or 80? This is requested for the webhook.

1 Like

Sorry for the late response, I’ still using the same config.
I use binary_sensor: !include_dir_merge_list devices/binary_sensors in my configuration.yaml
And the I have a netatmo.yaml file in that directory which contains

  - platform: template
        device_class: motion
        friendly_name: Netatmo webhook trigger
        value_template: "{{ is_state('sensor.netatmo_webhook_trigger', 'NOC-human') }}"

Just to clarify, this thread predates the current implementation of the webhook based Netatmo event. Please be aware things have changed quite a bit and make sure you read the documetation.

Yes, I do! But reading something is often not the same as understanding. Webhooks und MQTT is completely new for me. I try my best. But seems it´s not enough. :sleepy:

Please check what @vlebourl asked you.

Updated my http-config :white_check_mark:
Updated port-forwarding in router :white_check_mark:
Followed instructions from Netatmo in HA 0.105 :white_check_mark:

=> Everythings works fine!!!

THANX!!! :grinning:

1 Like

Please, someone help me! I have been working on this for many days. I finally managed to make webhooks work! Now I get netatmo_event but I can’t use the webhook trigger.

- alias: Net2
  description: 'Motion detected at home'
  - event_type: netatmo_event
    platform: event
      type: movement # other possible types: animal, vehicle
    - service: persistent_notification.create
        notification_id: "movement"
        title: "Netatmo event"
        message: "movement"

This works!

  alias: Netatmo Webhook
  initial_state: 'on'
    platform: webhook
    webhook_id: netatmo_webhook
    - service: mqtt.publish
        topic: 'netatmo/update'
        retain: true
        payload_template: >
           {{ trigger.json | tojson }}

This doesn’t work, I don’t know what else to do!
my webhook URL:

The Netatmo webhook event is meant to be used in the way you show in the first example.

Thank you for your answer. So there is no way to do something like the second example :frowning_face:

Not sure what you prefer in the second example. If what you need is access to the trigger data, this is possible with {{ }}. Here’s my own automation that creates custom notification on netatmo events:

- id: netatmoevent
  alias: Netatmo Event
  description: door or window is open or was moved
  - event_data: {}
    event_type: netatmo_event
    platform: event
  - condition: template
    value_template: '{{ != "topology_changed" }}'
  - service: shell_command.get_image_and_resize
      name: '"{{ }}"'
      url: '{{ }}'
  - service: persistent_notification.create
      message: >-
        {{ }}\n
        {% if %}
        {% endif %}
      notification_id: '{{ }}'
      title: >-
        Netatmo event:  
        {% if[\"type\"] == \"tag_big_move\" %}
          Big Move
        {% elif[\"type\"] == \"tag_small_move\" %}
          Small Move
        {% elif[\"type\"] == \"tag_open\" %}
          Still Open
        {% else %}
        {% endif %}

Events are not fully documented in the HA documentation, but you already have several examples, and you can refer to the Netatmo API documentation for further details. To give credit to @cgtobi, Netatmo’s documentation is not very good, and a lot of what is known has been discovered through trials and errors. You can use the developper tool event listener to get the full content of the events you receive and adapt your automation accordingly.


Hi Francesco,

what exactly do you want to achieve? Just relay the event via mqtt?

Check if this simple relay of Netatmo events to MQTT is what you’re looking for.

I just noticed after playing with it that @gieljnssns had already posted an example which is actually linked in the cookbook as well.

@vlebourl @cgtobi
Thank you guys. Your directions was just what I needed. Thank you so much
It works fine

- alias: Netatmo Event
  description: door or window is open or was moved
  - event_data: {}
    event_type: netatmo_event
    platform: event
  - service: persistent_notification.create
      message: >
       {% if is_state('persistent_notification.netatmo' , 'notifying') %}
         {{ states.persistent_notification.netatmo.attributes.message }}
             [{{ now().strftime('%H:%M') }}] - Messaggio: {{ }} - tipo evento: {{ }}
       {% else %}
             [{{ now().strftime('%H:%M') }}] - Messaggio: {{ }} - tipo evento: {{ }}
       {% endif %}
      notification_id: "test"
      title: "ciccio"

  - service: mqtt.publish
      payload: '{{ | tojson }}'
      retain: true
      topic: netatmo/update
1 Like

Hello guys. I would like to create an automatization based on the movement data from the Netatmo camera. I need to run a specific service if Netatmo camera detect a movement of human or animal, but I am totally beginner with this, so I have no idea how to „write this“ into configuration? I have working Netatmo integration where I am getting the video from the camera (in HA), but I don’t know how to „write“ this special condition? Could someone help me please?

you can use the event trigger listening to netatmo_event, and filtering according to {{[\"type\"]}} for instance.

Have a look at previous posts to get examples.

Here’s an exemple of an event received from the welcome camera:

    event_type: netatmo_event
      type: movement
        user_id: xxxxREDACTEDxxxx
        event_type: movement
        camera_id: xxxxREDACTEDxxxx
        device_id: xxxxREDACTEDxxxx
        home_id: xxxxREDACTEDxxxx
        home_name: xxxxREDACTEDxxxx
        message: 'xxxxREDACTEDxxxx: Mouvement détecté par CamSalon'
        push_type: NACamera-movement
      device_id: xxxxREDACTEDxxxx
    origin: LOCAL
    time_fired: '2022-08-12T15:00:58.556991+00:00'
      id: 01GA9957HW35A6BAS5ZBC7H811
      parent_id: null
      user_id: null
  description: event 'netatmo_event'