Zoneminder integration not showing any entities/services

Hey all,

This problem is making me rip my hair out. This is incredibly difficult for me because I haven’t ever done any programming before.

Despite this, I’ve managed to edit my HA config file correctly and my HA logs show no issues with ZM. However, I can’t see any sensors or switches for zoneminder anywhere, even after multiple restarts.

I’ve got ZM and Frigate installed in Dockers on my Unraid server, and my HA is running on a VM inside that same server.
Both ZM and Frigate are working great on their own.

This is my current config.

CODE: SELECT ALL

zoneminder:
  - host: 192.168.0.20:8443
    ssl: true
    verify_ssl: false
    username: XXXXXXXX
    password: XXXXXXXXX
sensor:
  - platform: zoneminder
    include_archived: true
switch:
  - platform: zoneminder
    command_on: Record
    command_off: Monitor

Basically I just want to be able to use Frigate’s person/object detection as a trigger to start recording on ZM. When Frigate doesn’t detect anything, all I want ZM to do is to monitor the cameras - no motion detection or recording. I don’t even need to display any cameras in HA, because I’ve got that covered with ZMninja.

So how can I make this work? Can someone please explain in step-by-step terms?
If it helps, I’ve also got an MQTT broker set up on my Unraid server as a docker.

Did you restart home assistant? There’s nothing really step by step here. You have the proper config, just restart and they should show up. The only caveat is that you cannot have 2 sensor or switch fields. Put them all in 1 section, otherwise whatever is loaded last is what is used.

Like I said, even after multiple restarts.

Where should I be looking? I’m looking in the developer options, and even when trying to make an automation to use frigate as a trigger, I can’t see any zoneminder serivces to call.

You’re saying I can only use either sensor or switch? Not both?
If all I want to do is use Frigate to trigger Zoneminder recording, what should I use? Sensor or switch fields? Which should I delete?

No, you can only have 1 switch section and only 1 sensor section. Both of those sections can have as many platforms as you want, but you cannot duplicate the field.

GOOD

switch:
- platform: abc
  ...
- platform: xyz
  ...

sensor:
- platform: abc
  ...
- platform: xyz
  ...

BAD

switch:
- platform: abc
  ...

switch:
- platform: xyz
  ...

sensor:
- platform: abc
  ...

sensor:
- platform: xyz
  ...

It depends what each platform offers. I don’t remember what those sensors/switches do. I would assume you need them all.

I don’t get it. I’ve only used ‘platform’ once in either switch or sensor fields.
I’ve only mentioned ‘switch’ once and ‘sensor’ once, and within them, only ‘platform’ once.

What am I doing wrong?

Answer the following Question:

In your ENTIRE configuration.yaml, do you have more than 1 sensor or switch section? If the answer is no, then this isn’t the problem and other areas need to be investigated.

Here’s my entire configuration.yaml

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
frontend:
  themes: !include_dir_merge_named themes

asuswrt:
  host: 192.168.0.1
  username: XXXXXXX
  password: XXXXXXX

#zoneminder integration
zoneminder:
  - host: 192.168.0.20:8443
    ssl: true
    verify_ssl: false
    username: XXXXXXX
    password: XXXXXX
#zoneminder sensor
sensor:
  - platform: zoneminder
    include_archived: true
switch:
  - platform: zoneminder
    command_on: Record
    command_off: Monitor

That’s literally, entirely it. ‘platform’ doesn’t appear anywhere else.

Where else could I possibly be going wrong?

Check your logs for errors. Please please please stop asking what you’re doing wrong. I’ll help you out. Relax.

Thanks man. Sorry if I’m coming across abrasive, this has just been causing me huge amounts of stress lately. I’ve invested in IP cameras and a PoE switch because various people on this forum have convinced me it’s a lot easier than it actually is.

I really appreciate your help.

Here’s my logs as they appear in the configuration menu.

