Reolink RLC520A HA integration

When I integrate the reolink RLC520A cameras by HACS, it does not detect or update me when it detects the presence of people or movement. The reolink APP does detect it.

Using a NVR?

No, only RaspberriPi4 with dongle de Sonoff.

What does Sonoff have to do with Reolink? :thinking:

Sorry, nothing… cameras are conectec by cable to the POE switch.

Here’s the way I integrated my system in HA. Maybe you can modify it to get your cameras motion detection working.

Reolink NVR Camera(s) in Home Assistant
For example, if your Reolink NVR has the following information,
IP address: 192.168.86.17
username: admin
password: 123456
You may also change the channel number (starts at 0) to recieve different channels.
Motion detection (configuration.yaml)

binary_sensor:
  - platform: rest
    resource: http://192.168.86.17/api.cgi?cmd=GetMdState&channel=2&user=admin&password=123456
    name: Carport
    scan_interval: 2
    value_template: '{{ value_json[0].value.state }}'
    device_class: motion

  - platform: rest
    resource: http://192.168.86.17/api.cgi?cmd=GetAiState&channel=2&user=admin&password=123456
    name: Carport Vehicle AI
    scan_interval: 2
    value_template: '{{ value_json[0].value.vehicle.alarm_state }}'
    device_class: motion

  - platform: rest
    resource: http://192.168.86.17/api.cgi?cmd=GetAiState&channel=2&user=admin&password=123456
    name: Carport Person AI
    scan_interval: 2
    value_template: '{{ value_json[0].value.people.alarm_state }}'
    device_class: motion

Camera (configuration.yaml)

stream:
camera:
  - platform: generic
    name: Carport
    still_image_url: http://192.168.86.17/cgi-bin/api.cgi?cmd=Snap&channel=2&rs=Carport&user=admin&password=123456
    stream_source: rtsp://admin:[email protected]:554/h264Preview_03_sub

Use Picture Glance Card to view camera in HA

2 Likes

Thanks! To complicated for me at the moment, Im a beginner! Thanks

Configuration.yaml validation check wouldn’t accept β€˜motion’ as a device class for rest sensor. It produces error message. When I delete the line with the device class it works but then it doesn’t show as a motion sensor. How did you manage to overcome it?

Use binary_sensor instead of sensor

Thanks for the quick response. Gonna give it a try now

Added binary_sensor instead of sensor but them it expects that it would be under template…I guess I’m doing something wrong.