Update of ZoneMinder bindings

It seems that a lower refresh rate influences the load addition only marginally by now:
10-15 sec: +0.5
15-60 sec: +0.4
60-90 sec: +0.4
It seems to run pretty stable. :smiley:

1 Like

I have pushed a new build to the marketplace. It brings some new settings to the table, mostly is performance settings.
For the server:
Possible to enable or disable disk usage refresh. Previously the refresh rate could be set, that has been removed.

For monitors:
Refresh of still images is controlable (both when idle and when alarmed)

Changes
Session handling reworked
Performance optimization (less calls to ZM server)
Added settings to control perfomance
Added a new still image channel.

I few things still needs attention:

  • Log fills quite fast in DEBUG with a specific log entry of now use
  • I have seen some NullPointerExceptions during startup and configuration changes. Seems that the reason is the same.
  • The new motion-event channel doesnā€™t seem to work

That hould be the headlines of the new build.
When you install please carefully remove things and old bindings, to avoid problems.

The things sample file now looks like this:

Bridge zoneminder:server:myserver "ZoneMinder Server: Home" @ "Zoneminder" [ protocol="http", host="<HOSTNAME_OR_IP>", portTelnet=6802, user="<USER>", password="<PASSWORD>", urlSite="/zm", urlApi="/zm/api", refreshNormal=10, refreshLow=60, diskUsageRefresh="batch", autodiscover=false ] 
{
	Thing monitor monitor1 "ZoneMinder Monitor" @ "Zoneminder" [ id=1, triggerTimeout=120, eventText="openHAB", imageRefreshIdle="low", imageRefreshEvent="normal", imageScale=100, daemonRefresh="normal"  ]
}

diskUsageRefresh: batch or disabled
imageRefreshIdle is update of stillimages when running idle (no alarms), can be set to disabled to avoid updating images when idle.

UPDATE:
Though all the settings should be there, some of the logic behind isnā€™t done yet. That goes for the differentiated update frequency of images, and there might be other things not working completely. I have focused on the settings and stability. And in the following days I will push changes to deal with the issues.

openhab> list | grep Zone
250 ā”‚ Active   ā”‚  80 ā”‚ 2.3.0.201801150019     ā”‚ ZoneMinder Binding

I will now report my findings in summary 'cause I donā€™t know if that is affected by your last changes or not. So no offense at all - I really appreciate your work. :vulcan_salute:

After adding the bridge thing (only provided host and credentials):

2018-01-15 10:48:24.116 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Starting ZoneMinder Server Bridge Handler (Bridge='null')                                                                         
2018-01-15 10:48:24.181 [INFO ] [andler.ZoneMinderServerBridgeHandler] - BRIDGE: ZoneMinder Server Bridge Handler Initialized                                                                                                   
2018-01-15 10:48:25.421 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE]: 'ZoneMinderServerBridgeHandler'failed to initialize (NullPointerException). StackTrace='[Ljava.lang.StackTraceElement;@6469e'

This could be fixed by switching protocol config param to HTTPS and back to HTTP.

The I changed the ā€œRefresh Disk Usageā€ to disabled:

2018-01-15 10:53:15.913 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Stopping Discovery service                                                                                                        
2018-01-15 10:53:15.939 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Stopping WatchDog task                                                                                                            
2018-01-15 10:53:15.943 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Stopping refresh data task                                                                                                        
2018-01-15 10:53:23.456 [INFO ] [andler.ZoneMinderServerBridgeHandler] - BRIDGE: ZoneMinder Server Bridge Handler Initialized                                                                                                   
2018-01-15 10:53:24.979 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Bridge status changed from 'OFFLINE' to 'ONLINE'                                                                                  
2018-01-15 10:53:25.803 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE]: 'ZoneMinderServerBridgeHandler'failed to initialize (NullPointerException). StackTrace='[Ljava.lang.StackTraceElement;@1dfa5a5'              
2018-01-15 10:53:27.640 [ERROR] [andler.ZoneMinderServerBridgeHandler] - BRIDGE [924fb364]: Call to setConencted failed with exception 'Provided credentials not valid'                                                         
2018-01-15 10:53:27.664 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (924fb364)]: Brigde went ONLINE

