From 8bcdb9ef928ea03dfd161db5d03c46a7c9670663 Mon Sep 17 00:00:00 2001 From: Phil Bruckner Date: Sun, 5 Jul 2020 07:19:51 -0500 Subject: [PATCH] Add legacy polling option for Amcrest motion detection (#13798) --- source/_integrations/amcrest.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/_integrations/amcrest.markdown b/source/_integrations/amcrest.markdown index 78b5297a6c0..00a0dc27b5f 100644 --- a/source/_integrations/amcrest.markdown +++ b/source/_integrations/amcrest.markdown @@ -106,7 +106,9 @@ binary_sensors: default: None keys: motion_detected: - description: "Return `on` when a motion is detected, `off` when not." + description: "Return `on` when a motion is detected, `off` when not. Uses streaming method (see [below](#streaming-vs-polled-binary-sensors))." + motion_detected_polled: + description: "Return `on` when a motion is detected, `off` when not. Uses polled method (see [below](#streaming-vs-polled-binary-sensors))." online: description: "Return `on` when camera is available (i.e., responding to commands), `off` when not." sensors: @@ -143,6 +145,10 @@ Newer Amcrest firmware may not work, then `rtsp` is recommended instead. make sure to follow the steps mentioned at [FFmpeg](/integrations/ffmpeg/) documentation to install the `ffmpeg`. +### Streaming vs Polled Binary Sensors + +Some binary sensors provide two choices for method of operation: streaming or polled. Streaming is more responsive and causes less network traffic because the camera will tell Home Assistant when the sensor's state has changed. Polled mode queries the camera periodically (every five seconds) to check the state of the sensor. Therefore streaming is the better option. However, some camera models and versions of camera firmware do not seem to implement the streaming method properly. Therefore the polled mode is also available. It is recommended to use the streaming mode (e.g., `motion_detected`) first, and if that doesn't work (e.g., results in constant errors), then try the polled mode instead (e.g., `motion_detected_polled`.) + ## Services Once loaded, the `amcrest` integration will expose services that can be called to perform various actions. The `entity_id` service attribute can specify one or more specific cameras, or `all` can be used to specify all configured Amcrest cameras.