I’m trying to setup notification on the mobile app and pass a snapshot. Does the aarlo_image_updated
event return an entity_id
similar to the depreciated aarlo_snapshot_ready
? Can I listen for the aarlo_image_updated
event and then pass the entity_id
of the camera via something like {{ entity_id }}
in the message?
Thanks!
Edit: I listened to the event and see this is the response structure:
{
"event_type": "aarlo_image_updated",
"data": {
"entity_id": "aarlo.driveway"
},
"origin": "LOCAL",
"time_fired": "2022-01-28T14:43:05.659439+00:00",
"context": {
"id": "e42e82290b7ce65db067ee1b7735de4c",
"parent_id": null,
"user_id": null
}
}
In my case I expect the entity_id
to be camera.aarlo_driveway
is this expected behavior?
Edit:
For now I’m going to try this to get my camera entity_id
…
{{ 'camera.' + (trigger.event.data.entity_id).replace('.', '_') }}
Edit:
My goal is to replace the Arlo app notification with snapshot notification from Home Assistant. I am relying on the Arlo app for camera triggering. At first I tried simply listening for the aarlo_image_updated
or aarlo_capture_updated
events. I have found these work but have a couple of issue…
- I sometimes see more events from the Arlo app than from Home Assistant. This tells me either this is intended behavior based on how the Arlo app works vs the aarlo integration or the aarlo integration is missing some events.
- I sometimes have my Home Assistant notifications come through almost immediately after the Arlo notification but other times there is a significant delay. Is this due to some limitation or my config or something else?
A fix for item 2 could be to notify on camera recording state or motion and then update the notification after the fact with a snapshot but I don’t know if there is a good unique identifier that could be used as a tag for the notification.
Edit: I fixed entity_id and added device_id to snapshot/capture/image updated events and created a pull request. This allows me to notify my mobile when the camera starts recording then try to update the notification after the fact with a snapshot. I am using the device_id with the captured_today value as a tag. It doesn’t always work but it was the best I could come up with…
service: notify.mobile_app_sm_g950u
data:
data:
notification_icon: mdi:cctv
clickAction: app://com.arlo.app
group: '{{ state_attr(trigger.entity_id, ''friendly_name'') }}'
ttl: 0
priority: high
tag: >-
{{ state_attr(trigger.entity_id, 'device_id') +
states('sensor.aarlo_captured_today_basement_great_room') }}
title: Arlo
message: >-
Motion detected on {{ state_attr(trigger.entity_id, 'friendly_name') }} at
{{ now().strftime('%I:%M%p') }}
service: notify.mobile_app_sm_g950u
data:
data:
notification_icon: mdi:cctv
clickAction: app://com.arlo.app
image: '{{ ''/api/camera_proxy/'' + (trigger.event.data.entity_id) }}'
group: '{{ state_attr(trigger.event.data.entity_id, ''friendly_name'') }}'
ttl: 0
priority: high
tag: >-
{{ trigger.event.data.device_id + states('sensor.aarlo_captured_today_' +
(trigger.event.data.entity_id).replace('camera.aarlo_', '')) }}
title: Arlo
message: >-
Motion detected on {{ state_attr(trigger.event.data.entity_id,
'friendly_name') }} at {{ now().strftime('%I:%M%p') }}