Home Assistant Compatible Cameras: A Comprehensive Guide

Integrating cameras with Home Assistant can significantly enhance your smart home setup, providing surveillance, security, and automation capabilities. This article explores various aspects of camera integration with Home Assistant, focusing on popular brands like Reolink and Tapo, as well as protocols like ONVIF and RTSP.

Home Assistant Interface

Understanding Camera Integration with Home Assistant

The Camera integration connects and integrates Home Assistant with your devices, services, and more. A building block integration differs from the typical integration that connects to a device or service. A way to test if you have set up your camera platform correctly, is to use Actions from the Developer Tools.

A camera can have the following states:

  • Turning on camera
  • Turning off camera

You can also perform actions such as:

  • Playing a live stream from a camera to selected media player(s). Stream format supported by stream integration and selected media_player.
  • Making a .mp4 recording from a camera stream. Both duration and lookback options are suggestions, but should be consistent per camera. The actual length of the recording may vary.

Key Configuration Options

  • Target recording length (in seconds): Target lookback period (in seconds) to include in addition to duration. Only available if there is currently an active HLS stream.
  • The path part of filename must be an entry in the allowlist_external_dirs in your homeassistant: section of your configuration.yaml. The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI.

Reolink Cameras and Home Assistant

The integration allows you to control Reolink NVRs or cameras. Reolink cameras are known for their local storage, without the need for a cloud subscription or account. Reolink cameras can operate fully locally on your network, putting privacy first. When blocking internet access for the Reolink devices, the Home Assistant integration, as well as the Reolink app/client, will continue to work as usual.

Read also: Enhance Your Well-being

Reolink cameras provide excellent day- and nighttime video clarity at an affordable price. An SD card in the camera offers local recording, while an optional Reolink NVR/Hub can offer a large recording capacity indoors.

Reolink Camera

Initializing and configuring camera credentials is the first step. A brand new Reolink camera first needs to be connected to the network and initialized. During initialization, the camera’s credentials need to be set. Other special characters will cause encoding issues in the video streams used by this integration and are, therefore, not allowed. You can also connect a Wi-Fi camera using a self-made QR code. Normally, the digits are printed directly under the QR code. Then power up the camera while pointing it at the QR code.

Reolink can be auto-discovered by Home Assistant. it will be shown as Discovered. If it wasn’t discovered automatically, don’t worry!

Configuration Parameters

  • Hostname or IP Address: The hostname or IP address of your Reolink device. For example: ‘192.168.1.25’. You can find it in your router or in the Reolink app under Settings -> Device (top icon) -> Networkinformation -> IP-address.
  • Username: Username to log in to the Reolink device itself.
  • Password: Password to log in to the Reolink device itself.
  • Streaming Protocol: Switch between RTSP, RTMP, or FLV streaming protocol. RTSP supports 4K streams (h265 encoding) while RTMP and FLV do not.

If an entity listed below has an asterisk (*) next to its name, it means it is disabled by default. If an entity listed below has a plus (+) next to its name, it means this entity supports push updates. For redundancy, the state of all entities is also polled.

For cameras connected to a NVR/Hub, the polling interval is 10 seconds per camera, with a minimum of 60 seconds total. For directly connected cameras, the polling interval is 60 seconds. For entities without a plus (+), polling is the only update method. Another exception are battery cameras, most entities are still polls every 60 seconds.

Read also: Organized Home Ideas

For the crossline, intrusion, linger, item forgotten, and item taken entities, you first need to configure the lines/zones in the Reolink app (Settings > Detection alarm > Smart event detection). In the Reolink app, you can add up to 3 zones/lines, and for each zone/line, you can enable/disable the person/vehicle/animal detection.

Day night switch threshold determines at which light level the camera switches from Color to Black & white.

Some Reolink PTZ cameras can move at different speeds. For those cameras, the reolink.ptz_move action can be used in combination with the PTZ left, right, up, down, zoom in, or zoom out entity which allows specifying the speed attribute.

