After a bit of trial and error, I got it so that I get an image and a link to the correct camera (via my NVR) showing video from the time of the event.
My phone is Android-based. My doorbell camera is channel 1 on my NVR. My “world reachable URL” is my Nabu Casa url, but any similar should work. The icon/color stuff no longer works correctly with Android notifications, but my understanding is that this might return and it’s harmless in the meantime.
action: notify.mobile_app_scott_s_phone
metadata: {}
data:
message: Someone spotted by doorbell camera
title: Front Door
data:
image: >-
https://world-reachable-url.com{{
state_attr('camera.reolink_doorbell_fluent','entity_picture') }}
ttl: 0
priority: high
color: red
notification_icon: mdi:camera-enhance-outline
clickAction: >-
intent:
#Intent;scheme=reolink;package=com.mcu.reolink;launchFlags=0x14000000;action=android.intent.action.VIEW;S.UID=YOUR-ID;S.DEVNAME=NVR;S.ALMTYPE=PEOPLE;S.ALMCHN=1;S.channelid=1;S.ALMNAME=Detection;S.ALMTIME={{(now().timestamp()) | int }};S.pushVersion=v2;end
Has anyone been able to get a different timestamp to work? I’ve noticed that no matter what timestamp I pass into ‘S.ALMTIME’, it only shows the current live stream. It should be possible because the Reolink notifications takes you to a timestamp.
For example a week ago:
{{ as_datetime(now().timestamp() - 604800).isoformat() }}
I use the camera-history.js plug-in to show captured snapshots of camera events throughout the day, because it’s by far the fastest way to scrub while looking for interesting events. When clicking an image, I’d like to jump into the Reolink app for a playback recording of the point in time of the snapshot capture.
I’m just using {{ (now().timestamp()) | int }} and it works with one caveat, which is how soon after the event that you click the notification.
When I click the notification immediately, it shows the live cam only. When I click some period of time after receiving the notification, I will get the recording starting exactly at the correct event time.
I don’t know how many minutes or seconds between the event and opening the notification is required to bring up the recording vs live stream. Probably something less than 5 minutes.
I think I read it was > 2 minutes, which makes sense to me. If an event was happening right now I’d likely want to follow it in real-time rather than with a 20-30 secs delay (e.g. from whenever I clicked the notification). However if the event is “old” and likely no longer occurring I’d want to see the recording instead.
Regardless BrianL is subtracting a week from his timestamp so it should always go to a recording no matter how quickly he clicks it
Yes, that’s it! I only tested myself from Tasker by hard coding an epoch value of 7 days in the past (which took me to a recording), but when I add a decimal to it I only get live view