I’ve got an up to date zoneminder server running and I’m trying to setup OH3-m3 to access it but can’t get past the initial setup. I keep running into:
Thing 'zoneminder:server:zm' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Can't get version information
I don’t see anything wrong in my configuration right off the bat.
I ended up commenting “SSLRequireSSL” from zoneminder.conf on my apache setup. I can still do SSL but non-SSL also. Seems to be working as the zoneminder server is now online in OH.
I’ve added one monitor and I’m trying to get a page setup up now with a snapshot image now but only coming up with a blank picture so far. The image and video URLs don’t work so far. I end up getting
The requested URL /zm/cgi-bin/zms was not found on this server.
Not sure if I got a config problem of the overall setup or I’m just not accessing things correctly. My thought was to set up a page with thumbnails of images that would then link to video feeds of that image. My cameras have two streams, one low definition and one high definition. In zm I do motion detect on the lowdef and when they fire off the highdef monitor also starts recording.
My zoneminder install is from the rpmfusion repo onto a CentOS 7.9 system. I don’t think I changed anything manually after the install except to comment out the SSLRequiredSSL directives. Could be the scriptalias for cgi-bin isn’t matching but I’m not sure where it should change if at all or what to change it to.
Here’s my /etc/httpd/conf.d/zoneminder.conf:
#
# ZoneMinder Apache configuration file
# With SSLRequire and HTTPS auto redirect
# Modify this configuration to suit your requirements
#
# Auto Redirect HTTP requests to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]
# Order matters. This alias must come first.
Alias /zm/cache "/var/cache/zoneminder"
<Directory "/var/cache/zoneminder">
# SSLRequireSSL
Options -Indexes +MultiViews +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
# explicitly set index.php as the only directoryindex
DirectoryIndex disabled
DirectoryIndex index.php
# SSLRequireSSL
Options -Indexes +MultiViews +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
# SSLRequireSSL
AllowOverride None
Options +ExecCGI +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.
<Directory "/usr/share/zoneminder/www/api">
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteBase /zm/api
</Directory>
<Directory "/usr/share/zoneminder/www/api/app">
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
RewriteBase /zm/api
</Directory>
<Directory "/usr/share/zoneminder/www/api/app/webroot">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteBase /zm/api
</Directory>
Are there any further details in regards to certificates and setup? I’m running my own CA in my network, ZM has its own certificate issued by my CA, and I get the same error. I presume that I’d need to make OpenHAB aware of the CA Certificate somehow, is this correct?
There are code changes need to make the binding work with self-signed certs. I made those changes a while back because someone asked for it. Then that person disappeared, so there was no one to test the changes. I’ll have to check if I deleted the branch with those changes.
Here’s a link to a jar file for you to test. I’m not able to test this myself, so I don’t know if it will work or not. I modeled it after a couple other bindings that support self-signed certs.
Before dropping this jar file into addons, you need to uninstall the current version of the Zoneminder binding.
Also, there’s a new config parameter in the bridge thing for the cert’s common name. This needs to be set to the common name of your self-signed cert.
If you run into any issues, a debug log would be appreciated. Also, please confirm that you’re running this new version by checking the binding’s version number in the console.
On earlier 3.1 snapshot releases I was getting an error about a javax.measure dependency issue. I upgraded to the latest snapshot (build 2446) and it installs and runs. This snapshot version must be pretty close to the build number of the 3.1 release.
What do you see in the console when you drop the binding into the addons directory? It should look like this.
openhab> list -s | grep zoneminder
244 │ Active │ 80 │ 3.2.0.202106300004 │ org.openhab.binding.zoneminder
If it says Installed versus Active, then there’s a dependency problem. If it’s not there at all, and the jar is in addons, I’m not sure what’s going on. This is what it should look like in the addons directory.
-rwxr--r-- 1 mark mark 57661 Jul 1 12:04 org.openhab.binding.zoneminder-3.2.0-SNAPSHOT.jar
I’m still running 3.1, although I did change to the unstable repo, install 3.2 and tried again without success. The file provided is in the addons folder, only thing I’ve got different is that I’d set the permissions to the openhab user.
Using your console command gives no results. Using feature:list shows the 3.1 version as uninstalled. I did attempt to do the same thing in 3.2 and didn’t really get any results either, although at that point I wasn’t sure whether it was a bundle, feature or both I needed to look at.
I’ll likely attempt to update to 3.2 again and have another go. I appreciate that you’ve put the package together, and note that I may take a little longer to ensure that I’m not just making simple mistakes.