Coder Social home page Coder Social logo

reolink_dev's Introduction

Reolink logotype
Home Assistant Reolink custom integration

Current version

The reolink implementation allows you to integrate your Reolink devices in Home Assistant.

Installation

Manual install

# Download a copy of this repository
$ wget https://github.com/fwestenberg/reolink_dev/archive/master.zip

# Unzip the archive
$ unzip master.zip

# Move the reolink_dev directory into your custom_components directory in your Home Assistant install
$ mv reolink_dev-master/custom_components/reolink_dev <home-assistant-install-directory>/config/custom_components/

HACS install

  1. Click on HACS in the Home Assistant menu
  2. Click on Integrations
  3. Click the top right menu (the three dots)
  4. Select Custom repositories
  5. Paste the repository URL (https://github.com/fwestenberg/reolink_dev) in the dialog box
  6. Select category Integration
  7. Click Add
  8. Click Install on the Reolink IP camera box that has now appeared

โš ๏ธ After executing one of the above installation methods, restart Home Assistant. Also clear your browser cache before proceeding to the next step, as the integration may not be visible otherwise.

In your Home Assistant installation go to: Configuration > Integrations, click the button Add Integration > Reolink IP camera Enter the details for your camera. The camera and other sensors will now be available as an entity.

For the motion detection to work, Home Assistant must be reachable via http from your local network. So when using https internally, motion detection will not work at this moment.

For the services and switch entities of this integration to work, you need a camera user of type "Administrator". Users of type "Guest" can only view the switch states but cannot change them and cannot call the services. Users are created and managed through the web interface of the camera (Device Settings / Cog icon -> User) or through the app (Device Settings / Cog icon -> Advanced -> User Management).

Troubleshooting

  • Make sure you have set up the Internal URL in Home Assistant to the correct IP address and port (do not use the mDNS name)
  • Make sure ONVIF is enabled on your camera/NVR. It might be disabled by default and can only be enabled when you have a screen connected to the NVR, not via webb or app clients. Be aware that this can be reset during a firmware upgrade.

Services

The Reolink integration supports all default camera services and additionally provides the following services:

Service reolink_dev.set_sensitivity

Set the motion detection sensitivity of the camera. Either all time schedule presets can be set at once, or a specific preset can be specified.

Service data attribute Optional Description
entity_id no The camera to control.
sensitivity no The sensitivity to set, a value between 1 (low sensitivity) and 50 (high sensitivity).
preset yes The time schedule preset to set. Presets can be found in the Web UI of the camera.

Service reolink_dev.set_backlight

Optimizing brightness and contrast levels to compensate for differences between dark and bright objects using either BLC or WDR mode. This may improve image clarity in high contrast situations, but it should be tested at different times of the day and night to ensure there is no negative effect.

Service data attribute Optional Description
entity_id no The camera to control.
mode no The backlight parameter supports the following values: BACKLIGHTCONTROL: use Backlight Control DYNAMICRANGECONTROL: use Dynamic Range Control OFF: no optimization

Service reolink_dev.set_daynight

Set the day and night mode parameter of the camera.

Service data attribute Optional Description
entity_id no The camera to control.
mode no The day and night mode parameter supports the following values: AUTO Auto switch between black & white mode COLOR Always record videos in color mode BLACKANDWHITE Always record videos in black & white mode.

Service reolink_dev.ptz_control

Control the PTZ (Pan Tilt Zoom) movement of the camera.

Service data attribute Optional Description
entity_id no The camera to control.
command no The command to execute. Possibe values are: AUTO, DOWN, FOCUSDEC, FOCUSINC, LEFT, LEFTDOWN, LEFTUP, RIGHT, RIGHTDOWN, RIGHTUP, STOP, TOPOS, UP, ZOOMDEC and ZOOMINC.
preset yes In case of the command TOPOS, pass the preset ID here. The possible presets are listed as attribute on the camera.
speed yes The speed at which the camera moves. Not applicable for the commands: STOP and AUTO.

The camera keeps moving until the STOP command is passed to the service.

Camera

This integration creates a camera entity, providing a live-stream configurable from the integrations page. In the options menu, the following parameters can be configured:

Parameter Description
Stream Switch between Sub or Main camera stream.
Stream format Switch between h264 and h265 stream formats.
Protocol Switch between the RTMP or RTSP streaming protocol.
Channel When using a single camera, choose stream 0. When using a NVR, switch between the different camera streams.

Binary Sensor

When the camera supports motion detection events, a binary sensor is created for real-time motion detection. The time to switch motion detection off can be configured via the options menu, located at the integrations page. Please notice: for using the motion detection, your Homa Assistant should be reachable (within you local network) over http (not https).

Parameter Description
Motion sensor off delay Control how many seconds it takes (after the last motion detection) for the binary sensor to switch off.

When the camera supports AI objects detection, a binary sensor is created for each type of object (person, vehicle, pet)

Switch

Depending on the camera, the following switches are created:

Switch Description
Email Switch email alerts from the camera when motion is detected.
FTP Switch FTP upload of photo and video when motion is detected.
IR lights Switch the infrared lights to auto or off.
Record audio Record auto or mute. This also implies the live-stream.
Push notifications Enable or disable push notifications to Android/IOS.
Recording Switch recording to the SD card.

Unsupported models

The following models are not to be supported:

  • E1
  • E1 Pro
  • Battery-powered cameras
  • B800: Only with NVR
  • B400: Only with NVR
  • D400: Only with NVR
  • Lumus

reolink_dev's People

Contributors

fwestenberg avatar cpainchaud avatar xannor avatar lasseslambertsen avatar nick2k3 avatar ptyers avatar macl3an avatar ivanpenyahuguet avatar emericklaw avatar rangulvers avatar andriej avatar kosmixlb avatar cogneato avatar dannya avatar davidbb avatar gregoryduckworth avatar rogatty avatar jyx avatar jpsy avatar mrand avatar mathmaniac43 avatar paranoramix avatar rplevka avatar hedgehog57 avatar badabing2005 avatar badstraw360 avatar dhzl84 avatar kaaspad 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.