Zoneminder binding

Tags: #<Tag:0x00007f5c952b9898> #<Tag:0x00007f5c952b9730>

(Alex) #182

In PaperUI i have :

Status: OFFLINE - COMMUNICATION_ERROR Error occurred (Check log)

But zm is reachable with the same credentials and URL with chrome
restarting OH2 did not solve the problem

(Martin Eskildsen) #183

OK. Have you tried the sugegstions in the Troubleshooting section on the Wiki page?

That might give some hint of where the problem is. Please let me know if it is understandable, or if you need some instructions, I plan to give this page an overhaul…

(Alex) #184

Unfortunately nothing solve my problem.

I’m using Java _101 but without HTTPS

Regarding telnet i can telnet on port 6802.

The curl command give me :

curl -d “=openhab&=openhab&action=login&view=console” -c cookies.txt

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
  <title>ZM - Connexion</title>
  <link rel="icon" type="image/ico" href="graphics/favicon.ico"/>
  <link rel="shortcut icon" href="graphics/favicon.ico"/>
  <link rel="stylesheet" href="css/reset.css" type="text/css"/>
  <link rel="stylesheet" href="css/overlay.css" type="text/css"/>
  <link rel="stylesheet" href="skins/classic/css/classic/skin.css" type="text/css" media="screen"/>
  <script type="text/javascript" src="tools/mootools/mootools-core.js"></script>
  <script type="text/javascript" src="tools/mootools/mootools-more.js"></script>
  <script type="text/javascript" src="js/logger.js"></script>
  <script type="text/javascript" src="js/overlay.js"></script>
  <script type="text/javascript">
var AJAX_TIMEOUT = 10000;
var currentView = 'login';
var thisUrl = "/zm/index.php";
var skinPath = "skins/classic";
var canEditSystem = false;
var canViewSystem = false;
var canEditGroups = false;
var refreshParent = false;
var focusWindow = false;
var imagePrefix = "events/";
  <script type="text/javascript" src="skins/classic/js/classic.js"></script>
  <script type="text/javascript" src="skins/classic/js/skin.js"></script>
  <script type="text/javascript" src="skins/classic/views/js/login.js"></script>
<!-- PP: Add recaptcha script if enabled -->
  <div id="page">
    <div id="header">
      <h1>ZoneMinder Connexion</h1>
    <div id="content">
      <form name="loginForm" id="loginForm" method="post" action="/zm/index.php">
        <input type="hidden" name="action" value="login"/>
        <input type="hidden" name="view" value="postlogin"/>
        <input type="hidden" name="postLoginQuery" value="">
        <table id="loginTable" class="minor" cellspacing="0">
              <td class="colLeft">Nom</td>
              <td class="colRight"><input type="text" name="username" value="" size="12"/></td>
              <td class="colLeft">Mot de passe</td>
              <td class="colRight"><input type="password" name="password" value="" size="12"/></td>
        <input type="submit" value="Connexion"/>
        <!-- PP: Added recaptcha widget if enabled -->
</html>    indent preformatted text by 4 spaces

Content of cookies.txt

Netscape HTTP Cookie File

This file was generated by libcurl! Edit at your own risk. FALSE / FALSE 0 ZMSESSID onlsli4g5gq1nccrcvj4eel5l5 FALSE /zm/ FALSE 1798813438 zmSkin classic FALSE /zm/ FALSE 1798813438 zmCSS classic

Thanks for your help

(Martin Eskildsen) #185

Thanks, I am 99,9% sure that I know what is the problem. It seems like you are using French as language in ZoneMinder? I have heard about similar problems with German, but I thought had solved those language related problems. I will have to check up when I come home.
I bet everything works if you switch to english in ZoneMinder. Off course French should also work :slight_smile:

(Alex) #186

Oh Shame, i think this is the 0,01% :frowning: .
I changed to en_US same issue
changed to en_GB same issue

even after restarted all service.

but i noticed this event when i just created the bridge

2017-02-22 16:44:35.727 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (414e8379)]: Starting ZoneMinder Server Bridge Handler (Bridge=‘null’)

(Martin Eskildsen) #187

I agree, I have looked at the code and I see no reason that it should be a problem, unless you are using an old build - but then changing to en_GB should have fixed it…

So we are obviously looking for something else. From your previous posting I can conclude:

  • The login page is returned when trying to start the binding from openHAB.
  • The binding concludes that it is either not the loginpage or some communication error occurs.

Just to be 100% sure, could you login to openHAB karaf console and check that the ZoneMidner Binding is only installed once. From the karaf console you can write:

bundle:list | grep ZoneMinder

Verify that only one instance is returned and also verfy the version of it.
I will have to consult the code for better suggestions, I also might need a special build with more logging enabled.

(Alex) #188

here is the result :

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/_____/
/_/ 2.1.0-SNAPSHOT
Build #806

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.

openhab> bundle:list | grep ZoneMinder
225 | Active | 80 | | ZoneMinder Binding

(Martin Eskildsen) #189

By the way, have you changed any of the text strings in ZoneMinder that you can change? Just to get an idea of where to search .-)

(Martin Eskildsen) #190

That is as expected and how it should be.

(Alex) #191

No i did not make any change on zoneminder given that is a nearly fresh install but i’m going to remove and reinstall to be sure !

(Martin Eskildsen) #192

Oh, don’t do that, I just wanted to get some hints of where to look :slight_smile:
Do you have at least one event in each monitor. There is an open issue regarding this

(Alex) #193

I have only one monitor and how can i see the event for this monitor in this case to ensure that it’s ok.

(Martin Eskildsen) #194

On the ZoneMinder dashboard, you have information about your monitor, One column says event, if it says 0 then there is zero events and you have found a potential reason.
Click on the name of the monitor and in the detailed screen, you should click “Force Alarm” (remember to cancel again :slight_smile: )

(Dan) #195

this happens sometimes; I can cure it by deleting the server Thing and then adding it again (I define it manually in a Things file to make this easier)

(Alex) #196

Ok i have 0 events i noticed but i was not thinking that can be a problem, i clicked on force alarm but it did nothing

(Martin Eskildsen) #197

It should come online then, else try to restart openHAB. I am debugging this right now, and I can see that an exception is thrown when there is 0 events. That obviously have to be fixed :slight_smile:

(Alex) #198

I think you’re right but it seems i had a zoneminder issue in this case because i just added another monitor with a video stream and still at 0 events ,my zone is ok , btw when i click on force alarm it should be online shouldn’t it?

edit : i find out , now i have events ,i give you answer as soon as the bridge come online !

(Alex) #199

unfortunately , i have the same problem even after restarting ZM and OH2 , sorry :frowning:

(Martin Eskildsen) #200

I have identified a problem in the code, I think the problem that I have identified has “many faces”, I have verified that it specifically occurs when starting adding a monitor without any events. I have reason to believe that it also can occur in other situations. A precondition for the problem is that the monitor is OFFLINE in openHAB, there might be more. I believe that it could also solve the variant that you are looking at.

(Alex) #201

i just deleted my monitor and added one ,now the number of events is now 54. however I have the same error in the log, thanks again for all your quick answers.