Despite the error the bridge seems to be working.

Even if ā€œBackground discoveryā€ is on no monitors are discovered without doing anything. When initiating a manual scan:

2018-01-15 11:02:03.377 [ERROR] [nternal.DiscoveryServiceRegistryImpl] - Cannot trigger scan for thing types '[zoneminder:monitor]' on 'ZoneMinderDiscoveryService'!                                                            
java.lang.NullPointerException: Call to '/monitors.json' with queryString 'null' failed                                                                                                                                         
        at name.eskildsen.zoneminder.internal.ZoneMinderGenericProxy.getAsJson(ZoneMinderGenericProxy.java:228) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                                                         
        at name.eskildsen.zoneminder.internal.ZoneMinderGenericProxy.getAsJson(ZoneMinderGenericProxy.java:217) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                                                         
        at name.eskildsen.zoneminder.internal.ZoneMinderServerProxy.getMonitors(ZoneMinderServerProxy.java:194) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                                                         
        at org.openhab.binding.zoneminder.handler.ZoneMinderServerBridgeHandler.getMonitors(ZoneMinderServerBridgeHandler.java:1266) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                                    
        at org.openhab.binding.zoneminder.internal.discovery.ZoneMinderDiscoveryService.discoverMonitors(ZoneMinderDiscoveryService.java:93) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                            
        at org.openhab.binding.zoneminder.internal.discovery.ZoneMinderDiscoveryService.startScan(ZoneMinderDiscoveryService.java:74) [250:org.openhab.binding.zoneminder:2.3.0.201801150019]                                   

Maybe the bridge is not so well as it seems ??? Yes - another config change was needed !
Then the manual scan is successful (didnā€™t wanna wait for automatic).

For one monitor I linked all available Channels:

2018-01-15 11:12:56.278 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'updateChannel' was called (channelId='zoneminder:monitor:924fb364:monitor-3:alarm'state='UNDEF', exception'null')             
2018-01-15 11:12:56.290 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'updateChannel' was called (channelId='zoneminder:monitor:924fb364:monitor-3:force-alarm'state='UNDEF', exception'null')       
2018-01-15 11:12:56.302 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'updateChannel' was called (channelId='zoneminder:monitor:924fb364:monitor-3:motion-event'state='UNDEF', exception'null')      
2018-01-15 11:12:56.320 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'updateChannel' was called (channelId='zoneminder:monitor:924fb364:monitor-3:recording'state='UNDEF', exception'null')

So far by now. At first glance it seems that NO significant load is added to the ZM server !:+1::+1::+1:

1 Like

I think it is. I have tracked it down a bit, and I think it is some code called a bit too early. It seems to be the update of properties that tend to fail. This could happend both during startup and certainly when changing config.
Overall your findings seems to match my findings, I allthough appreciate them, since I have some observations to go for. As far as I can trace in the code, the error isnā€™t really anything, but the error prevents it from initializing. It seems like the errors is actually the error :slight_smile:

The build should lower the build on the ZoneMidner server significantly, also compared with the mainstream build
.
As I see it right now, priority is:

  1. Fix the errors on startup / config changes
  2. Fix problems of channels not being update at all
  3. Fix problems with channels being updated at a wrong frequency.
  4. Fix cosmetic problems (eg. set still image to Undef when update is disabled)
  5. Add PTZ Control handling

I need some help for the last one. I have only seen one set of json files for a camera with PTZ support (thanks to @captndelta). I really need something more if I should be able to figure out what I coyuld expect to meet out there.

@Dome : Would you share your http://<ZMSERVER>/zm/api/monitors.json and http://<ZMSERVER>/zm/api/controls.json with me? Send it as a PM and be sure to remove passwords from the file (if any)

I can confirm that the load addition to ZM server is now about 0.1 and 0.15 with disabled ā€œDisk usageā€ channel. I would consider this as low enough. :slight_smile:

