Hi,
I installed latest snapshot of OpenHab2 and installed ZoneMinder Binding.
When I create Bridge i got auht error, but I’m sure that credential are fine. Also ZM’s API configuration are fine, because I use them with ZmNinja and Zabbix to monitor cams.
Here is logs:
1 DEBUG nding.zoneminder.internal.ZoneMinderHandlerFactory [FACTORY]: creating handler for bridge thing 'org.eclipse.smarthome.core.thing.internal.BridgeImpl@f03d7db6'
2017-09-28 14:05:13.721 INFO g.zoneminder.handler.ZoneMinderServerBridgeHandler [BRIDGE (cbced587)]: Starting ZoneMinder Server Bridge Handler (Bridge='null')
2017-09-28 14:05:13.722 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler [BRIDGE]: About to initialize bridge server
2017-09-28 14:05:13.722 INFO g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: ZoneMinder Server Bridge Handler Initialized
2017-09-28 14:05:13.722 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: HostName: 192.168.1.76
2017-09-28 14:05:13.722 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Protocol: http
2017-09-28 14:05:13.722 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Port HTTP(S) 80
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Port Telnet 6802
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Server Path /zm
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: User: admin
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Refresh interval: 10
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Low prio. refresh: 0
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE: Autodiscovery: true
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler [BRIDGE (cbced587)]: closeConnection(): Closed HTTP Connection!
2017-09-28 14:05:13.723 DEBUG g.zoneminder.handler.ZoneMinderServerBridgeHandler BRIDGE [cbced587]: Starting ZoneMinder Bridge Monitor Task. Command='org.openhab.binding.zoneminder.handler.ZoneMinderServerBridgeHandler$1@7e118f'
2017-09-28 14:05:20.815 INFO g.zoneminder.handler.ZoneMinderServerBridgeHandler [BRIDGE (cbced587)]: Bridge status changed from 'OFFLINE' to 'OFFLINE'
and connection is fine and cookie is downloaded. I just use this method to monitor camera, but I would like to move to native binding. Telnet to port 6802 is fine.
Have you tried to use the IP adress instead off zm?
Also make sure that you do the test from your openHAB server, to verify that you can access ZoneMinder Server from openHAB server
Hi,
i just use IP for connection, and I just have a mechanism use curl and Exec binding to retrieve status of the monitor from my ZM server, so comunication is fine
There is no problems (ERRORs) stated in the log you have posted. SO there isn’t much to dig into.
Have you tired to restart openHAB? Alternatively change logging to debug and restart openHAB.
I would expect more logentries with debug enabled. Also I see no errors or warnings at all.
i suggest that you pass all logentries from ZoneMinder in its own file, it will make it easier to see what is going on.
Hi @mr_eskildsen
the log in 1st post is captured with a separate file dedicated to ZM binding.
Here is the log configuration, let me know if it’s enought:
This may not be the OP’s issue, but it’s a somewhat related topic and I couldn’t find a good place to post it! Our API stopped working after a relatively recent Zoneminder update. The Apache config for Zoneminder was in /etc/httpd/conf.d/zoneminder.conf. After the update, we had a zoneminder.conf.rpmnew, which came down with the updated Zoneminder package. If you’ve never modified the original, then you can just swap them out. There was something in the new Apache configuration that was needed to get our API functioning again.
hi @mr_eskildsen
steps 1,2,3 are fine.
Running command @step 4, i got a lot of html code and coockie are created.
It contain:
# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_192.168.1.76 FALSE / FALSE 0 ZMSESSID lsf3niqviuvfd0bjq4gukas4a3
192.168.1.76 FALSE /zm/ FALSE 1818053769 zmSkin classic
192.168.1.76 FALSE /zm/ FALSE 1818053769 zmCSS classic
As told before, I just have an integration in place that use exec binding and curl command.
@5iver
I just using ZMNinja, the mobile applicarion for ZM, and as i know it use APIs and it work.
I do not have file you’re speaking for. my zoneminder.conf is:
# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>
Strange. As far as I can see it doesn’t connect to ZoneMinder. The obvious problems is wrong user and/or password, and no connection to server. None those issues seems to be the answer.
What version of ZoneMinder are you using?
What is your language settings in ZM?