Zoneminder issue

Hi,

I configured zoneminder, but get a lot of these messages in the log.
However, the camera is visible in HA.

What can I do to further debug this issue?

Apr 27 19:37:32 hass hass[1406]: --- Logging error ---
Apr 27 19:37:32 hass hass[1406]: Traceback (most recent call last):
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/logging/__init__.py", line 978, in emit
Apr 27 19:37:32 hass hass[1406]: msg = self.format(record)
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/logging/__init__.py", line 828, in format
Apr 27 19:37:32 hass hass[1406]: return fmt.format(record)
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/logging/__init__.py", line 573, in format
Apr 27 19:37:32 hass hass[1406]: record.exc_text = self.formatException(record.exc_info)
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/logging/__init__.py", line 523, in formatException
Apr 27 19:37:32 hass hass[1406]: traceback.print_exception(ei[0], ei[1], tb, None, sio)
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/traceback.py", line 169, in print_exception
Apr 27 19:37:32 hass hass[1406]: for line in _format_exception_iter(etype, value, tb, limit, chain):
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/traceback.py", line 146, in _format_exception_iter
Apr 27 19:37:32 hass hass[1406]: for value, tb in values:
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/traceback.py", line 125, in _iter_chain
Apr 27 19:37:32 hass hass[1406]: context = exc.__context__
Apr 27 19:37:32 hass hass[1406]: AttributeError: 'NoneType' object has no attribute '__context__'
Apr 27 19:37:32 hass hass[1406]: Call stack:
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/threading.py", line 888, in _bootstrap
Apr 27 19:37:32 hass hass[1406]: self._bootstrap_inner()
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
Apr 27 19:37:32 hass hass[1406]: self.run()
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/threading.py", line 868, in run
Apr 27 19:37:32 hass hass[1406]: self._target(*self._args, **self._kwargs)
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/concurrent/futures/thread.py", line 65, in _worker
Apr 27 19:37:32 hass hass[1406]: work_item.run()
Apr 27 19:37:32 hass hass[1406]: File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
Apr 27 19:37:32 hass hass[1406]: result = self.fn(*self.args, **self.kwargs)
Apr 27 19:37:32 hass hass[1406]: File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/camera/zoneminder.py", line 102, in update
Apr 27 19:37:32 hass hass[1406]: 'api/monitors/alarm/id:%i/command:status.json' % self._monitor_id
Apr 27 19:37:32 hass hass[1406]: File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/zoneminder.py", line 124, in get_state
Apr 27 19:37:32 hass hass[1406]: return _zm_request('get', api_url)
Apr 27 19:37:32 hass hass[1406]: File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/zoneminder.py", line 112, in _zm_request
Apr 27 19:37:32 hass hass[1406]: _LOGGER.exception("Unable to get API response from ZoneMinder")
Apr 27 19:37:32 hass hass[1406]: Message: 'Unable to get API response from ZoneMinder'
Apr 27 19:37:32 hass hass[1406]: Arguments: ()
Apr 27 19:37:32 hass hass[1406]: 17-04-27 19:37:32 WARNING (Thread-8) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 1

What version of Zoneminder are your running?

v1.29.0 at this moment.

Also having this issue after updating to 43.2. I was on 39 or 40 previously. Is there an incompatibility with ZM 1.29.0? Iā€™m on that as well.

I am still running 1.29.0. I get some errors in my log but the cameras appear to be fully operational - image-wise. I do not interact with them via HA (PTZ, record, etc.). I log into ZM for anything other than monitoring.

17-05-02 17:44:17 ERROR (Thread-4) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType
17-05-02 17:44:17 WARNING (Thread-4) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 3
17-05-02 17:44:18 ERROR (Thread-1) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType
17-05-02 17:44:18 WARNING (Thread-1) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 6
17-05-02 17:44:19 ERROR (Thread-11) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType
17-05-02 17:44:19 WARNING (Thread-11) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 5
17-05-02 17:44:19 ERROR (Thread-6) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType
17-05-02 17:44:19 WARNING (Thread-6) [homeassistant.components.camera.zoneminder] Alarm status API call failed for monitor 7
17-05-02 17:44:20 ERROR (Thread-5) [homeassistant.components.zoneminder] Unable to get API response from ZoneMinder
NoneType

I am seeing similar issues after updating either ZM or HA (1.30.3 and 0.43.2):

17-05-08 10:19:12 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: 
17-05-08 10:19:12 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: 
17-05-08 10:19:12 INFO (MainThread) [homeassistant.components.http] Serving /api/camera_proxy/camera.sam to 192.168.1.1 (auth: False)
17-05-08 10:19:12 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: 
17-05-08 10:19:12 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: 
17-05-08 10:19:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.livingroom fails
Traceback (most recent call last):
  File "/opt/homeassistant/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 "/opt/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-05-08 10:19:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.outside fails
Traceback (most recent call last):
  File "/opt/homeassistant/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 "/opt/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-05-08 10:19:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.evan fails
Traceback (most recent call last):
  File "/opt/homeassistant/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 "/opt/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'
17-05-08 10:19:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.sam fails
Traceback (most recent call last):
  File "/opt/homeassistant/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 "/opt/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/zoneminder.py", line 110, in update
    if status_response['success'] is False:
KeyError: 'success'

I upgraded ZM to 1.30.4 and also HA to 0.44.1, the ZM camera feeds are now working again!

1 Like

Did anyone get to the bottom of the:
Unable to get API response from ZoneMinder

Still getting loads (marked as Errors) yet cameras work - flooding logs