Reolink POE IP Camera Setup

now to figure out a button to make a on off switch for the white leds on the 810a :stuck_out_tongue:

Just to share my findings with RLC 510 (WA) and AI detection. After installing the cameras some weeks ago, I noticed that the reolink_dev integration started to expose the person/vehicle/pet AI detection, I think those sensors were not there when I first installed it and set up the cams (or maybe they were there but not working). In any case, I started to experiment, I have a few light automations based on the camerasā€™ motion detection, that were getting tons of false positives due to bugs at night.

I was reading here about some people getting AI events with the integration, and others doing aggressive REST polling continously etc. The AI events were not working with any of my cams and I thought that aggressive cam polling wasnā€™t a great approach - but I also noticed that the cams where claiming to be running the ā€œlatest firmware versionā€ when checking with the android app but that version was from January this year, which was weird.

Long story short, the firmware version checker in the cams wasnā€™t working at all. I realized I could download a far newer firmware release, and update the cams via the web interface (the android app would refuse to update the cams either manually or automatically).

After upgrading the cams manually to version 3.0.0.494, the AI binary sensors from the integration started to work. I could then crank up the sensitivity of the detection and fire the light automations based on person detection only. This seems to work pretty well for my purposes. No more lights turning on in the middle of the night :slight_smile:, and fairly quick lights turn-on when stepping outside to the backyard or approaching the garage door.

These sensors are clearly not reliable enough for firing a true alarm/siren, but for controlling lights they do fit the bill quite well.

2 Likes

I was able to get this working as well. I had to do a manual firmware update. Via the app did not work. It said that the device is already to the latest firmware same when using the web clientā€™s auto update. I needed to download the latest version of firmware and do it manually. Cameras are not detecting motion in home assistant but I do agree that it has some delay. maybe as long as 15-30 sec is not more.

Hi! A couple of questions to you. Iā€™m really excited that you got this to work. Iā€™ve been drooling on a reolink camera or 3 for a long time now.

  1. Do you store video 24/7, do you use a nvr software for this?
  2. I like the alarmo idea, both for night time automatic at 22:00 and also when no one is home. Can you push video to a server based on human/vehicle detection?
  3. HA does have a lag when it comes to video streams, at least for one camera I tested. Would it be possible for HA to push notifications to my phone, that could display the human detected video-clip? Without any hard lag? If not,
  4. can HA request to open the Reolink app for viewing that clip?

Thanks again,

I can speak for question 4 about opening the reolink app from a notification, and can confirm you can do that on Android, but not IOS i beleive. I have a snapshot that is captured when person is detected, with an actionable notification that has an option to open the reolink app and it works well

2 Likes

for question number 3:
i am using the picture option:

service: notify.user
data:
  data:
    photo:
      - caption: Voordeur geopend
        url: >-
          http://192.168.1.101/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=AfrrF3Q6AeaeLoi4&token=08daa727ec3dc85&user=hassio&password=Hassio
  message: Voordeur geopend
  title: Voordeur geopend

according to the description you can also change this into video:

automation:
  - alias: Notify Mobile app attachment
    trigger:
      ...
    action:
      - service: notify.mobile_app_<your_device_id_here>
        data:
          message: "Something happened at home!"
          data:
            # an example of an absolute url
            image: "https://github.com/home-assistant/assets/blob/6a407898bd8ae80eb83634ffddb0d5ebdde95957/logo/logo.png?raw=true"
            # example of a relative url
            image: "/media/local/image.png"
            # the same works for video
            video: "/media/local/video.mp4"
            # and for audio
            audio: "/media/local/audio.mp3"

the only question is how to get the right mp4 name in there :wink:

3 Likes

Hi all
After upgrading firmware RLC 510 (WA) and after setting up nginx for local http the reolink_dev works quite well for me. Have now many automations based on detection. However some Issues I found and also I miss some documentation to some settings.
Like many of you Iā€™m mainly interested in Person detection only, so I setup Email options to send Person detection only.
I wanted to use the Email-switch to deactivate mail during Day. However If I switch via HA from off to on again, settings are changed to ā€œAny Motionā€ with all timeslots disabled.

Some question about the setup, I didnt find explanations about an option.

  • For what ist the Timeout slider ?

It took me also a while to find out that the files seen in the Media Browser are mounted from the Camera. (was initially searching the entire HA for the filesā€¦ :woozy_face:)