Just to clearify. The DiskUsage count can only be enabled or disabled. When enabled it only runs once each hour.

Thanks for the clarification - I only mentioned this to specify the parameter changes from defaults. :slight_smile:

I now have added a monitor which is disabled in ZM:

2018-01-15 13:41:27.501 [INFO ] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-4]: Thing status changed from 'OFFLINE' to 'OFFLINE' (DetailedStatus='COMMUNICATION_ERROR', Description='Capture Daemon is not running')      
2018-01-15 13:41:27.509 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-4]: Capture Daemon is not running

This is repeated until the monitor is assigned a function in ZM. I think the behavior is ok, the state reflection in the channels ā€œonlineā€ and ā€œenabledā€ is correct. Maybe the INFO logging should only occur once (when state change is detected) and ERROR logging should be DEBUG because the assigned function ā€œnoneā€ in ZM may be intentional.

I agree that it is two bugs.

Iā€™m sorry to say that Iā€™m struggling to keep a stable ZoneMinder installation working and I donā€™t have anything installed at the moment. Iā€™ve actually been considering some alternatives to ZoneMinder, so I guess for now I withdraw my request (though I imagine others would still benefit).

Thats absolutely fine :slight_smile:

1 Like

I have pushed a new binding to the marketplace.
I finally got on top of the OFFLINE problem which seems to occur whenever you change settings or if you delete the existing things, then perform a discovery - and everything is OFFLINE. Eventually it came ONLINE,else you had to restart openHAB

That one should be solved, but you should still expect some NullPointerExceptions (they are the root cause of this particular problem)
What happens? It seems that the ZoneMinder server gets enough and just stops responding. Actually the most simple query stops working. It seems that it happens during the initial connection phase. Which failed and caused the bridge to stay OFFLINE. The reason config changes had an effect is that it will then force a new cycle, which eventually succeeds.
Instead the code has been moved to the watchdog loop. It takes a little longer because you would need to wait until it eventually has some success. Actually it seems to take a few loops.
The strange thing is that exactly the same code just works when starting openHAB. It seems to work now.

The priority update of stillimages, and diskusage should work now.
The Debug log has been sorted a little, still to much, but much betterā€¦

Things removed, binding uninstalled then installed:

openhab> list | grep Zone
251 ā”‚ Active   ā”‚  80 ā”‚ 2.3.0.201801152238     ā”‚ ZoneMinder Binding

Looks like it is. :slight_smile: After adding the server thing it took a short while, then the Bridge went online:

2018-01-16 09:53:56.353 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Starting ZoneMinder Server Bridge Handler (Bridge='null')                                                                                                    
2018-01-16 09:53:56.418 [INFO ] [andler.ZoneMinderServerBridgeHandler] - BRIDGE: ZoneMinder Server Bridge Handler Initialized                                                                                                                              
2018-01-16 09:54:02.726 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Bridge status changed from 'OFFLINE' to 'OFFLINE'                                                                                                            
2018-01-16 09:54:14.992 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Bridge status changed from 'OFFLINE' to 'OFFLINE'                                                                                                            
2018-01-16 09:54:27.063 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Bridge status changed from 'OFFLINE' to 'ONLINE'                                                                                                             
2018-01-16 09:54:27.515 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Brigde went ONLINE

After the next short while, the monitors appear in the inbox - so discovery works too. Great work ! :+1:

After adding the monitor things I get a lot of onFetchData exceptions. The log message on already discovered things in the inbox is already there or back again:

2018-01-16 10:02:00.739 [INFO ] [discovery.ZoneMinderDiscoveryService] - [DISCOVERY]: Monitor with Id='5' and Name='NOC' added                                                                                                                             
2018-01-16 10:02:10.238 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'onFetchData' was called (Exception'null')                                                                                                                
2018-01-16 10:02:16.569 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: Error when 'onFetchData' was called (Exception'null')                                                                                                                
2018-01-16 10:02:21.634 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Error when 'onFetchData' was called (Exception'null')                                                                                                                
2018-01-16 10:02:27.790 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-4]: Error when 'onFetchData' was called (Exception'null')