PTZ (Pan-Tilt-Zoom) Camera Controls

  • PTZ Button Entity: Name of the Reolink PTZ button entity to control.
  • PTZ Move Speed: PTZ move speed.

PTZ preset positions can be set in the Reolink app/windows/web client, the names of the presets will be loaded into Home Assistant at the start of the integration.

Play quick reply messages/Auto quick reply messages can be recorded in the Reolink phone app where a name is also supplied. New or updated quick reply messages will be loaded into Home Assistant at the start of the integration.

Read also: Smart Home Security Guide

Hub scene modes can be set in the Reolink app/client. The scene names are loaded into Home Assistant at the start of the integration. List of device ids of the Reolink Chimes to control. The ringtone to play. In some camera models, there is a delay of up to 5 seconds between the turn-off command and the sound stopping.

When the Privacy mode is ON, almost all other entities will be unavailable because the camera shuts down the API and camera streams. When turning OFF the Privacy mode, all entities will become available again.

The Privacy mask switch will only be added when the privacy mask is configured in the Reolink app/client under settings (gear icon) > Display > Privacy Mask.

When the Infrared lights in night mode entity is set to OFF, the infrared LEDs are always OFF. When the Infrared lights in night mode entity is set to ON, the infrared LEDs will be on when the camera is in night vision mode.

The Push-notification in the Reolink app is independent of the Home Assistant setting. It is also independent of the settings on other phones connected to the same camera.

The PTZ patrol positions first need to be configured using the Reolink app/windows/web client. When no positions are configured, the PTZ patrol entity will not be added.

The Manual record switch will turn off automatically after 10 minutes.

Polling the status of the Hardwired chime enabled switch can make the hardwired chime rattle a bit depending on the model of the chime. Therefore the status of this switch is only polled one time (about 1 minute after the integration starts).

In the sidebar, select “Media” > “Reolink” and select the camera of which you want to see recordings. Optionally, select if you want a high or low resolution stream and select the recording date.

†Requires a camera hardware version that supports remote access. All 5MP or newer E1 Pro models (where the hardware version includes “5MP”) meet this requirement.

Battery-powered Reolink cameras can be used with Home Assistant with the help of a Reolink Home Hub or NVR. The Home Hub/NVR will act as a bridge between the battery-powered cameras and Home Assistant, conserving the battery life. All features of the battery-powered cameras will be available just like regular-powered cameras.

Viewing the camera stream in Home Assistant will keep the battery camera awake during viewing, consuming battery life. Therefore, ensure you do not use the camera stream on a dashboard that is constantly being viewed, like a wall panel dashboard.

Compatible Reolink NVR Models

  • RLN8-410 NVR (only hardware versions N7MB01, N3MB01, N2MB02, or H3MB18)
  • RLN16-410 NVR (only hardware versions N6MB01 or H3MB18)

Next to the entry, select the three dots menu. Underneath the Device info, select the three dots menu. This will also decouple the chime from the doorbell in the Reolink app/client.

Although you can receive text notifications without remote access, to see the camera image in the notification (rich notification), the phone needs to be able to reach Home Assistant. In order to receive such a rich notification, we are going to make an automation in Home Assistant.

Then under Entity, select the binary sensor from the drop-down list corresponding to the camera event for which you want to receive a rich notification. Note that these entity names will be translated into the language you configured Home Assistant in. You can type to search through all your entities.

You can add multiple triggers if you want to send the same message for multiple camera events like person and vehicle detection. You can also create multiple automations with different messages for each event. For instance only when you are not home.

The companion app will provide a device_tracker entity based on the GPS of your phone if you allow location tracking during the setup of the app.

Select + Add Condition > Entity > State. Select Add Condition again > Other conditions > Template.

Under Filename, fill in /media/reolink_snapshot/last_snapshot_doorbell.jpg. The first part /media/ is absolutely necessary to allow your phone to access the saved image when it receives the notification.