Failed to connect http://192.168.0.20:8080/json, Error: 501, message="Unsupported method ('POST')", url=URL('http://192.168.0.20:8080/json'), Line: 89
22:42:37 – (ERROR) Blue Iris NVR (custom integration) - message first occurred at 24:38:51 and shows up 5977 times
The 'asuswrt' option near /config/configuration.yaml:2 is deprecated, please remove it from your configuration
22:37:26 – (WARNING) ASUSWRT - message first occurred at June 28, 2021, 01:58:17 and shows up 2 times
Error opening stream rtmp://192.168.0.20/live/annke_cam
22:13:18 – (ERROR) Stream - message first occurred at June 28, 2021, 01:58:58 and shows up 176 times
Update for camera.camera_1_fluent fails
22:10:03 – (ERROR) components/zoneminder/camera.py - message first occurred at June 28, 2021, 02:39:27 and shows up 32 times
Update of camera.camera_1_fluent is taking over 10 seconds
22:10:03 – (WARNING) helpers/entity.py - message first occurred at June 28, 2021, 02:39:27 and shows up 32 times
Update for camera.camera_1 fails
21:39:53 – (ERROR) components/zoneminder/camera.py - message first occurred at June 28, 2021, 03:58:18 and shows up 17 times
Unable to get API response from ZoneMinder
21:39:53 – (ERROR) /usr/local/lib/python3.8/site-packages/zoneminder/zm.py - message first occurred at June 28, 2021, 03:58:18 and shows up 49 times
Error while executing automation automation.frigate_zoneminder: required key not provided @ data['name']
20:12:27 – (ERROR) Automation - message first occurred at June 28, 2021, 07:01:45 and shows up 69 times
Frigate - Zoneminder: Error executing script. Invalid data for call_service at pos 1: required key not provided @ data['name']
20:12:27 – (ERROR) Automation - message first occurred at June 28, 2021, 07:01:45 and shows up 69 times
[Dining Room TV(192.168.0.201):8009] Failed to connect to service ServiceInfo(type='host', data=('192.168.0.201', 8009)), retrying in 5.0s
14:13:00 – (ERROR) /usr/local/lib/python3.8/site-packages/pychromecast/socket_client.py - message first occurred at June 28, 2021, 02:16:19 and shows up 11 times
[Office speaker(192.168.0.83):8009] Heartbeat timeout, resetting connection
14:12:45 – (WARNING) /usr/local/lib/python3.8/site-packages/pychromecast/socket_client.py - message first occurred at June 28, 2021, 02:16:04 and shows up 16 times
Update for switch.camera_1_state fails
11:39:53 – (ERROR) components/zoneminder/switch.py - message first occurred at June 28, 2021, 03:58:18 and shows up 2755 times
Update for sensor.camera_1_status fails
11:39:52 – (ERROR) components/zoneminder/sensor.py - message first occurred at June 28, 2021, 03:58:18 and shows up 2748 times
Unable to connect to ZoneMinder
11:39:22 – (ERROR) /usr/local/lib/python3.8/site-packages/zoneminder/zm.py - message first occurred at 24:13:50 and shows up 17836 times
Could not fetch runstates from ZoneMinder
11:39:22 – (WARNING) /usr/local/lib/python3.8/site-packages/zoneminder/zm.py - message first occurred at 24:13:50 and shows up 1372 times
Could not get availability for monitor 1.
11:39:22 – (WARNING) /usr/local/lib/python3.8/site-packages/zoneminder/monitor.py - message first occurred at 24:13:50 and shows up 2744 times
Could not get status for monitor 1.
11:39:22 – (WARNING) /usr/local/lib/python3.8/site-packages/zoneminder/monitor.py - message first occurred at 24:13:50 and shows up 2744 times
Error demuxing stream:
10:15:39 – (ERROR) Stream
RTP: PT=60: bad cseq e0d3 expected=d075
10:15:39 – (ERROR) components/stream/worker.py
Websocket connection failed, retrying in 15s: Cannot connect to host 192-168-0-20.c1d1d60ee1954e14a8660980e7bb3aba.plex.direct:32400 ssl:default [None]
10:15:32 – (ERROR) /usr/local/lib/python3.8/site-packages/plexwebsocket.py - message first occurred at 08:50:09 and shows up 4 times
Timeout error fetching information from http://192.168.0.20:5000/api/stats -
10:15:25 – (ERROR) Frigate (custom integration) - message first occurred at 08:00:15 and shows up 31 times
Disconnected from MQTT server 192.168.0.20:1883 (1)
10:14:55 – (WARNING) MQTT - message first occurred at 08:50:37 and shows up 7 times
Error fetching frigate data:
10:12:55 – (ERROR) Frigate (custom integration) - message first occurred at 08:00:15 and shows up 4 times
Could not connect to Plex server: NATEFLIX (HTTPSConnectionPool(host='192-168-0-20.c1d1d60ee1954e14a8660980e7bb3aba.plex.direct', port=32400): Read timed out. (read timeout=30))
08:49:12 – (ERROR) Plex Media Server
Cannot complete login
01:02:08 – (WARNING) Blue Iris NVR (custom integration) - message first occurred at 24:38:51 and shows up 5 times
Failed to access BlueIris Server (192.168.0.20)
01:02:08 – (WARNING) Blue Iris NVR (custom integration) - message first occurred at 24:38:51 and shows up 5 times
Error requesting RT-AC87U data: Cannot connect to host 192.168.0.1:40493 ssl:default [Connect call failed ('192.168.0.1', 40493)]
24:15:58 – (ERROR) UPnP/IGD
https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned 503
June 28, 2021, 22:58:39 – (ERROR) /usr/local/lib/python3.8/site-packages/metno/__init__.py
Resource connection failed to plex.tv: Microsoft Edge
June 28, 2021, 16:34:17 – (ERROR) Plex Media Server
http://192.168.0.20:32400: Client not found at http://192.168.0.20:32400
June 28, 2021, 16:34:17 – (ERROR) /usr/local/lib/python3.8/site-packages/plexapi/myplex.py - message first occurred at June 28, 2021, 16:34:17 and sh