A single config value change was successful. After the bridge went online again, the monitors where initialized and the onFetchData errors starts to fill the log again.

Not in my case :disappointed_relieved: . I think the onFetchData errors come from the still image refresh, because after re-linking the items Iā€™ve got this image channel error:

2018-01-16 10:13:53.080 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'updateChannel' was called (channelId='zoneminder:monitor:0533b247:monitor-3:image'state='UNDEF', exception'null')

The still images worked yesterday. My ā€œsecret weaponā€, a config value change on a single monitor, did not work either.
The enabled/disabled channel update seems not to be working too, maybe a subsequent error.

Update:
After restarting the openHAB server, the ā€œcredentials invalidā€ error reappeared:

2018-01-16 10:40:19.400 [ERROR] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Exception occurred in updateAvailabilityStatus Exception='Provided credentials not valid'

The ā€œusualā€ protocol config param flip was needed to fix it. After that, the monitor thing got some failures, then went online and started with the onFetchData errors.

2018-01-16 10:44:59.031 [INFO ] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Bridge 'zoneminder:server:0533b247' connected                                                                                                                        
2018-01-16 10:44:59.480 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Exception occurred when calling 'onBridgeConencted()'. Exception='Call to '/monitors/3.json' with queryString 'null' failed'                                         
2018-01-16 10:44:59.484 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Exception occurred when updating monitor properties - Message:Call to '/monitors/3.json' with queryString 'null' failed                                              
2018-01-16 10:45:41.387 [INFO ] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: Thing status changed from 'OFFLINE' to 'ONLINE'                                                                                                                      
2018-01-16 10:45:42.652 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'onFetchData' was called (Exception'null')                                                                                                                
2018-01-16 10:47:28.476 [ERROR] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'onFetchData' was called (Exception'null')

