mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-01 07:46:49 +00:00

* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
195 lines
5.3 KiB
Markdown
195 lines
5.3 KiB
Markdown
---
|
|
title: "ZoneMinder"
|
|
description: "How to integrate ZoneMinder into Home Assistant."
|
|
logo: zoneminder.png
|
|
ha_category:
|
|
- Hub
|
|
- Binary Sensor
|
|
- Camera
|
|
- Sensor
|
|
- Switch
|
|
ha_release: 0.31
|
|
ha_iot_class: Local Polling
|
|
redirect_from:
|
|
- /components/binary_sensor.zoneminder/
|
|
- /components/camera.zoneminder/
|
|
- /components/sensor.zoneminder/
|
|
- /components/switch.zoneminder/
|
|
---
|
|
|
|
The ZoneMinder integration sets up the integration with your [ZoneMinder](https://www.zoneminder.com) instance.
|
|
|
|
There is currently support for the following device types within Home Assistant:
|
|
|
|
- [Binary Sensor](#binary-sensor)
|
|
- [Camera](#camera)
|
|
- [Sensor](#sensor)
|
|
- [Switch](#switch)
|
|
|
|
## Configuration
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
zoneminder:
|
|
- host: ZM_HOST
|
|
```
|
|
|
|
{% configuration %}
|
|
host:
|
|
description: Your ZoneMinder server's host (and optional port), not including the scheme.
|
|
required: true
|
|
type: string
|
|
path:
|
|
description: Path to your ZoneMinder install.
|
|
required: false
|
|
type: string
|
|
default: "`/zm/`"
|
|
path_zms:
|
|
description: Path to the CGI script for streaming. This should match `PATH_ZMS` in ZM's "Paths" settings.
|
|
required: false
|
|
type: string
|
|
default: "`/zm/cgi-bin/nph-zms`"
|
|
ssl:
|
|
description: Set to `true` if your ZoneMinder installation is using SSL.
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
verify_ssl:
|
|
description: Verify the certification of the endpoint.
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
username:
|
|
description: Your ZoneMinder username.
|
|
required: false
|
|
type: string
|
|
password:
|
|
description: Your ZoneMinder password. Required if `OPT_USE_AUTH` is enabled in ZM.
|
|
required: false
|
|
type: string
|
|
{% endconfiguration %}
|
|
|
|
### Full configuration
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
zoneminder:
|
|
- host: ZM_HOST
|
|
path: ZM_PATH
|
|
path_zms: ZM_PATH_ZMS
|
|
ssl: true
|
|
verify_ssl: true
|
|
username: YOUR_USERNAME
|
|
password: YOUR_PASSWORD
|
|
```
|
|
|
|
### Service
|
|
|
|
Once loaded, the `zoneminder` platform will expose a service (`set_run_state`) that can be used to change the current run state of ZoneMinder.
|
|
|
|
| Service data attribute | Optional | Description |
|
|
|:-----------------------|:---------|:----------------------------------|
|
|
| `id` | no | Host of the ZoneMinder instance. |
|
|
| `name` | no | Name of the new run state to set. |
|
|
|
|
For example, if your ZoneMinder instance was configured with a run state called "Home", you could write an [automation](/getting-started/automation/) that changes ZoneMinder to the "Home" run state by including the following [action](/getting-started/automation-action/):
|
|
|
|
```yaml
|
|
action:
|
|
service: zoneminder.set_run_state
|
|
data:
|
|
id: ZM_HOST
|
|
name: Home
|
|
```
|
|
|
|
## Binary Sensor
|
|
|
|
The `zoneminder` binary sensor platform lets you monitor the availability of your [ZoneMinder](https://www.zoneminder.com) install.
|
|
|
|
Each binary_sensor created will be named after the hostname used when configuring the [ZoneMinder component](/components/zoneminder/).
|
|
|
|
## Camera
|
|
|
|
The `zoneminder` camera platform lets you monitor the current stream of your [ZoneMinder](https://www.zoneminder.com) cameras.
|
|
|
|
### Configuration
|
|
|
|
To set it up, add the following information to your `configuration.yaml` file:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
camera:
|
|
- platform: zoneminder
|
|
```
|
|
|
|
## Sensor
|
|
|
|
The `zoneminder` sensor platform lets you monitor the current state of your [ZoneMinder](https://www.zoneminder.com) install including the number of events, the current state of the cameras and ZoneMinder's current run state.
|
|
|
|
To set it up, add the following information to your `configuration.yaml` file:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
sensor:
|
|
- platform: zoneminder
|
|
include_archived: false
|
|
```
|
|
|
|
{% configuration %}
|
|
include_archived:
|
|
description: Whether to include archived ZoneMinder events in event counts.
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
monitored_conditions:
|
|
description: Event count sensors to display in the frontend.
|
|
required: false
|
|
type: list
|
|
keys:
|
|
all:
|
|
description: All events.
|
|
month:
|
|
description: Events in the last month.
|
|
week:
|
|
description: Events in the last week.
|
|
day:
|
|
description: Events in the last day.
|
|
hour:
|
|
description: Events in the last hour.
|
|
{% endconfiguration %}
|
|
|
|
## Switch
|
|
|
|
The `zoneminder` switch platform allows you to toggle the current function of all cameras attached to your [ZoneMinder](https://www.zoneminder.com) instance.
|
|
|
|
<div class='note'>
|
|
|
|
You must have the [ZoneMinder component](/components/zoneminder/) configured to use this and if ZoneMinder authentication is enabled the account specified in the integration configuration must have "Edit" permission for "System".
|
|
|
|
</div>
|
|
|
|
To enable this switch, add the following lines to your `configuration.yaml` file:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
switch:
|
|
- platform: zoneminder
|
|
command_on: Modect
|
|
command_off: Monitor
|
|
```
|
|
|
|
{% configuration %}
|
|
command_on:
|
|
description: The function you want the camera to run when turned on.
|
|
required: true
|
|
type: string
|
|
command_off:
|
|
description: The function you want the camera to run when turned off.
|
|
required: true
|
|
type: string
|
|
{% endconfiguration %}
|
|
|
|
<div class='note'>
|
|
The default functions installed by ZoneMinder are: None, Monitor, Modect, Record, Mocord, Nodect.
|
|
</div>
|