Git Product home page Git Product logo

reolink's Introduction

Reolink IP camera

Home Assistant Reolink addon

Unsupported models

  • B800
  • B400
  • D400
  • E1
  • E1 Pro
  • Battery-powered camera's

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
  1. Create email, FTP upload and infrared light buttons:
platform: template
switches:
  camera_frontdoor_email:
    value_template: "{{ is_state_attr('camera.frontdoor', 'email_enabled', true) }}"
    turn_on:
      service: camera.enable_email
      data:
        entity_id: camera.frontdoor
    turn_off:
      service: camera.disable_email
      data:
        entity_id: camera.frontdoor
    icon_template: >-
      {% if is_state_attr('camera.frontdoor', 'email_enabled', true) %}
        mdi:email
      {% else %}
        mdi:email-outline
      {% endif %}
        
  camera_frontdoor_ftp:
    value_template: "{{ is_state_attr('camera.frontdoor', 'ftp_enabled', true) }}"
    turn_on:
      service: camera.enable_ftp
      data:
        entity_id: camera.frontdoor
    turn_off:
      service: camera.disable_ftp
      data:
        entity_id: camera.frontdoor
    icon_template: >-
      {% if is_state_attr('camera.frontdoor', 'ftp_enabled', true) %}
        mdi:filmstrip
      {% else %}
        mdi:filmstrip-off
      {% endif %}
      
  camera_frontdoor_ir_lights:
    value_template: "{{ is_state_attr('camera.frontdoor', 'ir_lights_enabled', true) }}"
    turn_on:
      service: camera.enable_ir_lights
      data:
        entity_id: camera.frontdoor
    turn_off:
      service: camera.disable_ir_lights
      data:
        entity_id: camera.frontdoor
    icon_template: >-
      {% if is_state_attr('camera.frontdoor', 'ir_lights_enabled', true) %}
        mdi:flashlight
      {% else %}
        mdi:flashlight-off
      {% endif %}
  1. Now restart Home Assistant.

USAGE In your Home Assistant Lovelace, add a new card with the following:

camera_image: camera.frontdoor
entities:
  - switch.camera_frontdoor_ir_lights
  - switch.camera_frontdoor_email
  - switch.camera_frontdoor_ftp
  - binary_sensor.motion_frontdoor
title: frontdoor
type: picture-glance

Now you will have card like this (notice the buttons and motion icon):

alt text

reolink's People

Contributors

fwestenberg avatar emericklaw avatar kosmixlb avatar hedgehog57 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.