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

I’m using old Reolink Cameras that can’t be directly integrated with home assistant. Also, the cameras motion detection creates a lot of false positives because it just looks at changes in the image and has no PIR sensor (gets triggered by lighting changes, leaves blowing in the wind etc.). I’m therefore came up with a workaround that should at least in theory work pretty well:

I want to have a motion sensor next to my cameras that is integrated with home assistant to trigger a notification when movement is detected. The notification should contain a link that then causes the reolink app to open and show the relevant camera view. I assume this must somehow be possible because the reolink app itself can send me notifications that link directly with a camera view. I’m just not sure how I can find out what this link actually looks like so I can use it in my home assistant notifications. Any help is greatly appreciated… (BTW, I’m using Android)

3 Likes

So you can do this 3 different ways.

To launch the reolink app on its own without a notification you can use

https://companion.home-assistant.io/docs/notifications/notification-commands#launch-app

If you want the entire notification being clicked to take you to the app you use

https://companion.home-assistant.io/docs/notifications/notifications-basic#opening-a-url

If you want an actionable notification with a button (separate from above) you can use

https://companion.home-assistant.io/docs/notifications/actionable-notifications#uri-values

Note on teh last link you need to follow the entire page as the linked example is only part of the whole automation

1 Like

Thanks for the links. I’m still stuck on how I get a specific camera view to open in Reolink. I don’t want just the Reolink app to open, but a specific camera view inside the app. If I’m not mistaken, this is called a “deep link”. My question would be… how do I know what the deep link url is for a camera view inside the Reolink app? Hope that all makes sense…

1 Like

you ask the app developers or try to find something in google searches

Oh ok, one last questsion… Is there no way to extract this info from notifications I get directly from the Reolink app? Thanks for your help!

no, not possible

@cordvision did you ever figure this out? i want to deep link into my cameras in the app as well but haven’t been able to figure it out yet.

This is the way to find deeplinks, I haven’t tried it but I’m very interested

I ended up contacting a Reolink developer. He said that they didn’t allow for deep link because it is a “security issue”. I told him that it would really improve the app experience and that they should maybe make it a feature that you have to manually enable in the app. I also wrote a app store review asking for that feature… maybe if enough others do the same, it eventually gets implemented.

2 Likes

it doesnt necessarily have to be a deep link, could also be an intent. One thing you can try is to use android studio and look at logcat when you interact with the notification to see if there is a corresponding intent that you can use. If that is the case then you can use command_activity to launch the intent.

Another option you have is to add the cameras to an app that supports it like TinyCam because you can send intents to that app and open specific cameras. TinyCam also offers tasker support to make the situation easier as well.

@cordvision
Someone on youtube managed to do this,

Hope someone that speaks his language can ask him.

google translate to the rescue? :joy:

On a related note,
what is the equivalent of this for iOS?
uri: "app://com.twitter.android

I tried
uri: twitter://
and it just open/close home assistant app in an instant.

@dshokouhi
seems like its an old issue that didn’t get fixed? idk
Hopefully its only a problem on my end and can be easily fixable.

This url works for me “fb1675493782511558://”

It might change though. I had “reolink://” working in an actionable notification for about a year untill it changed.

1 Like

@cordvision: are you using IP camera’s?

The developers said they won’t provide a deep-link or intent to open to a specific camera. Using the intent below will take you to the last viewed camera view

intent:#Intent;launchFlags=0x10000000;component=com.mcu.reolink/com.android.bc.PlayerActivity;end

1 Like

In case someone else comes across this thread looking for a way to make Home Assistant notifications open a specific camera on Reolink app, here’s what I was able to find after some reverse engineering.

To open a specific camera you’ll need to use the following URI:

intent://scan/#Intent;scheme=reolink;package=com.mcu.reolink;action=android.intent.action.VIEW;S.UID=<UID>;S.DEVNAME=<DEVICE_NAME>;S.ALMTYPE=<ALARM_TYPE>;S.ALMCHN=<CHANNEL>;S.ALMNAME=Detection;S.ALMTIME=<ALARM_DATE>;end

Where
<UID> = The UID of your camera or NVR (see this link)
<DEVICE_NAME> = The name of your camera or NVR
<ALARM_TYPE> = This can be either PEOPLE or VEHICLE depending on the detection type that triggered the notification. I personally believe this can be any value you want since it doesn’t impact the mobile app in any way. The important thing is that this has some value. I suggest always using PEOPLE or VEHICLE.
<CHANNEL> = The NVR channel to show on the Reolink app. I use Reolink NVR so this is important to me since 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 CHANNEL = 1
  • NVR camera 2 then CHANNEL = 2
  • NVR camera 3 then CHANNEL = 4
  • NVR camera 4 then CHANNEL = 8
  • NVR camera N then CHANNEL = 2N-1

I didn’t test things by connecting directly to a camera, but I assume for direct camera access CHANNEL must always be 1. In that scenario what determines which camera will be shown on Reolink app is the UID parameter.

<ALARM_DATE> = The date/time to show the camera stream for. If this date is less than 2 minutes from current time, then the Reolink app will show the live view for the camera, otherwise Reolink app opens the camera in playback mode with the correct date/time indicated by this parameter.

This parameter must be in ISO-8601 format. To do that, in my Home Assistant automations, I use {{ now().isoformat() }}

Here’s a simple example on how to send a notification to Home Assistant App that, when clicked, opens Reolink app with a specific camera selected. For this example assume that:

  • We’re using an NVR with UID=998877AABBCC and NAME=MyNvr
  • We want to show channel 8 of the NVR
service: notify.mobile_app_<your_device_id_here>
data:
  message: This message will open Camera 8 on Reolink app
  data:
    priority: high
    ttl: 0
    clickAction: >-
 intent://scan/#Intent;scheme=reolink;package=com.mcu.reolink;action=android.intent.action.VIEW;S.UID=998877AABBCC;S.DEVNAME=MyNvr;S.ALMTYPE=PEOPLE;S.ALMCHN=256;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;end
19 Likes

Hey there, thanks for posting this detailed example!

Is it still working for you? I have tried on my Home Assistant / Reolink setup and for some reason it only brings me to the main screen of the Reolink android app.

I can use the following to get me to the last camera viewed, as posted by Dylan1, but it’s not what I really want: intent:#Intent;launchFlags=0x10000000;component=com.mcu.reolink/com.android.bc.PlayerActivity;end

Any response would be awesome. Thank you.

Just tried this and as the above poster, this also doesn’t work for me. It opens the app but doesn’t open the specified camera feed. I’m not using an NVR so have channel set to 1.