Can't get Zoneminder to stream video from cameras

Hi,

I’m having issues fully configuring Zoneminder and Hassio. I have Zoneminder currently running in a docker container using OpenMediaVault as a server (https://hub.docker.com/r/dlandon/zoneminder). I have added Zoneminder to my configuration file as follows:

zoneminder:
  host: 192.168.86.129:8443
  ssl: true 
  verify_ssl: false

And have added a switch to switches.yaml

- platform: zoneminder
  command_on: Modect
  command_off: Monitor

And have added the cameras in cameras.yaml

- platform: zoneminder

While I can turn on/off modect/monitor successfully; I do not get any of the camera streams to show. I do get this error in my log:

2018-12-19 13:22:11 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
2018-12-19 13:22:11 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: CERTIFICATE_VERIFY_FAILED
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
2018-12-19 13:22:11 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: Cannot connect to host 192.168.86.129:8443 ssl:None [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)]
2018-12-19 13:22:13 ERROR (MainThread) [pydroid_ipcam] Failed to communicate with IP Webcam: Cannot connect to host 192.168.86.117:8080 ssl:None [Host is unreachable]
2018-12-19 13:22:13 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: Cannot connect to host 192.168.86.117:8080 ssl:None [Host is unreachable]
2018-12-19 13:22:21 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
2018-12-19 13:22:21 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: CERTIFICATE_VERIFY_FAILED
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
2018-12-19 13:22:21 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: Cannot connect to host 192.168.86.129:8443 ssl:None [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)]
2018-12-19 13:22:24 ERROR (MainThread) [homeassistant.components.camera.mjpeg] Error getting new camera image: Cannot connect to host 192.168.86.117:8080 ssl:None [Host is unreachable]
2018-12-19 13:22:24 ERROR (MainThread) [pydroid_ipcam] Failed to communicate with IP Webcam: Cannot connect to host 192.168.86.117:8080 ssl:None [Host is unreachable]

The .117 camera is just turned off; the SSL errors are relating to Zoneminder.

Does anyone know what is going on? Not sure if it is configuration related or the Zoneminder component itself.

Thanks

Hi @derrick1985 ,

Did you solve this? I couldn’t get my zoneminder cameras to work and could not find any errors in the log. Finally I found online someone who mentioned he added the “path_zms” option. After doing that with the correct path (mine was “/cgi-bin/nph-zms”) it finally worked

Hi @Hogster,

Yes I did (swear to god I posted the solution somewhere). Anyways, what I had to do in the end was copy my ssl cert from Hassio over to the Zoneminder folder (as recommended https://github.com/dlandon/zoneminder/issues/17 ) and also use my external duckdns name for the address in configuration.yaml for zoneminder. Also had to open up and forward a port on router but id does work.

That being said I just re-read the github thread and the docker maintainer re-added regular http access to his container after some pressure from other users so you should be able to use that method if you like.