All in all a brilliant work a good integration makes Reolink cameras even more valuable
Thanks

Looking to see if anyone had any luck controlling the Siren on RLC-811A et al? This is as far as I got:

curl -Lk -X POST 'https://IP_ADDR/cgi-bin/api.cgi?user=USER&password=PASSWORD' -d '[{"cmd":"AudioAlarmPlay","param": {}}]'
[
   {
      "cmd" : "AudioAlarmPlay",
      "code" : 1,
      "error" : {
         "detail" : "param error",
         "rspCode" : -4
      }
   }
]

I clearly need to provide arguments to this call that are missing. I donā€™t know which those might be or how to figure them out. I searched the camera firmware for AudioAlarmPlay using strings, hoping that would reveal some more about possible arguments, but that didnā€™t give me any hits. Looking at the strings output, the firmware is clearly scrambled somehow.

Same research hereā€¦ Did you find anything about the post body to play the siren?

Nope, sadly not. The only resource I was able to find was this french speaking forum mentioning the command:

I do not speak french, but if Google translate is correct they donā€™t have any more details than the command name itself either.

I was also able to find a few (apparently) leaked internal Reolink API docs that describe most of the API surface including arguments. However, AudioAlarmPlay does is not listed on them. They seem to be a little older and AudioAlarmPlay may have been a more recent addition (I think their older cameras do not have any sirens).

Itā€™s very disappointing that Reolink didnā€™t open these APIs publicly. Iā€™m trying some of the common parameters (https://home-cdn.reolink.us/wp-content/uploads/2021/05/070123211620350601.5874.docx) but still nothingā€¦

Some ideas I had what the parameters might be related to:

  • Volume
  • Duration or how long to play for
  • alarm sound / audio sample to play

I havenā€™t done a very thorough exploration of those yet though. The mobile app has an option to sound the alarm, which most likely calls into this API. Maybe thereā€™s a way to reverse engineers this through the mobile app somehow.

I tried to sniff the packets but the content is encrypted and changes depending on the token assigned at login (which expiresā€¦).

POST http:///cgi-bin/api.cgi?cmd=AudioAlarmPlay&token=

with temporary token c41e65cc0e528dd, the body was:
Da9eUQozF8ysERuRnkKpMwVNTkeOEB0HfyrOwpY7TciC/hCCaYOF9NWuTK5uDrlZxqmrelVo4Ik/YHc3omt6sB3bBR17U+lY7xpvoVL0CgzJa1PjTS0gRMU6bZvlRg9d

with temporary token 534c9972c56ca11, the body was:
gjbzzbz67QGpgd2gEyZQ6whZfpWoqaRpEEhBfsvsc4ru6dGhKri41/KDjVJoIOR3626x6jqszNGbAjGBOo/cbVxJSyktPmWjFv0L9QXS+eoXQGgjdjLyyNywt3grfp/y

I tried to figure out what was the content but I still didnā€™t manage to understand.

Got it!

[{"cmd": "AudioAlarmPlay", "action": 0, "param": {"alarm_mode": "manul", "manual_switch": 1, "times": 1, "channel": 0 }}]

[{"cmd": "AudioAlarmPlay", "action": 0, "param": {"alarm_mode": "manul", "manual_switch": 0, "times": 1, "channel": 0 }}]

Enjoy!

3 Likes

Oh wow, awesome! Thanks for sharing!

Iā€™m curious how you got that? It seems way to complex to have just guessed. Did you figure out to remove the encryption/mangling from the app payload? Feel free to share via message if you donā€™t want to disclose publicly.

Both the "action": 0 and "times": 1 parameters do not seem necessary. Dropping them seems to work the same way, at least for my cameras.

Hi
I got some Reolink cameras on black Friday and using HACS integration itā€™s working OK accept I can not get the live view working, what I have so far it updates every 10seconds
Any help would be appreciated.
Thanks

Hi,
Iā€™m trying your solution, the resource URL is ok but iā€™ve got an error verifying the code that Iā€™ve copied in my sensor.yaml

Invalid config for [sensor.rest]: expected SensorDeviceClass for dictionary value @ data['device_class']. Got 'motion'. (See ?, line ?).

On Home Assistant OS lastest release. Any idea ?

motion is a binary_sensor device class, not a sensor device class. Since you are trying to setup a motion sensor, you should choose a rest binary_sensor, not a rest sensor.