Zoneminder lots of errors and CPU usage

Hi I’m getting lots of log errors based around zoneminder (I think). I’m displaying 4 cameras (with seems to work fine) but am also getting lots of CPU use.

Here’s the log errors. Any advice on how I might fix this?

IndexError: list index out of range
17-04-27 06:09:46 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.rainradar to 192.168.0.1 (auth: False)
17-04-27 06:09:51 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.backyard to 192.168.0.1 (auth: False)
17-04-27 06:09:51 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.bird_cam_1 to 192.168.0.1 (auth: False)
17-04-27 06:09:51 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.bird_cam_2 to 192.168.0.1 (auth: False)
17-04-27 06:09:51 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.front_door to 192.168.0.1 (auth: False)
17-04-27 06:09:56 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.rainradar to 192.168.0.1 (auth: False)
17-04-27 06:10:01 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.backyard to 192.168.0.1 (auth: False)
17-04-27 06:10:01 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.bird_cam_1 to 192.168.0.1 (auth: False)
17-04-27 06:10:01 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.bird_cam_2 to 192.168.0.1 (auth: False)
17-04-27 06:10:01 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.front_door to 192.168.0.1 (auth: False)
17-04-27 06:10:02 INFO (Thread-8) [homeassistant.components.sensor.bom] BOM url http://www.bom.gov.au/fwo/IDQ60901/IDQ60901.95591.json
17-04-27 06:10:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.bird_cam_1 fails
Traceback (most recent call last):
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    None, self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 386, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 287, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 275, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-04-27 06:10:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.bird_cam_2 fails
Traceback (most recent call last):
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    None, self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 386, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 287, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 275, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-04-27 06:10:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.backyard fails
Traceback (most recent call last):
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    None, self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 386, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 287, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 275, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-04-27 06:10:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.front_door fails
Traceback (most recent call last):
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    None, self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 386, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 287, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 275, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'

I get most of those too. Everything seems to be working though. After last 2 updates I am also getting:

17-04-25 20:50:03 WARNING (Thread-11) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 2
17-04-25 20:50:03 ERROR (Thread-7) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType

I don’t even have any alarms set up through ZoneMinder.

Yeah - I’ve found the Zoneminder integration to be excellent. Allows me to better manage my cameras, including setting alarms etc, but have all this exposed within HA.

Just seem to get plenty of logging (good & bad) and I’m wondering whether I’m pushing HA too much, or whether there’s just a bug in there…

not sure. I do use alarms for notification automations and they work well.

JP

What version are you running? I am currently running 1.29 with success and have tried 1.30 with problems. I see there is 1.30.2 now and was curious if it runs well before I attempt an upgrade (Really don’t want to screw it up).

I have just updated to ZM v1.30.3 and it has broken the integration with HA…

I’m running 1.30. Do you know if its possible to downgrade to 1.29?
Thx
JP

I think it is, however I am not an expert. there is a PPA for older versions which is maintained which can be found here: https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder/+packages

I moved over to ubuntu server 17.04 now and reinstalled zoneminder v1.30.3 and everything is working again :slight_smile: Also actually seems quicker and more stable than before as well… bonus

1 Like

Did you upgrade Ubuntu (if even possible) or do a fresh install. I honestly don’t remember half the things I did to get my multiple Lan connections and such running so I am not ready to do a fresh install.

i did fresh install after backing up the database then reinstalled the database backup…