Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://www.home-assistant.io/integrations/zoneminder/

configuration.yaml:

Note: I had to disable SSL Verification due to using the docker image w/ it's own ssl and then I proxy with my ssl, and I saw in the logs it was having SSL errors. Since this was all LAN traffic that was over SSL I just disabled verify.

#ZoneMinder
zoneminder:
  - host: domain.tld
    ssl: true
    verify_ssl: false
    username: uname
    password: pwd

camera:
  - platform: zoneminder

sensor:
  - platform: zoneminder
    include_archived: false

switch:
  - platform: zoneminder
    command_on: Modect
    command_off: Monitor

Card YAML:

type: vertical-stack
cards:
  - type: picture-entity
    camera: live
    camera_image: camera.camera_name
    entity: camera.camera_name
  - type: entities
    title: ZoneMinder
    entities:
      - switch.camera_name_state
      - sensor.camera_name_status
      - sensor.camera_name_events

Automation:

data: {}
entity_id: switch.cameraname_state
service: switch.turn_off

Update:

I had issues where HA wouldn't find the ZM cameras after reboot and it would never resolve itself w/o a HA restart, so I added a restart to cron like so:

cat << 'FOE' >/opt/homeassistant/setup/ha_restart_setup.sh
cat << EOL >/etc/cron.d/ha_restart
@reboot root /opt/homeassistant/setup/harestart.sh
EOL
chmod +x /etc/cron.d/ha_restart
cat << EOF >/opt/homeassistant/setup/harestart.sh
#!/bin/bash

sleep 30
systemctl restart home-assistant

touch /tmp/harestart #Just to confirm it ran
EOF
chmod +x /opt/homeassistant/setup/harestart.sh
FOE
chmod +x /opt/homeassistant/setup/ha_restart_setup.sh
  • No labels