High CPU usage with Zoneminder plugin

I have Zoneminder 1.30.4 installed with half a dozen cameras, and HASS 0.56.2 installed on a CentOS 7 VM. I’ve been having a weird high CPU usage with hass where i sometimes see it jumps up to 100% (a full core) for hours, sometimes it fixes itself. This issue has been going on for a few months at least. I finally tracked it down to the Zoneminder plugin, whenever I click on one of my camera images in hass to bring up the full screen div with the live video feed, and watch it for a little bit, the CPU starts spiking. I can close out of it, close out of my browser, and the high CPU usage on the hass VM still remains at 100%, like it’s still streaming. I’m wondering if anyone else is having this problem? The web UI can become slow/unresponsive while it’s doing this. My config is simple:

zoneminder:
  host: my.host.com
  username: myuser
  password: mypass
  path: /zm/
  path_zms: /cgi-bin-zm/nph-zms
  ssl: True

camera:
  - platform: zoneminder

I don’t see anything in the debug logs that relate to this. I can restart Zoneminder, HASS, or disable the monitors in ZM and the issue is instantly resolved. Any suggestions or confirmations?

Thanks!

I just updated from 0.61.x to 0.70.1 and have this exact high CPU load problem with Zoneminder. Would consistently go up to 100 percent on one CPU core indefinitely after about 15 minutes of Hass being started. Removed ZM component from my config and problem has gone away.

I see your post is from October last year theroot, are you still experiencing this?

Last time I checked, yes it still happens. I narrowed it down to using https for zoneminder, and after trying to stream a camera in HASS web ui. So I added a non SSL apache config for zoneminder and only allowed the IP for HASS as a temporary work around. I haven’t had much time to revisit it TBH.

Yeah that seems like a reasonable workaround, appreciate the reply mate.

I just recently setup Zoneminder plugin and also noticed the same High CPU usage. Will try the non-ssl workaround. However I hope a fix is developed for this.