All of a sudden my homeassistant cant login on zoneminder it seems… The zoneminder is working as it should and it has been working, started getting this the other day.
Anyone that could help?
conf:
zoneminder:
- host: 10.10.10.227
path: /zm/
path_zms: /zm/cgi-bin/nph-zms
ssl: false
verify_ssl: false
username: !secret zm_user
password: !secret zm
i have double checked the credentials.
Error from log:
2019-05-15 20:28:00 ERROR (SyncWorker_4) [zoneminder.zm] Connection error logging into ZoneMinder
2019-05-15 20:28:00 ERROR (MainThread) [homeassistant.setup] Setup failed for zoneminder: Component failed to initialize.
2019-05-15 20:28:01 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform zoneminder: Unable to set up component.
2019-05-15 20:28:02 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform zoneminder: Unable to set up component.
2019-05-15 20:28:02 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform zoneminder: Unable to set up component.
I am having the same or similar issue. I updated to Home Assistant 0.93.2 and all of my cameras stopped working. I have been running the home assistant docker for a little over a year now.
my configuration file:
zoneminder:
host: 192.168.10.61
camera:
- platform: zoneminder
Here is the home-assistant.log file:
2019-05-23 21:30:17 ERROR (SyncWorker_9) [zoneminder.zm] Connection error logging into ZoneMinder
2019-05-23 21:30:19 ERROR (MainThread) [homeassistant.setup] Setup failed for zoneminder: Component failed to initialize.
2019-05-23 21:30:19 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform zoneminder: Unable to set up component.
2019-05-23 21:30:24 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform zoneminder: Unable to set up component.
I am running the most recent version of zoneminder (v1.32.3)
Same here problem appeared on v0.94.0b0
Problem wfor me was that i had change login type or something like that in zoneminder to plain
+1…running ZM 1.32.3 on Ubuntu 19.04 server & Hassio 93.2. I built a new server (twice) to make sure I didn’t screw anything up in my install. ZM works fine on its own. Just can’t get it to connect to HA. I tried disabling AUTH in ZM and still gave me the logging in error. I’m going to keep digging through logs.
Try with auth relay hashed
I did. Also read somewhere about taking out special characters in the hash. Tried that too. It doesn’t look like my APIs are working in ZM. I’m going down that rabbit hole now…
Oh… my installation of zoneminder has been running for years now so i dont wanna mess with it too much
1 Like
Weird things are happening with ZM lately here too.
I couldn’t open the cameras view, but the preview (every 10s) was still working. When I tried to open the view, I got an HA notification that my client’s IP was trying to access the camera without permission ! APIs were fine though, HA could read the event count, change the cameras operation mode and so on.
HA 0.93.2, ZM 1.32.3, Ubuntu 18.04 LTS. I use no SSL (access only possible from within a DMZ), and I checked the admin login too. ZM is running on the same server, along with HA.
zoneminder:
host: !secret zm_host
username: !secret zm_user
password: !secret zm_pass
I solved this, I guess because it doesn’t make sense, by checking permissions on the configuration files. Now, paths are set in /etc/zm/zm.conf and can be overridden in /etc/zm/conf.d/01-system-paths.conf, or anything in that directory. Everything in here is root:root, except the custom.conf file that is root:www-data.
Ensure that, in the conf.d folder, you don’t have some other paths set for the API access.
Good tip. I checked my permissions and they are the same as yours. Root:root on everything. I don’t have the custom.conf in there. Anything good in there?
It’s used to change default values, without editing the original files with default values :
root@services:/etc/zm/conf.d# cat zmcustom.conf
# These values were autogenerated by zmupdate.pl
# You may edit these values. ZoneMinder will not overwrite them.
#
#ZM_PATH_SWAP=/var/cache/zoneminder/tmp
#ZM_PATH_SOCKS=/var/cache/zoneminder/tmp
ZM_PATH_SWAP=/dev/shm
ZM_PATH_SOCKS=/dev/shm
It’s explained in the 01-system-paths.conf header :
root@services:/etc/zm/conf.d# cat 01-system-paths.conf
# ==========================================================================
#
# ZoneMinder System Paths Configuration
#
# ==========================================================================
#
# This config file contains the variables previously found under Options -> Paths
#
# *** DO NOT EDIT THIS FILE ***
#
# To make custom changes to the variables below, create a new configuration
# file, with an extention of .conf, containing your desired modifications.
#
Thanks for sharing. I ended up blowing out my Ubuntu VM and rebuilt a Debian 9.9 one. Its all working fine now. Fully integrating into HA and my api’s are working. Now i can finish migrating from MotionEye to ZoneMinder!
Definitely weird ! You have any idea why it works from scratch ? Did you keep any backup of the previous configuration so you could compare ?
No. I blew away the old server once i got this one working. That would have been a good idea though…
The only difference that i know was Ubuntu 19.04 vs Debian 9.9 (i think).
Zoneminder is so much nicer once configured. I’m so glad i finally got it going. Although i just threw an ssl cert in today and it broke my HA connection again. I think i know what the problem is there. So really I think I am my biggest issue! I can’t stop tinkering and/or adding new things! Ha!
Yeah, easy fix. Added :443 to the end of my host and that came back in case anyone else stumbles across this and was wondering.