Well tbh, you’re going the hardest route possible. Frigate can do everything that zoneminder can at this point and you don’t really need both. I removed zoneminder 2 years ago in favor of other alternatives. Integrating both is probably the root of your problem. And judging by the errors, it seems that the integration cannot connect to any of your zoneminder cameras. Is something else connected to those feeds?

sigh
Every time I try and do a different combination, somebody tells me the same thing - that I’m going about it the hardest route possible. Please help me understand, is it possible or not?

Literally nothing else is connected to those feeds. I’m only running one camera at the moment. It’s an Annke C800.
All I want is an NVR solution that:

  1. Allows me to view cameras in real time and at LEAST at 15fps on a mobile app AND web WITH audio.
  2. Records events based on object/facial recognition WITH audio.
  3. Allows me to view events easily in a timeline so that I can quickly access an event weeks ago without scrolling a webpage forever.

This is why I decided to use ZM triggered by Frigate. Frigate uses object detection, and ZM offers the app with live viewing and nice event recording/sorting.

Can you suggest an alternative solution for the above critera?

Yes, but you have to understand the system. This will require extra work from you in order to do it. You have to try different things, like turning off frigate and keeping on zoneminder to find the root cause of your issues. I have no idea if zoneminder allows 2 connections to 1 camera. I have no idea if your camera supports it. There’s alot of things at play here and you’re a beginner swimmer trying to jump in the deep end. Dip your toes first.

You’re running frigate and zoneminder. What do you mean only 1 thing is connected. Your logs indicate otherwise. So what’s connected to frigate? What’s connected to zoneminder?

Nope, sorry. I don’t have the 15fps requirement, I collect all my feeds between 5-7 historically because of server space.

Outside that, I noticed taht you have tons of disconnects elsewhere in your system. Like with MQTT and chromecast.

How good is your router/network?

Ok, so you’re saying that my camera may not support streaming to more than one platform at a time? Fair enough. I’ve just shut down frigate and restarted ZM and HA.

Still nothing.

What’s next?

Just the one camera. That’s it.

Ok, so just imagine that I need 5-7 fps and try to suggest a better solution - one that records audio and provides live views through a mobile app - with audio.

If I have to buy better hardware to achieve this, I will. I’m willing to do whatever it takes, but I actually need someone helping me with this. All I’ve gotten up till now is snarky replies or I’m just straight-up ignored by the community.

Home assistant mobile app and frigate, with frigate extended to a dashboard.

There’s a bunch of integrations that I could never get working that I haven’t had the chance to remove. I’ve since gotten MQTT to work successfully by installing it in my Unraid docker, outside of HA.

Good enough to service at least 80+ devices on a gigabit WAN connection and wired gigabit ethernet + wifi.

I’ve tried that, but my camera can only do H265 video - not H264.
And despite me declaring that this is the camera I wanted to buy in order to accomplish live viewing through HA, everyone failed to mention that HA cannot display live video with H265 until after I bought it.

So now I’m stuck.

Anything else?

P.S. HA doesn’t give live view with audio - so already you’re suggesting things that don’t fit my needs.

Also, HA doesn’t neatly organize video recordings into a timeline, where I can easily select a date and view them. All it gives me is the ‘media viewer’, where I have to scroll endlessly between folders and files to find a single event. It’s counter-intuitive and archaic.