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

Thanks for this! This allowed me to set up a quick mobile notification that, when clicked by the user, opens up the Reolink app and takes me the last video feed.

service: notify.mobile_app_<device id>
data:
  message: Someone's at the door!
  title: Doorbell
  data:
    ttl: 0
    priority: high
    clickAction: >-
      intent:#Intent;launchFlags=0x10000000;component=com.mcu.reolink/com.android.bc.PlayerActivity;end

However, I’d like to launch this action without any user intervention, but I’m having trouble figuring out how to make this work.

I can open an app without user intervention using command_launch_app and a package name as shown below, but I don’t see how I can integrate an intent action to this call.

service: notify.mobile_app_<device id>
data:
  message: command_launch_app
  data:
    package_name: com.mcu.reolink

I could also implement using command_activity, but I’m struggling to figure out how to translate the intent string above into this action.

service: notify.mobile_app_<device id>
data:
  message: command_activity
  data:
    intent_package_name: com.mcu.reolink
    intent_action: android.intent.action.VIEW
    intent_uri: ?????????????????

Using the intent string provided for the intent_uri results in the following error on the device side: “Unable to send activity intent, please check command format.” I’m a noob with intent URIs and not sure how to properly format the intent for use with command_activity.

Thanks for any help!

If I want alarm type will be the press on Reolink Doorbell button what I should to write?

Did someone success to retrace the steps?
I not have NVR so I put number 1

Its not work for me not sure why

Hey!

Two things:

  1. I can confirm that this is still working for me. Notifications open the Reolink app with the correct camera selected.

  2. I see that everyone that’s having issues is not using an NVR. As I said I didn’t test things without an NVR, so the info I gave about using this without NVR are all assumptions I made based on what I discovered while trying to make things work.

Did anyone tried using S.ALMCHN=0 instead of S.ALMCHN=1? Or maybe completely removing the S.ALMCHN parameter from the URI?

I’ll try to figure things out when I have some time, but it might take a while since it I’ll need to factory reset one of my cameras and take it down so I can connect it directly to my PC.

I can open the reolink app with a camera selected by the UID:

service: notify.mobile_app_<your_device_id_here>
data:
  message: This message will open the camera selected by S.UID on the Reolink app
  data:
    priority: high
    ttl: 0
    clickAction: >-
      intent:#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=998877AABBCC;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=DontCare;S.ALMTYPE=PEOPLE;S.ALMCHN=1;end
4 Likes

This is fantastic, it is what I am looking for, Home Assistant that open the Reolink App for the Door Bell after Visitor press the button, everything else works fine get the notification, click the notification and only opens HA, not Reolink App, any help please :sob:

Thank you for this :slight_smile:

For NVR you need to tweak the URL a bit:

#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=<NVRS.UID>;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=<NVR.DEVNAME>;S.ALMTYPE=PEOPLE;S.ALMCHN=1;end

Replace:
<NVRS.UID> with the s.UID of your NVR
and now the S.DEVNAME becomes important too:

so also replace <NVR.DEVNAME> with the name you gave it in the NVR web gui :slight_smile:

( I noticed this already has been discusses upstairs somewhere, But lazy scrolling got me to the bottom :frowning: )

2 Likes

The following worked for me to open the app on the last camera.

service: notify.mobile_app_<device id>
data:
  message: command_activity
  data:
    intent_package_name: com.mcu.reolink
    intent_class_name: com.android.bc.PlayerActivity
    intent_action: android.intent.action.VIEW
1 Like

Hi all,

Okay I have this successfully running with my Reolink NVR, with 7 cameras attached. Using the below, and changing the <NVR_CAMERA_CHANNEL> for each camera, I can get push notifications that allow me to click on the notification and get taken directly to that specific camera in the Reolink app.

Within a certain time frame, it will take you to the live feed of the camera. Outside that time frame, it will take you to the playback of the camera that caused this notification.

NOTE: This is for Reolink NVR installations with Reolink cameras, I don’t know how this works without the Reolink NVR.

Example as follows:

service: notify.mobile_app_<YOUR_DEVICE_ID_HERE>
data:
  title: HASS Reolink Detection
  message: Doorbell Camera detected a person at {{now()}}
  data:
    clickAction: >-
      intent://scan/#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=<NVR_UID>;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=<NVR_DEVICE_NAME>;S.ALMTYPE=PEOPLE;S.ALMCHN=<NVR_CAMERA_CHANNEL>;end    

Replace values as follows:

<YOUR_DEVICE_ID_HERE> = name/id of your device/phone

