Reolink: How do I create a home assistant notification with a link that opens the reolink camera app?

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

If you dont mind not seeing a picture when away from home or not in vpn you could also:

image: >-
  http://${DOORBEL / NVR IP}/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=${ID}&user=${USER}&password=${PASSWORD}

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.

It’s no longer isoformat, it’s an epoch timestamp, so using your example it would be

{{ now().timestamp() - 604800 | int }}

This didn’t work for me, still takes me to the live view section of the app.

Not sure what else to suggest, it works perfectly here

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

In developer tools > template, I get this:

{{ now().timestamp() - 604800 | int }}	1769509645.747597
{{ now().timestamp() | int - 604800 }}	1769509645

Maybe the decimal has something to do with the app not retrieving the recording.

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

Nice catch!

Hello,

I want a notification on my phone, where I can see a picture of the camera and if I click on the notification, I want to open the reolink app with the right camera.
But it only open the reolink app at the main view, not the specificated camera with the UID. Where is the error? The Camera is installed only via IP. I don’t have a NVR System

ttl: 0
priority: high
channel: alarm_stream
tag: find-my-phone
content-type: jpg
image: local/camera_snapshots/Garage_snapshot.jpg
clickAction: >-
  intent:#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=XXX;S.DEVNAME="Garage
  CX";end
      - action: "URI"
        title: "Kamera"
        uri: >-
          intent://scan/#Intent;scheme=reolink;package=com.mcu.reolink;launchFlags=0x14000000;action=android.intent.action.VIEW;S.UID=****************;S.pushVersion=v2;end            

This is the minimum version that works for me accessing the live feed of the camera (no NVR)

There is a setting in the Reolink app “Me” / Settings / Auto Live View (Enter live view page when the App starts), but this intent works regardless of that setting.

I know this is old, but i had to make an account and reply thanks!

FYI - looks like the intent URI is broken again in the 4.6 android app released a few days ago :frowning:

Since Reolink is supporting Home Assistant quite well, it may just be a matter of creating an issue, which I might do when I sort it out again. For now, I have basically stopped using the internal URL.

Dont see what is broken ? the notifications work quite well if you use local IP addresses.

Can you post an example of the intent string you're using that includes the IP?

I'm not sure we're all talking about the same thing here! No IP addresses (local or otherwise) are involved in the intent URI :thinking:

Since the app updated and the clickAction I was using broke, I asked AI, which pointed to this post and I confirmed it works. The key being this bit: intent:#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;

I guess everything old is new again.

Thanks @belastingvormulier for this great detail. I got the image to work, but like this using the camera entity. IP string did not work for me. Not sure why, but its working now.

image: /api/camera_proxy/camera.doorbell