Skip to content

Commit 824e2c2

Browse files
tchellomelloballoob
authored andcommitted
Updated Amcrest documentation to use hub component (home-assistant#2881)
* Updated Amcrest documentation to use hub component * Set default streaming source to snapshot * updated version to 0.49
1 parent 603fba6 commit 824e2c2

File tree

3 files changed

+67
-44
lines changed

3 files changed

+67
-44
lines changed

source/_components/amcrest.markdown

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
layout: page
3+
title: "Amcrest IP Camera"
4+
description: "Instructions how to integrate Amcrest IP cameras within Home Assistant."
5+
date: 2017-06-24 10:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: amcrest.png
11+
ha_category: Hub
12+
ha_iot_class: "Local Polling"
13+
ha_release: 0.49
14+
---
15+
16+
The `amcrest` platform allows you to integrate your [Amcrest](https://amcrest.com/) IP camera in Home Assistant.
17+
18+
To enable your camera in your installation, add the following to your `configuration.yaml` file:
19+
20+
```yaml
21+
# Example configuration.yaml entry
22+
amcrest:
23+
- host: IP_ADDRESS
24+
username: USERNAME
25+
password: PASSWORD
26+
sensors:
27+
- motion_detector
28+
- sdcard
29+
30+
- host: IP_ADDRESS
31+
username: USERNAME
32+
password: PASSWORD
33+
resolution: low
34+
stream_source: snapshot
35+
sensors:
36+
- ptz_preset
37+
```
38+
39+
Configuration variables:
40+
41+
- **host** (*Required*): The IP address or hostname of your camera. If using hostname, make sure the DNS works as expected.
42+
- **username** (*Required*): The username for accessing your camera.
43+
- **password** (*Required*): The password for accessing your camera.
44+
- **name** (*Optional*): This parameter allows you to override the name of your camera. The default is "Amcrest Camera".
45+
- **port** (*Optional*): The port that the camera is running on. The default is 80.
46+
- **resolution** (*Optional*): This parameter allows you to specify the camera resolution. For a high resolution (1080/720p), specify the option `high`. For VGA resolution (640x480p), specify the option `low`. If omitted, it defaults to *high*.
47+
- **stream_source** (*Optional*): The data source for the live stream. `mjpeg` will use the camera's native MJPEG stream, whereas `snapshot` will use the camera's snapshot API to create a stream from still images. You can also set the `rtsp` option to generate the streaming via RTSP protocol. If omitted, it defaults to *snapshot*.
48+
- **ffmpeg_arguments**: (*Optional*): Extra options to pass to ffmpeg, e.g. image quality or video filter options.
49+
- **authentication**: (*Optional*): Defines which authentication method to use only when **stream_source** is **mjpeg**. Currently *aiohttp* only support *basic*. It defaults to *basic*.
50+
- **scan_interval** (*Optional*): Defines the update interval of the sensor in seconds. The default is 10 seconds.
51+
- **sensors** array (*Optional*): Conditions to display in the frontend. By default, *none* of the conditions are enabled. The following conditions can be monitored.
52+
- **motion_detector**: Return True/False when a motion is detected
53+
- **sdcard**: Return the SD card usage by reporting the total and used space
54+
- **ptz_preset**: Return the number of PTZ preset positions configured for the given camera
55+
56+
**Note:** Amcrest cameras with newer firmwares no longer have the ability to stream `high` definition video with MJPEG encoding. You may need to use `low` resolution stream or the `snapshot` stream source instead. If the quality seems too poor, lower the `Frame Rate (FPS)` and max out the `Bit Rate` settings in your camera's configuration manager. If you defined the *stream_source* to **mjpeg**, make sure your camera supports *Basic* HTTP authentication. Newer Amcrest firwmares may not work, then **rtsp** is recommended instead.
57+
58+
**Note:** If you set the `stream_source` option to `rtsp`, make sure to follow the steps mentioned at
59+
[FFMPEG](https://home-assistant.io/components/ffmpeg/) documentation to install the `ffmpeg`.
60+
61+
Finish its configuration by visiting the [Amcrest sensor page](/components/sensor.amcrest/) or [Amcrest camera page](/components/camera.amcrest/).
62+
63+
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.

source/_components/camera.amcrest.markdown

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,14 @@ ha_iot_class: "Local Polling"
1313
ha_release: 0.34
1414
---
1515

16-
The `amcrest` platform allows you to integrate your [Amcrest](https://amcrest.com/) IP camera in Home Assistant.
16+
To get your [Amcrest](https://amcrest.com/) cameras working within Home Assistant, please follow the instructions for the general [Amcrest component](/components/amcrest).
1717

18-
To enable your camera in your installation, add the following to your `configuration.yaml` file:
18+
Once you have enabled the [Amcrest component](/components/amcrest), add the following to your `configuration.yaml` file:
1919

2020
```yaml
2121
# Example configuration.yaml entry
2222
camera:
2323
- platform: amcrest
24-
host: IP_ADDRESS
25-
username: USERNAME
26-
password: PASSWORD
2724
```
2825
29-
Configuration variables:
30-
31-
- **host** (*Required*): The IP address or hostname of your camera. If using hostname, make sure the DNS works as expected.
32-
- **username** (*Required*): The username for accessing your camera.
33-
- **password** (*Required*): The password for accessing your camera.
34-
- **name** (*Optional*): This parameter allows you to override the name of your camera. The default is "Amcrest Camera".
35-
- **port** (*Optional*): The port that the camera is running on. The default is 80.
36-
- **resolution** (*Optional*): This parameter allows you to specify the camera resolution. For a high resolution (1080/720p), specify the option `high`. For VGA resolution (640x480p), specify the option `low`. If omitted, it defaults to *high*.
37-
- **stream_source** (*Optional*): The data source for the live stream. `mjpeg` will use the camera's native MJPEG stream, whereas `snapshot` will use the camera's snapshot API to create a stream from still images. You can also set the `rtsp` option to generate the streaming via RTSP protocol. If omitted, it defaults to *mjpeg*.
38-
- **ffmpeg_arguments**: (*Optional*): Extra options to pass to ffmpeg, e.g. image quality or video filter options.
39-
40-
**Note:** Amcrest cameras with newer firmwares no longer have the ability to stream `high` definition video with MJPEG encoding. You may need to use `low` resolution stream or the `snapshot` stream source instead. If the quality seems too poor, lower the `Frame Rate (FPS)` and max out the `Bit Rate` settings in your camera's configuration manager.
41-
42-
**Note:** If you set the `stream_source` option to `rtsp`, make sure to follow the steps mentioned at
43-
[FFMPEG](https://home-assistant.io/components/ffmpeg/) documentation to install the `ffmpeg`.
44-
4526
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.

source/_components/sensor.amcrest.markdown

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,13 @@ ha_release: 0.37
1313
ha_iot_class: "Local Polling"
1414
---
1515

16-
The `amcrest` sensor allows you to integrate your [Amcrest](https://amcrest.com/) IP camera in Home Assistant.
16+
To get your [Amcrest](https://amcrest.com/) cameras working within Home Assistant, please follow the instructions for the general [Amcrest component](/components/amcrest).
1717

18-
To enable the `amcrest` sensors on your camera, add the following to your `configuration.yaml` file:
18+
Once you have enabled the [Amcrest component](/components/amcrest), add the following to your `configuration.yaml` file:
1919

2020
```yaml
2121
# Example configuration.yaml entry
2222
sensor:
2323
- platform: amcrest
24-
host: IP_ADDRESS
25-
username: USERNAME
26-
password: PASSWORD
27-
monitored_conditions:
28-
- motion_detector
29-
- sdcard
30-
- ptz_preset
3124
```
32-
33-
Configuration variables:
34-
35-
- **host** (*Required*): The IP address or hostname of your camera. If using hostname, make sure the DNS works as expected.
36-
- **username** (*Required*): The username for accessing your camera.
37-
- **password** (*Required*): The password for accessing your camera.
38-
- **name** (*Optional*): This parameter allows you to override the name of your camera. The default is "Amcrest Camera".
39-
- **port** (*Optional*): The port that the camera is running on. The default is 80.
40-
- **scan_interval** (*Optional*): Defines the update interval of the sensor in seconds. The default is 10 seconds.
41-
- **monitored_conditions** array (*Required*): Conditions to display in the frontend. The following conditions can be monitored.
42-
- **motion_detector**: Return True/False when a motion is detected
43-
- **sdcard**: Return the SD card usage by reporting the total and used space
44-
- **ptz_preset**: Return the number of PTZ preset positions configured for the given camera
45-
4625
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.

0 commit comments

Comments
 (0)