Created an automation to inform HA presence that I’m home, based on my unique person ID code from Netatmo.
- alias: Y Occupancy On
trigger:
- 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'
action:
- data:
payload: home
topic: location/y
service: mqtt.publish
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?
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.
Hi,
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.
Cheers
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
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.
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'
trigger:
- event_type: netatmo_event
platform: event
event_data:
type: movement # other possible types: animal, vehicle
action:
- service: persistent_notification.create
data_template:
notification_id: "movement"
title: "Netatmo event"
message: "movement"
Not sure what you prefer in the second example. If what you need is access to the trigger data, this is possible with {{ trigger.event.data }}. 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
trigger:
- event_data: {}
event_type: netatmo_event
platform: event
condition:
- condition: template
value_template: '{{ trigger.event.data.data.snap != "topology_changed" }}'
action:
- service: shell_command.get_image_and_resize
data_template:
name: '"{{ trigger.event.data.data.snapshot_id }}"'
url: '{{ trigger.event.data.data.snapshot_url }}'
- service: persistent_notification.create
data_template:
message: >-
{{ trigger.event.data.data.message }}\n
{% if trigger.event.data.data.snapshot_url %}
![image](/local/snapshots/{{trigger.event.data.data.snapshot_id}}.png)
{% endif %}
notification_id: '{{ trigger.event.data.data.message }}'
title: >-
Netatmo event:
{% if trigger.event.data[\"type\"] == \"tag_big_move\" %}
Big Move
{% elif trigger.event.data[\"type\"] == \"tag_small_move\" %}
Small Move
{% elif trigger.event.data[\"type\"] == \"tag_open\" %}
Still Open
{% else %}
{{trigger.event.data[\"type\"]}}
{% 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.
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?