Reolink POE IP Camera Setup

You need to get into the home assistant container
docker exec -it homeassistant /bin/bash
Then
pip install aiosmtp==1.2

That fixed my issue, Thanks

@fwestenberg I use you plugin and its awesome. Thanks for you contribution.

Iā€™m experiencing a small issue which I think is a easy thing to solve.

I added you binary_sensor according to the readme. but I get the following error:

Configuration invalid
Invalid config for [sensor.template]: extra keys not allowed @ data['sensors']['motion_garage']['delay_off']. Got OrderedDict([('seconds', 30)])
value is not allowed for dictionary value @ data['sensors']['motion_garage']['device_class']. Got 'motion'. (See ?, line ?). Please check the docs at https://home-assistant.io/integrations/template/

My config looks like this:

sensor:
  - platform: template
    sensors:
      motion_garage:
        friendly_name: Camera garage
        device_class: motion
        entity_id: camera.garage
        value_template: "{{ is_state('camera.garage', 'motion') }}"
        delay_off:
          seconds: 30

You should use binary_sensor at line 1.

1 Like

Feeling like a dork nowā€¦

Thanks for the helpā€¦

Hi @fwestenberg ,
Since this weekend Iā€™ve got 4 streams running with your component.
Before that I had the general camera component.
Could it be that 4 streams are too much?
After one day 2 streams break down. Is there a way, without rebooting hass.io to get the stream connected again?
Thanks!

Yes reboot the camera instead

Thanks for the suggestion but that does not fix the stream. Via the Reolink app the video is still there. I also didnā€™t have this issue with the generic component nor the ffmpeg one.

you didnt change the username and password when configured the cameraā€™s in the app
i canā€™t say more cause iā€™ve only put up 2 of the 6 cameraā€™s so far

@hmatos did you solve your problem? I think I have something similar going on.
Configuration.yaml

stream:
camera:
  - platform: generic
    name: Camera1
    still_image_url: "http://x.x.x.x/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=xxxxxx"
    stream_source: "rtsp://admin:[email protected]:554/h264Preview_01_main"

ui-lovelace:

     - camera_image: camera.Camera1
        camera_view: live
        entities: []
        title: Camera1
        type: picture-glance

Hi @michaelhdmd,

yes mine is working, here is my config:

Configuration.yaml

camera:                                         
  - platform: reolink_dev                       
    host: 192.168.44.12                         
    username: admin                             
    password: !secret reolink    
    name: frontdoor                     
    stream: main                                
    protocol: rtsp                              
    scan_interval: 5

binary_sensor:
  - platform: template                                                 
    sensors:                                                       
      motion_frontdoor:                                  
        friendly_name: Camera entrada                                       
        device_class: motion                       
        entity_id: camera.frontdoor                      
        value_template: "{{ is_state('camera.frontdoor', 'motion') }}" 
        delay_off:                                                 
          seconds: 30 

ui-lovelace:

aspect_ratio: 0%
camera_image: camera.frontdoor
entities:
  - entity: binary_sensor.motion_frontdoor
  - entity: light.luz_entrada
title: Entrada
type: picture-glance

Thanks for posting thisā€¦helped me out setting up my camera!

Ive cloned the folder structure and files and created a separate binary_sensors.yaml in the config folder which contains the sensors configuration.
Im trying to call the sensor config by inserting the following syntax into my configuration.yaml

binary_sensors: !include binary_sensors.yaml

the contents of binary_sensors.yaml is taken from https://community.home-assistant.io/u/hmatos post:

  • platform: template
    sensors:
    motion_frontdoor:
    friendly_name: Camera frontdoor
    device_class: motion
    entity_id: camera.frontdoor
    value_template: ā€œ{{ is_state(ā€˜camera.frontdoorā€™, ā€˜motionā€™) }}ā€
    delay_off:
    seconds: 30

However this is not being called. I know the syntax works because if i paste the above syntax into the configuration.yaml file it works. Dows anyone know what i need to do call it?

I have the same problem and I am connected through a NVR. How did you solve? Did you add a network switch before the NVR?

My setup is network switch-NVR-cameras connected to NVR. I have solved image and motion with https://github.com/fwestenberg/reolink
He added chanell option:

Reolink IP camera

Home Assistant Reolink addon

SETUP

  1. Clone this project into your config/custom_components directory
  2. In your configuration.yaml add the following lines:

camera:

  • platform: reolink_dev
    host: IP_ADDRESS
    username: admin
    password: YOUR_PASSWORD
    name: camera (optional, default Reolink Camera)
    stream: main or sub (optional, default main)
    protocol: rtmp or rtsp (optional, default rtmp)
    channel: NVR camera channel (optional, default 0)
    scan_interval: 5 (optional, default 30s)
  1. Create a binary sensor for the motion detection, add this to your binary_sensors.yaml:

platform: template
sensors:
motion_frontdoor:
friendly_name: Camera frontdoor
device_class: motion
entity_id: camera.frontdoor
value_template: ā€œ{{ is_state(ā€˜camera.frontdoorā€™, ā€˜motionā€™) }}ā€
delay_off:
seconds: 30

I have the fwesternberg reolink addon installed and configured.

configuration.yaml

camera:
  - platform: reolink_dev
    host: !secret reolinkip
    username: admin
    password: !secret reolinkpass
    name: frontdoor
    stream: sub
    protocol: rtsp
    channel: 4
    scan_interval: 5

binary_sensors.yaml:

platform: template
sensors:
  motion_frontdoor:
    friendly_name: Porch Cam
    device_class: motion
    entity_id: camera.frontdoor
    value_template: "{{ is_state('camera.frontdoor', 'motion') }}"
    delay_off:
        seconds: 30

ui-lovelace.yaml:

     - camera_image: camera.frontdoor
        entities:
          - binary_sensor.motion_frontdoor
        title: Porch Cam
        type: picture-glance
   

The picture-glace card never displays; when I click on the card, the ā€œwheelā€ keeps spinning. I have the PoE B800 cameras and NVR RLN8-410-E (firmware v2.0.0.142_19090408101). Seems I might be trying to display the ā€œclearā€ rather than the ā€œfluentā€ pic.

1 Like

How many cameras do you have?

2 Cameras installed of 4. They are on Channels 1 and 4.

For camera on NVR channel 1 use parameter in reolink addon channel: 0 and for camera on NVR channel 4 use parameter channel: 3

The ā€˜0ā€™ channel did the trick!!! I also got the motion sensor working, by pulling in the code from the binary_sensor.yaml into the configuration.yaml. I was missing the binary_sensor: !include binary_sensor.yaml line, but I didnā€™t want to mess with the formatting. I was also able to get the second camera configued. That is Channel 4 in the ReoLink app, but used 3 in the configuration.yaml.