|
| 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. |
0 commit comments