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)
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…
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.
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.
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
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:
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
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
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.