As far as I can tell camera.snapshot
is working fine for indoor and outdoor cameras. What exactly isn’t working for you? Do you get an error?
I had no error but no snapshot. I paste below the script
service: camera.snapshot
data:
entity_id: camera.netatmo_coti
filename: /local/MiniCamSnap.jpg
Have you tried from the services tab to ensure correct access to the specified folder?
It worked changing entity_id by target: device_id
Thank you!!
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.
Thanks for sharing those insights.
@gerad33
Hi, in which file do I have to put the code in? It would be great , if someone could help me
template:
# Netatmo human
- trigger:
- platform: event
event_type: netatmo_event
event_data:
type: human
binary_sensor:
- name: netatmo_motion_human
unique_id: f5b9c5eb-d2ee-46d3-ad6f-dbc9ba917ee9
# We use auto_off, so just set it to true on each trigger
state: "true"
device_class: motion
# Automatically turn off 120 seconds after the last event
auto_off: 120
# Netatmo vehicle
- trigger:
- platform: event
event_type: netatmo_event
event_data:
type: vehicle
binary_sensor:
- name: netatmo_motion_vehicle
unique_id: e334e36b-9405-40a8-ac32-e212c73381e2
state: "true"
device_class: motion
auto_off: 120
# Netatmo animal
- trigger:
- platform: event
event_type: netatmo_event
event_data:
type: animal
binary_sensor:
- name: netatmo_motion_animal
unique_id: 12fe2e12-2aab-4409-8fbf-e4d7144db271
state: "true"
device_class: motion
auto_off: 120
Thx …
The problem is, that i have the template.yaml out of configuration.yaml….
So I‘ve got an problem with the correct syntax… because in extern template.yaml is not the same linke in configuration.yaml
Maybe someone could help me to find the right way.
It looks like you don’t have the new template
there but the legacy format.
That works different.
Is there a template:
part in your config.yaml? If not just copy the code from my example in your config.yaml and it should work.
BTW, copying the actual code and pasting it here is working way better than posting a screen shot. The screen shot is harder to read and it doesn’t show the relevant other parts.
Ok, here is the code of my template.yaml
##############küchen Sensoren########
binary_sensors:
combined_door_windows:
friendly_name: "Fenster/Tür Küche"
device_class: window
unique_id: combined_door_windows
value_template: >-
{% if is_state('binary_sensor.fenster_kuche', 'on')
or is_state('binary_sensor.tur_kuche', 'on')
or is_state('binary_sensor.fenster_spule', 'on') %}
on
{% else %}
off
{% endif %}
tueren_alarmanlage:
unique_id: tueren_alarmanlage
friendly_name: "Türen Alarmanlage"
device_class: door
value_template: >-
{% if is_state('binary_sensor.slim_multi_sensor_pir_door_temperature_illumination_door_window', 'on')
or is_state('binary_sensor.xiaomi_hausture_contact', 'on')
or is_state('binary_sensor.tur_kuche', 'on')
or is_state('binary_sensor.hausture', 'on')
or is_state('binary_sensor.tur_wohnzimmer', 'on') %}
on
{% else %}
off
{% endif %}
fenster_alarmanlage:
unique_id: fenster_alarmanlage
friendly_name: "Fenster Alarmanlage"
device_class: window
value_template: >-
{% if is_state('binary_sensor.az_caro_links_door_window', 'on')
or is_state('binary_sensor.slim_multi_sensor_pir_door_temperature_illumination_door_window_2', 'on')
or is_state('binary_sensor.slim_multi_sensor_pir_door_temperature_illumination_door_window_3', 'on')
or is_state('binary_sensor.slim_multi_sensor_pir_door_temperature_illumination_door_window_4', 'on')
or is_state('binary_sensor.door_window_sensor_access_control_window_door_is_open', 'on')
or is_state('binary_sensor.fenster_spule', 'on')
or is_state('binary_sensor.fenster_kuche', 'on') %}
on
{% else %}
off
{% endif %}
wassermelder:
unique_id: wassermelder
friendly_name: "Wasser"
device_class: moisture
value_template: >-
{% if is_state('binary_sensor.shellyflood_b0a2e4_flood', 'on')
or is_state('binary_sensor.flood_sensor_water_alarm_water_leak_detected_2', 'on')
or is_state('binary_sensor.flood_sensor_water_alarm_water_leak_detected ', 'on') %}
on
{% else %}
off
{% endif %}
And here a part of my configuration.yaml
template: !include template.yaml
cover: !include cover_group.yaml
So copy Paste of your code is not possible, because there is a template part… linked to template.yaml
Then just copy my code without the template:
part to your template.yaml file. I have it the same way.
So start at - trigger:
and then it should work.
Thx for your support……
but I don‘t get it work. I“t Shows me a red Icon On file editor , for wrong configuration…
Above I postet my full template.yaml….
Maybe you could put your code in ….
Sitting for hours - wrong Formatation.
Just trying and trying. Did not work… anyone else who can help me ?