Hi, I want to create an automation so when I am in home the Netatmo Camara sets me up as in Home. I though the easiest way will be when I am wifi connected but I do not know how to call the service “set_persons_home”. Can someone assist me with this automatitation. I think it is also useful for the Netatmo community. Thank you!
alias: Antonio en Casa Wifi
description: ''
trigger:
- platform: state
entity_id: sensor.kb2003_conexion_wifi
to: WIFI_xxx
condition: []
action:
- service: set_persons_home
device_id: xxxxxxxx
domain: netatmo
entity_id: camera.netatmo_xxx
value_template: '{{ trigger.event.data[''data''][''name''] == ''Antonio'' }}'
mode: single
This will evaluate to trueand netatmo.set_persons_home is expecting a list of names. If you want to check if the the trigger contains “Antonio” you have to put that into the condition and the pass the name to the netatmo.set_persons_home service.
In the event data there is a camera_id / device_id present which is the MAC address of the camera, so you can use that in the trigger part to distinguish the cameras.
Then you can make sure there is actually no car in your backyard
Thank you!! Is it possible to create an snapshot when an event is triggered (person, movement…) and send the thrumbail through a notification to my phone? The service “camera.snapshot” is not working and I do not know how to send the native snapshot took by my netatmo inhome camera.
Hi @cgtobi ,
I am also moving my motion sensors to the new trigger-based templates. I used this opportunity to also store in attributes the snapshot_url and vignette_url keys from the netatmo_event payload, to then use them in generic cameras.
But it seems that these two keys are absent from the netatmo_event when the type is vehicle. It is working fine for human, animal and movement (consistent with all my three cameras).
Should I create an issue in github, or is it a bug at Netatmo?
You can take a look at the raw webhook event sent by Netatmo by setting:
homeassistant.components.netatmo.webhook: debug
This should give some insights. The component does not treat vehicle events any different. If you can provide me with some test data I can take a closer look. (feel free to PM me here or on Discord)
Hi @cgtobi ,
This is how I found out about the missing keys in the payload, but I’ve just PMed you a fresh extract from my log. You will see that all the vignette* and snaphsot* related keys (*_id, *_key, *_url) are missing when type is vehicle.
Thanks again for your prompt reply!
Thanks @Friedrieck, I’m pretty sure that the events did contain those in the past. Not sure why they are not included right now. Unfortunately I don’t have an outdoor camera or access to a street facing camera. So, since we’re just passing the even along without removing any of that data this is not in our hands. I’ll pass that on to the Netatmo devs.
Problem solved!
It appears that to have these vignette and snapshot data in the callback, one has to set in the Netatmo parameters at least to record the vehicle events, which I had not (I guess it is the same for the other types). It must be done in the Netatmo app or on the Netatmo website (as pictured below). Having done so, these keys are now in the netatmo_event (for type: vehicle), as expected.