mr_eskildsen
(Martin Eskildsen)
January 30, 2017, 2:29pm
162
Intersting, I am quering:
http://<ZM Server>/zm/api/host/getload.json
http://<ZM Server>/zm/api/getDiskPercent.json
The API Documentation writes the following about DiskPercent:
returns in GB (not percentage), disk usage per monitor (that is, space taken to store various event related information,images etc. per monitor) ``
That might explain the difference?
The query that reports the load, returns three values:
{
"load": [
1.21,
1.27,
1.21
]
}
I might have chosen the wrong value, need to read the documentation about that one
mr_eskildsen
(Martin Eskildsen)
February 4, 2017, 11:32am
163
I am happy to tell that as of build #779 the ZoneMinder binding is part of the openHAB distribution. Thanks for your help testing, that has absolutely caught some problems that I else wouldnāt have found.
dan12345:
minor but funny point: zoneminder itself reports server load of 0.19 and disk usage 29%. This is consistent with what the zoneminder server command line tells me.
However the binding shows disk usage as 32.87% and server load of 0.37
I managed to correct theissue regarding load pinpointed above. The other issue with disk usage showing GB instead of percentage I will have to look a little deeper into.
If you have any questions regarding the binding, please feel free to ask. I think the documentation needs an overhaul, so your input to that would be great.
I have considdered writing a Getting Started section, but I am more interested in knowing what you guys might be missing :-).
2 Likes
dan12345
(Dan)
February 8, 2017, 11:20am
165
Hi,
Just to add that the binding is still a little flaky when it comes to disconnects.
My network went down for a couple of seconds, and that made the binding throw a small tantrum, with a stream of errors:
2017-02-08 11:14:53.193 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [MONITOR]: Method 'refreshThing()' for Bridge failed for thing='zoneminder:monitor:zm:monitor-2' - Exception='java.lang.NullPointerException'
Refreshing my Things definition file got the binding/server back online.
mr_eskildsen
(Martin Eskildsen)
February 8, 2017, 12:07pm
166
As I understand it, the problem is that it is logging to much when it disconnects?
The āproblemā is that each monitor get the connection from the bridge. So there is some interaction between the monitor using the connection, and the bridge providing the connection information. Admitted that there might be some improvement potential in the logging.
I will see what I can do about it.
dan12345
(Dan)
February 8, 2017, 12:08pm
167
I wasnāt clear - the problem is that, when the connection is restored, the binding continues to throw off errors when it should reconnect.
mr_eskildsen
(Martin Eskildsen)
February 8, 2017, 12:11pm
168
OK, I will see if I can confirm that in my setup, else I might need some debug logging
lfs_alp5
(Alpoy)
February 18, 2017, 1:16pm
169
Having trouble with this binding, Iāve added the bridge āthingā successfully but when I add the monitor as a thing I get spammed with this in openhab.log:
2017-02-18 14:04:40.406 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [MONITOR]: Method ārefreshThing()ā for Bridge failed for thing=āzoneminder:monitor:Mediasrv:monitor-1ā - Exception=ājava.lang.ClassCastException: org.openhab.binding.zoneminder.handler.ZoneMinderThingMonitorHandler cannot be cast to org.openhab.binding.zoneminder.handler.ZoneMinderBaseThingHandlerā
When I add a monitor as item it only shows as āOFFā
2017-02-18 14:09:26.419 [ItemChannelLinkAddedEvent ] - Link āIPC_Fe_Utside_Status-zoneminder:monitor:Mediasrv:monitor-1:onlineā has been added.
2017-02-18 14:09:43.129 [ItemStateChangedEvent ] - IPC_Fe_Utside_Status changed from NULL to OFF
2017-02-18 14:09:43.142 [ItemStateChangedEvent ] - IPC_Fe_Utside_Status changed from OFF to UNDEF
2017-02-18 14:09:43.166 [ItemStateChangedEvent ] - ipc_Fe_Utside changed from NULL to OFF
Using ZM 1.30.0 and OH2 ālatestā build #791 .
Any help appreciated
mr_eskildsen
(Martin Eskildsen)
February 19, 2017, 4:51pm
170
Have you used a previously build off the ZoneMinder Binding?
If you connect to the Karaf console, whate happends when you write
bundle:list | grep ZoneMinder
Do you get more than one line?
Did you use a things config or discovery when configuring?
lfs_alp5
(Alpoy)
February 19, 2017, 7:06pm
171
openhab> bundle:list | grep ZoneMinder
212 | Active | 80 | 2.1.0.201702181609 | ZoneMinder Binding
So I did a complete reinstall of the binding now.
Added the bridge/server thing manually, and then my 2 cameras/monitors where discovered through the paperUI inbox, I then added/accepted them.
Linked these to my switch items accordingly:
Switch Motion_IPC_Fe_Utside āMotion Alarm Forsideā { channel=āzoneminder:monitor:04f4e24a:monitor-1:alarmā }
Switch IPC_Fe_Utside_Status āIPC Fe_Utside statusā { channel=āzoneminder:monitor:04f4e24a:monitor-1:onlineā }
Switch Motion_IPC_Kj_Utside āMotion Alarm Baksideā { channel=āzoneminder:monitor:04f4e24a:monitor-2:alarmā }
Switch IPC_Kj_Utside_Status āIPC Kj_Utside statusā { channel=āzoneminder:monitor:04f4e24a:monitor-2:onlineā }
Now it seems monitor-1 actually works but I canāt get monitor-2 upān running for some reason (itās configured exactly the same way being of the same camera type).
Hereās debug:
2017-02-19 20:03:15.602 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Running Refresh data task count='1', freq='10', max='10', interval='10', intervalLow='0'
2017-02-19 20:03:15.605 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: 'refreshDataRunnable()': (diskUsage='false')
2017-02-19 20:03:15.607 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: 'refreshThing()': Thing='zoneminder:server:04f4e24a'!
2017-02-19 20:03:15.638 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: URL='http://192.168.1.20:80/zm/api/host/getLoad.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:15.646 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: BridgeHandler.updateChannel(): Updating channel 'cpu-load' to state='1.25'
2017-02-19 20:03:15.654 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: BridgeHandler.updateChannel(): Updating channel 'disk-usage' to state='UNDEF'
2017-02-19 20:03:15.662 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: Performing refresh
2017-02-19 20:03:15.664 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: refreshThing(): Bridge 'zoneminder:monitor:04f4e24a:monitor-1' Found for Thing 'zoneminder:monitor:04f4e24a:monitor-1'!
2017-02-19 20:03:15.710 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/1.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:15.925 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zmc.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:16.156 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zma.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:16.377 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zmf.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:16.433 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/alarm/id:1/command:status.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 20:03:16.465 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Recalculate channel states based on Function: Function='MODECT' -> alarmState='true', recordingState='true'
2017-02-19 20:03:16.466 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Recalculate channel states based on Detailed State: DetailedState='IDLE' -> alarmState='false', recordingState='false'
2017-02-19 20:03:16.468 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: refreshThing(): Refreshing Thing - zoneminder:monitor:04f4e24a:monitor-1
2017-02-19 20:03:16.473 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:enabled' to 'ON'
2017-02-19 20:03:16.477 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:force-alarm' to 'OFF'
2017-02-19 20:03:16.481 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:alarm' to 'OFF'
2017-02-19 20:03:16.486 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:recording' to 'OFF'
2017-02-19 20:03:16.490 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:detailed-status' to 'Idle'
2017-02-19 20:03:16.494 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:function' to 'Modect'
2017-02-19 20:03:16.498 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:event-cause' to ''
2017-02-19 20:03:16.502 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:capture-daemon' to 'ON'
2017-02-19 20:03:16.506 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:analysis-daemon' to 'ON'
2017-02-19 20:03:16.510 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:frame-daemon' to 'OFF'
2017-02-19 20:03:16.514 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [[MONITOR-1]: refreshThing(): Thing Refreshed - zoneminder:monitor:04f4e24a:monitor-1
2017-02-19 20:03:16.515 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: Performing refresh
2017-02-19 20:03:16.516 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: refreshThing(): Refreshing Thing - zoneminder:monitor:04f4e24a:monitor-2
2017-02-19 20:03:16.521 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:enabled' to 'UNDEF'
2017-02-19 20:03:16.525 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:force-alarm' to 'UNDEF'
2017-02-19 20:03:16.530 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:alarm' to 'UNDEF'
2017-02-19 20:03:16.535 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:recording' to 'UNDEF'
2017-02-19 20:03:16.539 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:detailed-status' to 'UNDEF'
2017-02-19 20:03:16.543 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:function' to 'UNDEF'
2017-02-19 20:03:16.547 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:event-cause' to 'UNDEF'
2017-02-19 20:03:16.551 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:capture-daemon' to 'UNDEF'
2017-02-19 20:03:16.555 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:analysis-daemon' to 'UNDEF'
2017-02-19 20:03:16.559 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-2:frame-daemon' to 'UNDEF'
2017-02-19 20:03:16.563 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [[MONITOR-2]: refreshThing(): Thing Refreshed - zoneminder:monitor:04f4e24a:monitor-2
Monitor 2 doesnāt seem to actually refresh? At least canāt see it does any URL/API callsā¦
mr_eskildsen
(Martin Eskildsen)
February 19, 2017, 7:51pm
172
Interestingā¦
What doews it report on the GUI?
Can you try to stop and start openhab, just to see if monitor 2 comes online?
lfs_alp5
(Alpoy)
February 19, 2017, 9:55pm
173
Did a restart, in GUI/Paper UI both monitors and server are green/online.
However debug now says:
2017-02-19 22:52:32.919 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Running Refresh data task count='1', freq='10', max='10', interval='10', intervalLow='0'
2017-02-19 22:52:32.929 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: 'refreshDataRunnable()': (diskUsage='false')
2017-02-19 22:52:32.932 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: 'refreshThing()': Thing='zoneminder:server:04f4e24a'!
2017-02-19 22:52:32.962 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: URL='http://192.168.1.20:80/zm/api/host/getLoad.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:32.967 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: BridgeHandler.updateChannel(): Updating channel 'cpu-load' to state='1.58'
2017-02-19 22:52:32.973 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: BridgeHandler.updateChannel(): Updating channel 'disk-usage' to state='UNDEF'
2017-02-19 22:52:32.977 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: Performing refresh
2017-02-19 22:52:32.979 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: refreshThing(): Bridge 'zoneminder:monitor:04f4e24a:monitor-1' Found for Thing 'zoneminder:monitor:04f4e24a:monitor-1'!
2017-02-19 22:52:33.024 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/1.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.198 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zmc.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.369 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zma.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.536 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:1/daemon:zmf.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.587 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: URL='http://192.168.1.20:80/zm/api/monitors/alarm/id:1/command:status.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.616 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Recalculate channel states based on Function: Function='MODECT' -> alarmState='true', recordingState='true'
2017-02-19 22:52:33.618 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Recalculate channel states based on Detailed State: DetailedState='IDLE' -> alarmState='false', recordingState='false'
2017-02-19 22:52:33.619 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-1]: refreshThing(): Refreshing Thing - zoneminder:monitor:04f4e24a:monitor-1
2017-02-19 22:52:33.625 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:enabled' to 'ON'
2017-02-19 22:52:33.630 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:force-alarm' to 'OFF'
2017-02-19 22:52:33.635 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:alarm' to 'OFF'
2017-02-19 22:52:33.640 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:recording' to 'OFF'
2017-02-19 22:52:33.644 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:detailed-status' to 'Idle'
2017-02-19 22:52:33.649 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:function' to 'Modect'
2017-02-19 22:52:33.654 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:event-cause' to ''
2017-02-19 22:52:33.659 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:capture-daemon' to 'ON'
2017-02-19 22:52:33.664 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:analysis-daemon' to 'ON'
2017-02-19 22:52:33.669 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Setting channel 'zoneminder:monitor:04f4e24a:monitor-1:frame-daemon' to 'OFF'
2017-02-19 22:52:33.673 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [[MONITOR-1]: refreshThing(): Thing Refreshed - zoneminder:monitor:04f4e24a:monitor-1
2017-02-19 22:52:33.675 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: Performing refresh
2017-02-19 22:52:33.676 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: refreshThing(): Bridge 'zoneminder:monitor:04f4e24a:monitor-2' Found for Thing 'zoneminder:monitor:04f4e24a:monitor-2'!
2017-02-19 22:52:33.720 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: URL='http://192.168.1.20:80/zm/api/monitors/2.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:33.933 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:2/daemon:zmc.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:34.152 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:2/daemon:zma.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:34.367 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: URL='http://192.168.1.20:80/zm/api/monitors/daemonStatus/id:2/daemon:zmf.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:34.408 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: URL='http://192.168.1.20:80/zm/api/monitors/alarm/id:2/command:status.json' ResponseCode='200' ResponseMessage='OK'
2017-02-19 22:52:34.432 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Method 'refreshThing()' for Bridge zoneminder:server:04f4e24a failed for thing='zoneminder:monitor:04f4e24a:monitor-2' - Exception='-1'
mr_eskildsen
(Martin Eskildsen)
February 20, 2017, 7:20am
174
Interesting, havent seen that beforeā¦
My guess is that monitor 2 isnāt correct configured, for some reason tht I really cannot explain (since that should be done automatically).
tO me it looks like it has discovered monitor 2 again when restarting? I suggest that you try to remove monitor 2 from your things, and then add it from inbox (eventually do a manual scan)
If that doesnāt help, I will build a jar with additional log information so that we can figure out what is going on.
lfs_alp5
(Alpoy)
February 20, 2017, 4:28pm
175
Hm, weird. So Iāve tried many times back and forth with the same result (removing the binding, adding the monitors etc.)
However, monitor-2 suddenly came online and working after I did a āforce alarmā in the ZM UI.
2017-02-20 17:22:36.800 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Bridge status changed from 'ONLINE' to 'ONLINE'
2017-02-20 17:22:44.797 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Method 'refreshThing()' for Bridge zoneminder:server:04f4e24a failed for thing='zoneminder:monitor:04f4e24a:monitor-2' - Exception='-1'
2017-02-20 17:22:46.648 [INFO ] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Received forceAlarm for monitor 2
2017-02-20 17:22:46.650 [INFO ] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: Starting High Priority Refresh
2017-02-20 17:22:51.917 [INFO ] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Received forceAlarm for monitor 2
2017-02-20 17:22:52.140 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Bridge status changed from 'ONLINE' to 'ONLINE'
2017-02-20 17:22:52.410 [INFO ] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: Stopping Priority Refresh for Monitor
2017-02-20 17:23:07.416 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (04f4e24a)]: Bridge status changed from 'ONLINE' to 'ONLINE'
mr_eskildsen
(Martin Eskildsen)
February 20, 2017, 4:50pm
176
OK, i have heard similar issues from others about this ONLINE / OFFLINE. I will review the code to verify that there isnāt some obvious problems.
1 Like
lfs_alp5
(Alpoy)
February 20, 2017, 6:20pm
177
@mr_eskildsen
I think Iāve figured out the cause or at least what the problem area isā¦
I just cleared/deleted all events from ZM and I suddenly got the exception error messages back, when I forced a couple of alarm events the errors were gone again.
Could it be that the binding makes a getEvents API call and thinks 0 events = error?
mr_eskildsen
(Martin Eskildsen)
February 20, 2017, 7:55pm
178
I am quite sure that yiu have spottet the problem, without having the code around, I think that I does look for latest event, I am uncertain when I am doing it, but I am quite sure that there might be something here when there isnāt any events. I will consult the code
mr_eskildsen
(Martin Eskildsen)
February 22, 2017, 8:49am
179
lfs_alp5:
think Iāve figured out the cause or at least what the problem area isā¦I just cleared/deleted all events from ZM and I suddenly got the exception error messages back, when I forced a couple of alarm events the errors were gone again.
Could it be that the binding makes a getEvents API call and thinks 0 events = error?
By following yuor steps I can reproduce the error, my guess is that it is a minor thing, but it should obviously be fixed. I have created an issue:
https://github.com/openhab/openhab2-addons/issues/1939
1 Like
Dear,
First of all,
thank you for your binding and your work.
However i have a problem using it on my system which is OH 2.1.0 (nightly)./ ZM v1.29.0
I entered the good credentials , good IP ( same host) , good port , tested telnet with port 6802 , workingā¦
all values are good ( OPT_CONTROL, API and OPT_TRIGGER) but the bridge stays offline.
I checked the logs and found :
Exception occurred in updateAvailabilityStatus Exception=ānullā
2017-02-22 14:07:22.233 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - BRIDGE [dedf51cf]: Starting ZoneMinder Bridge Monitor Task. Command='org.openhab.binding.zoneminder. handler.ZoneMinderServerBridgeHandler$1@17c389aā
2017-02-22 14:07:26.646 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (dedf51cf)]: Exception occurred in updateAvailabilityStatus Exception='nullā
2017-02-22 14:07:26.650 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (dedf51cf)]: Bridge status changed from āOFFLINEā to 'OFFLINEā
2017-02-22 14:07:50.406 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (dedf51cf)]: Exception occurred in updateAvailabilityStatus Exception='nullā
2017-02-22 14:08:09.890 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (dedf51cf)]: Exception occurred in updateAvailabilityStatus Exception='nullā
2017-02-22 14:08:30.744 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (dedf51cf)]: Exception occurred in updateAvailabilityStatus Exception=ānullā
I searched for an answer that iām not able to find, anyone had this issue at the beggining?
Thanks in advance
mr_eskildsen
(Martin Eskildsen)
February 22, 2017, 1:54pm
181
What does it say in habmin GUI or PaperUI?
Have you tried to restart openHAB?