<NVR_UID> = the UID of your NVR as shown in the Reolink app

<NVR_DEVICE_NAME> = the Device Name of your NVR as setup in the Reolink app

<NVR_CAMERA_CHANNEL> = The NVR channel to show on the Reolink app. This is the parameter that determines which camera will show up when the app opens. This parameter is a bitmask meaning you need to use it like this:

  • NVR camera 1 then <NVR_CAMERA_CHANNEL> = 1
  • NVR camera 2 then <NVR_CAMERA_CHANNEL> = 2
  • NVR camera 3 then <NVR_CAMERA_CHANNEL> = 4
  • NVR camera 4 then <NVR_CAMERA_CHANNEL> = 8
  • NVR camera 5 then <NVR_CAMERA_CHANNEL> = 16
  • NVR camera 6 then <NVR_CAMERA_CHANNEL> = 32
  • NVR camera N then CHANNEL = 2N-1

Thanks to @reinaldoarrosi and @belastingvormulier for their posts as I used a combination of both to get this working. It has been working for me for over one week now.

3 Likes

perfect thanks!
just what i needed for my NON NVR setup and working great in my actionable notification to open my doorbell camera

service: notify.mobile_app_sm_n986b
data:
  message: ""
  title: Someone pressed doorbell 🔔
  data:
    image: local/front_door_last_motion.jpg
    notification_icon: mdi:doorbell-video
    tag: doorbell
    color: purple
    ttl: 0
    priority: high
    channel: alarm_stream
    persistant: "yes"
    clickAction: >-
      intent:#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=**<insert your UID here, can find on info page in app>**;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=DontCare;S.ALMTYPE=PEOPLE;S.ALMCHN=1;end
    push:
      sound:
        name: default
        critical: 1
        volume: 1
    actions:
      - action: URI
        title: Cameras
        uri: /lovelace/driveway
      - action: URI
        uri: app://com.mcu.reolink
        title: Reolink App
      - action: DISABLE_ALARM
        title: Toggle Garage
9 Likes

you rock man! great stuff. using this sucesfully with my reolinks WITHOUT NVR.
using channel 1 as you’ve referred. big thanks!

Hey, this is great. Thank you!

Hey,
I’ve tried the following code, Reolink app gives me the following error “The device is no longer in the current device list”.
service: notify.mobile_app_pixel_6_pro
data:
title: HASS Reolink Detection
message: Doorbell
data:
clickAction: >-
intent://scan/#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=<***************>;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=;S.ALMTYPE=PEOPLE;S.ALMCHN=<3>;end

Any idea what am I doing wrong?
Thanks.

You are the man! Your intent worked perfect. The only thing that would be better is if it made a video call.

Another solution to OPs problem of lots of false positives due to bad camera intelligence would be to use an intelligent NVR to evaluate the streams and handle alerting duties.

I myself use blue iris and deepstack, but there are several options. Using something like blue iris also allows you to use cameras from any manufacturer, instead of being tied to reolink (assuming you’re using their nvr).

Blue iris isn’t free, but it also isn’t terribly expensive. Runs on a windows desktop, and does a pretty great job.

I made a 3-part series that goes through the ENTIRE setup - from installing blue iris to adding cameras to configuring motion detection and pushing alerts to your phone with images and actions and the whole bit.

This really is a much more flexible solution than being “married” to a single vendor. I mean - that’s the whole reason we are using HA, right? To integrate anything, rather than just Samsung or just Amazon or just Google, amirite?

Here’s a link to the first video in the series. Hopefully you find it informative.

Did you read this detail in my post:

So you want to use “03 Doorbell” so the value for ALMCHN should be 4.
If you wanted to use “06 Laundry” then the value for ALMCHN should be 32.

Also, remove the “<” and “>” - those shouldn’t be in the script.

Hope that helps!

1 Like

Is there an equivalent of this for iOS?

I know I can pass the app url like so: url: fb1675493782511558://, which opens the Reolink app on your last session. However, I would like it so it opens directly to the camera view on the Reolink app.

3 Likes

Fantastic!

I can confirm this solution works just fine in my Node-Red flows as-well.
Thank you! :smiley:

This worked for me, thanks!

Just have to make sure the UID is right for the camera.

I don’t use an NVR, so I pretty much ignore channel number. It’s always 1 but changing it doesn’t make a difference.

Thanks for the intents! I can get to a specific camera view with either “WelcomeActivity” or “VIEW”, no NVR! My only gripe is that I can’t get it to show the camera’s playback if it’s been a few minutes. I’m out of ideas.