ZoneMinder

The zoneminder integration sets up Home Assistant with your ZoneMinder instance.

There is currently support for the following device types within Home Assistant:

Configuration

To add the integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] to your installation, add it to the configuration.yamlThe 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. [Learn more] file. After changing the configuration.yamlThe 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. [Learn more] file, restart Home Assistant to apply the changes. The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.

# Example configuration.yaml entry
zoneminder:
  - host: ZM_HOST

Configuration Variables

host string Required

Your ZoneMinder server’s host (and optional port), not including the scheme.

path string (Optional, default: /zm/)

Path to your ZoneMinder install.

path_zms string (Optional)

Path to the CGI script for streaming. This should match PATH_ZMS in ZM’s “Paths” settings.

Default:

/zm/cgi-bin/nph-zms

ssl boolean (Optional, default: false)

Set to true if your ZoneMinder installation is using SSL.

verify_ssl boolean (Optional, default: true)

Verify the certification of the endpoint.

username string (Optional)

Your ZoneMinder username.

password string (Optional)

Your ZoneMinder password. Required if OPT_USE_AUTH is enabled in ZM.

Full configuration

# 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

Action

Once loaded, the zoneminder platform will expose an action (set_run_state) that can be used to change the current run state of ZoneMinder.

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 that changes ZoneMinder to the “Home” run state by including the following action:

actions:
 action: 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 install.

Each binary_sensor created will be named after the hostname used when configuring the ZoneMinder integration.

Camera

The zoneminder camera platform lets you monitor the current stream of your ZoneMinder cameras.

Configuration

To set it up, add the following information to your configuration.yamlThe 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. [Learn more] file:

# Example configuration.yaml entry
camera:
  - platform: zoneminder

Sensor

The zoneminder sensor platform lets you monitor the current state of your ZoneMinder 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.yamlThe 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. [Learn more] file:

# Example configuration.yaml entry
sensor:
  - platform: zoneminder
    include_archived: false

Configuration Variables

include_archived boolean (Optional, default: false)

Whether to include archived ZoneMinder events in event counts.

monitored_conditions list (Optional)

Event count sensors to display in the frontend.

all

All events.

month

Events in the last month.

week

Events in the last week.

day

Events in the last day.

hour

Events in the last hour.

Switch

The zoneminder switch platform allows you to toggle the current function of all cameras attached to your ZoneMinder instance.

Important

You must have the ZoneMinder integration configured to use this and if ZoneMinder authentication is enabled the account specified in the integration configuration must have “Edit” permission for “System”.

To enable this switch, add the following lines to your configuration.yamlThe 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. [Learn more] file:

# Example configuration.yaml entry
switch:
  - platform: zoneminder
    command_on: Modect
    command_off: Monitor

Configuration Variables

command_on string Required

The function you want the camera to run when turned on.

command_off string Required

The function you want the camera to run when turned off.

Note

The default functions installed by ZoneMinder are: None, Monitor, Modect, Record, Mocord, Nodect.