Under message, type the text you want to receive in the notification. If you want to give the notification a title, select the title option. Select the data option and fill in image: /media/local/reolink_snapshot/last_snapshot_doorbell.jpg. Note that /media/ of the filename of step 5 now needs to be changed to /media/local/.

You are all set, ring your doorbell and see the notification on your phone.

Goal: At the end of this tutorial, you will have a drop-down on your dashboard with different time choices to pause your notifications. When the time is up, the notifications will become active again. You can define as many time options as you want.

Leave the time duration all zeros. Now select the three dots menu of this trigger and press Edit ID.

There is nothing in the And if section. First, we make the option to reset the dropdown box. Check the duration box and enter the time delay you used for your first time delay. Below is an example. You can end it early by just selecting the timer, then selecting finish.

Increase the framerate and maximum bitrate of a camera when a person/vehicle/animal is detected and lower them again after 1 minute of no detection.

The 4K camera streams are H265 encoded, support for playing H265 encoding in browsers (Chrome/Firefox/Edge/Safari etc.) is still very limited, therefore the 4K clear stream may not play in all browsers or on all phones in the Home Assistant Companion app. By default only the lower resolution Fluent camera entity is enabled in Home Assistant.

Older firmware versions do not expose the necessary information the integration needs to function. Ensure the camera is updated to the latest firmware prior to setting up the integration. Note that Reolink auto update and check for update functions in the app/windows/web client often do not show the latest available firmware version.

If you cannot, in the Reolink mobile app, Windows, or Mac client ensure at least one of the HTTP/HTTPS ports are enabled under Settings > top camera model box > Network Information > Advanced (mobile) or Settings > Network > Advanced > Port Settings (PC). On some camera models, the RTMP port needs to be enabled in order for the HTTP(S) port to function properly.

Using a VLAN or other network restrictions between the Home Assistant device and the Reolink device is possible, but is also known to cause issues when not properly configured. Ensure HTTP (port 80), HTTPS (port 443), RTMP (port 1935), RTSP (port 554), ONVIF (port 8000) and TCP (port 9000) communication is not being blocked.

Note that almost all entities, including motion/ai detection and the camera streams, will be unavailable when privacy mode is turned ON.

Do not set a static IP in the Reolink device itself, but leave the Connection Type on DHCP under Settings > Network > Network Information > Set Up. If you set it to static on the Reolink device itself, this is known to cause incorrect DHCP requests on the network. The incorrect DHCP request causes Home Assistant to use the wrong IP address for the camera, resulting in connection issues.

Reolink cameras can support a limited amount of simultaneous connections. Therefore using third-party software like Frigate, Blue Iris, or Scrypted, or using the ONVIF integration at the same time can cause the camera to drop connections. This results in short unavailabilities of the Reolink entities in Home Assistant. Especially when the connections are coming from the same device (IP) where Home Assistant is running, the Reolink cameras can get confused, dropping one connection in favor of the other originating from the same host IP.

If you experience disconnections/unavailabilities of the entities, please first temporarily shut down the other connections (like Frigate) to diagnose if that is the problem. If that is indeed the problem, you could try moving the third-party software to a different host (IP address) since that is known to solve the problem most of the time.

If the Reolink entities go to unavailable for short periods, the camera may be overloaded with requests resulting in short connection drops. To resolve this, first, check if the integration is using ONVIF push instead of ONVIF long polling (resource intensive) or Fast polling (very resource intensive), see the Reducing latency of motion events section.

The Reolink Home Assistant integration is supposed to wake battery cameras only once every 6 hours for a few seconds, or to perform a data update when the battery camera wakes up on its own (at most once per hour). This should not have a significant impact on battery life. You can check the correct operation using the Sleep status entity.

Make sure the Preload camera stream option is turned off for all battery camera entities under Settings > Devices & services > Reolink integration card > x devices > select the battery camera > select the camera stream (do this for all enabled streams) > Gear icon. The Preload camera stream will keep a active stream open, keeping the camera awake.

tags: #home #assistant #compatible #cameras