Thanks for the detailed report. I am actually glad that you cannot get rid of the onFetchData exception. That means it is reproduceable. My best guess is as you indicate, your monitor settings. Which settings are you using for your monitors (only interested in the two Image refresh priority setttings, and daemon refresh priority for your monitors.

I wil continue to test other scenarios in my setup. I think it might be the combination of settings that causes the problem.

The message is actual not correct. It is a catch all handler. It really shouldnā€™t end there.

To me it looks like a chain reaction coming from one NullPointerException. I still doesnā€™t understand why ZoneMinder seems to fail on even the most simple HTTP request every now and then.

It might be interesting to see your complete debug log for ZoneMinder Binding.

To get ZoneMidner entries in its own file you can add the lines below to the end of the file org.ops4j.pax.logging.cfg in userdata/etc:

#################
#
# Zoneminder
#
#################
log4j2.logger.zoneminder.name = org.openhab.binding.zoneminder
log4j2.logger.zoneminder.level = DEBUG
log4j2.logger.zoneminder.additivity = false
log4j2.logger.zoneminder.appenderRefs = out
log4j2.logger.zoneminder.appenderRef.out.ref = ZONEMINDER

# Appender
log4j2.appender.zoneminder.name = ZONEMINDER
log4j2.appender.zoneminder.type = RollingRandomAccessFile
log4j2.appender.zoneminder.fileName = ${openhab.logdir}/zoneminder.log
log4j2.appender.zoneminder.filePattern = ${openhab.logdir}/zoneminder.log.%i
log4j2.appender.zoneminder.immediateFlush = true
log4j2.appender.zoneminder.append = true
log4j2.appender.zoneminder.layout.type = PatternLayout
log4j2.appender.zoneminder.layout.pattern = %d{dd-MMM-yyyy HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n
log4j2.appender.zoneminder.policies.type = Policies
log4j2.appender.zoneminder.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.zoneminder.policies.size.size = 10MB
log4j2.appender.zoneminder.strategy.type = DefaultRolloverStrategy
log4j2.appender.zoneminder.strategy.max = 10

Itā€™s ā€œLow Priorityā€ for idle refresh and ā€œNormal Priorityā€ for alarmed state.

Iā€™ve added the log and appender settings. Attached is the log for an complete openhab startup including the https/http protocol flip. The json extension is only to be able to upload this here ā€¦ :wink:

zoneminder.json (59.7 KB)

Update:
The monitor things where missing ā€¦ sry:

16-Jan-2018 13:23:42.803 [INFO ] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR]: Starting ZoneMinder Server Thing Handler (Thing='zoneminder:monitor:0533b247:monitor-3')                                                                
16-Jan-2018 13:23:42.822 [INFO ] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ZoneMinder Monitor Handler Initialized                                                                                                                
16-Jan-2018 13:23:42.826 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]:    Monitor Id:         3                                                                                                                              
16-Jan-2018 13:23:42.838 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:online' in monitor '3' received command='REFRESH'                                                      
16-Jan-2018 13:23:42.842 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:alarm' in monitor '3' received command='REFRESH'                                                       
16-Jan-2018 13:23:42.844 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:recording' in monitor '3' received command='REFRESH'                                                   
16-Jan-2018 13:23:42.846 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:enabled' in monitor '3' received command='REFRESH'                                                     
16-Jan-2018 13:23:42.847 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:motion-event' in monitor '3' received command='REFRESH'                                                
16-Jan-2018 13:23:42.852 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:image' in monitor '3' received command='REFRESH'                                                       
16-Jan-2018 13:23:42.852 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Channel 'zoneminder:monitor:0533b247:monitor-3:force-alarm' in monitor '3' received command='REFRESH'                                                 
16-Jan-2018 13:24:17.251 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: URL='http://europa:80/zm/api/host/getDiskPercent.json' ResponseCode='200' ResponseMessage='OK'                                                
16-Jan-2018 13:24:18.297 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:19.368 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Thing 'zoneminder:monitor:0533b247:monitor-3' has Bridge 'null' defined (Check PASSED)                                             
16-Jan-2018 13:24:19.618 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Bridge 'null' is ONLINE (Check PASSED)                                                                                             
16-Jan-2018 13:24:19.620 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Thing 'zoneminder:monitor:0533b247:monitor-3' has valid configuration (Check PASSED)                                               
16-Jan-2018 13:24:19.623 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: ZoneMinder Id for Thing 'zoneminder:monitor:0533b247:monitor-3' defined (Check PASSED)                                             
16-Jan-2018 13:24:19.924 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:20.933 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:21.625 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/monitors/daemonStatus/id:3/daemon:zmc.json' ResponseCode='200' ResponseMessage='OK'                                      
16-Jan-2018 13:24:21.952 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:22.963 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:22.968 [DEBUG] [ding.zoneminder.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: getZoneMinderBridgeHandler(): Bridge for 'zoneminder:monitor:0533b247:monitor-3' - 'zoneminder:server:0533b247'                                       
16-Jan-2018 13:24:22.970 [DEBUG] [ding.zoneminder.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: refreshThing(): Bridge 'zoneminder:monitor:0533b247:monitor-3' Found for Thing 'zoneminder:monitor:0533b247:monitor-3'!                               
16-Jan-2018 13:24:23.321 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/monitors/3.json' ResponseCode='200' ResponseMessage='OK'                                                                 
16-Jan-2018 13:24:23.503 [ERROR] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Error when 'onFetchData' was called (Exception'null')                                                                                                 
16-Jan-2018 13:24:24.997 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/monitors/daemonStatus/id:3/daemon:zmc.json' ResponseCode='200' ResponseMessage='OK'                                      
16-Jan-2018 13:24:26.617 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/monitors/daemonStatus/id:3/daemon:zma.json' ResponseCode='200' ResponseMessage='OK'                                      
16-Jan-2018 13:24:28.121 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/monitors/daemonStatus/id:3/daemon:zmf.json' ResponseCode='200' ResponseMessage='OK'                                      
16-Jan-2018 13:24:28.123 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Using Idle Image Refresh priority (Priority='PRIORITY_LOW')                                                                                           
16-Jan-2018 13:24:29.017 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/configs/view/ZM_PATH_ZMS.json' ResponseCode='200' ResponseMessage='OK'                                                   
16-Jan-2018 13:24:29.022 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: URL='http://europa:80/zm/api/configs/view/ZM_PATH_ZMS.json' ResponseCode='200' ResponseMessage='OK'                                                   
16-Jan-2018 13:24:29.027 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Method 'refreshThing()' for Bridge zoneminder:server:0533b247 failed for thing='zoneminder:monitor:0533b247:monitor-3' - Exception='null'     
16-Jan-2018 13:24:30.033 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:30.042 [DEBUG] [ding.zoneminder.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: refreshThing(): Bridge 'zoneminder:monitor:0533b247:monitor-3' Found for Thing 'zoneminder:monitor:0533b247:monitor-3'!                               
16-Jan-2018 13:24:30.049 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Using Alarm Image Refresh priority (Priority='PRIORITY_NORMAL')                                                                                       
16-Jan-2018 13:24:30.052 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Method 'refreshThing()' for Bridge zoneminder:server:0533b247 failed for thing='zoneminder:monitor:0533b247:monitor-3' - Exception='null'     
16-Jan-2018 13:24:31.057 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:31.069 [DEBUG] [ding.zoneminder.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: refreshThing(): Bridge 'zoneminder:monitor:0533b247:monitor-3' Found for Thing 'zoneminder:monitor:0533b247:monitor-3'!                               
16-Jan-2018 13:24:31.072 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Using Alarm Image Refresh priority (Priority='PRIORITY_NORMAL')                                                                                       
16-Jan-2018 13:24:31.075 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: Method 'refreshThing()' for Bridge zoneminder:server:0533b247 failed for thing='zoneminder:monitor:0533b247:monitor-3' - Exception='null'     
16-Jan-2018 13:24:32.080 [DEBUG] [g.zoneminder.handler.ZoneMinderServerBridgeHandler] - [BRIDGE (0533b247)]: 'refreshThing()': Thing='zoneminder:server:0533b247'!                                                                                         
16-Jan-2018 13:24:32.088 [DEBUG] [ding.zoneminder.handler.ZoneMinderBaseThingHandler] - [MONITOR-3]: refreshThing(): Bridge 'zoneminder:monitor:0533b247:monitor-3' Found for Thing 'zoneminder:monitor:0533b247:monitor-3'!                               
16-Jan-2018 13:24:32.091 [DEBUG] [g.zoneminder.handler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: Using Alarm Image Refresh priority (Priority='PRIORITY_NORMAL')                                                                                       
1 Like

I just added a build to the marketplace.
This build is solely for testing, since the connection process has been conceptual changed. It should hopefully address the problem that @rbausdorf has raised.
I would not recommed using this for any other purpose than testing.

Chers
Martin

openhab> list | grep Zone                                                                                               
252 ā”‚ Active   ā”‚  80 ā”‚ 2.3.0.201801162238     ā”‚ ZoneMinder Binding

Activation timestamp 2018-01-17T08:21:15.000Z (for log lookup)

Bridge initializing and autodiscovery ok. Iā€™ve added one monitor, the rest is in the inbox so the setup is comparable to yesterday. But no image 'til now.

Great - what I was hoping to hear. I am about to add logging to the initialisation phase. I have changed the procedure to be more robust against timeouts, simply letting it retry.
Hopefully I can soon push an update

Have you ever seen an image? Else I suspect that ther is a problem with the url (I have a couple of ideas).

Donā€™t hurry. Good thing will take its time. :slight_smile:

Yes - version 2.3.0.201801150019 showed me an image. Iā€™ve checked the cam in ZM too - images are produced.

Hmm. I will see to that logging of images is improved. We might need to do some manual checks (on the generated URL)

Just tell me if I can help :slight_smile:

1 Like