Zoneminder binding

no matter what I change in the ZoneMinder UI, the changes are not reflected in OH2 and the eventlog shows no item updates

Does the server (bridge), and monitors appear to be online (green in Habmin / PaperUI)?

yep, I misread your earlier question and just updated the answer. All the Zoneminder things are “Online”.

OK, so far everything is great

Are you using credentials? Then we shoudl be sure that the user has enough access rights (I remember that there is some weird right that has to be given)

BTW. Has you added things by using discovery or a things definition file? I have been using the latter, and it is causing me some problems .

I just tried removing the “OPT_USE_AUTH” flag in zoneminder to see if that was the issue and though I can now hit the URLs listed in the debug log (http://192.168.0.10/zm/api/monitors/daemonStatus/id:3/daemon:zmf.json, etc) without authentication, the refreshThing() error persist

I think you might need to either rediscover things or restart OH

Discovery, once I added the server the monitors appeared in the inbox almost instantly

OK, that is also great, then you have some kind of conenction to your server (it can communicate, as far as i remember, the moinitor discovery also requires a correct authentificated user) SO AUTH should be alright then

Did you just go with the default settings or didi you change something?

defaults, i just installed ZM and enabled the API & triggers and added monitors.

I’ve just removed and readded all the ZM things (the 3 monitors were discovered correctly) and i’m not getting the exception anymore but the behavior is now worse. Now refreshThings() is working but regardless of the values in ZM, the channels get updated to UNDEF and the values I set don’t make it to ZM. Here is a log of me setting the “enabled” channel for one of my cameras to ON. The binding instantly sets it back to UNDEF with no change in the ZM value.

07:19:49.297 [INFO ] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting enabled to 'ON'
07:19:49.297 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Channel 'zoneminder:monitor:756ae518:monitor-2:enabled' in monitor '2' received command='REFRESH'
07:19:49.297 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:enabled' to 'UNDEF'
07:19:49.299 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'CameraFrontDoor_Enabled' received command ON
07:19:49.301 [INFO ] [marthome.event.ItemStateChangedEvent] - CameraFrontDoor_Enabled changed from UNDEF to ON
07:19:55.134 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-2' has Bridge 'null' defined (Check PASSED)
07:19:55.134 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: ThingAvailability: Bridge 'null' is ONLINE (Check PASSED)
07:19:55.134 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-2' has valid configuration (Check PASSED)
07:19:55.135 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: ThingAvailability: ZoneMinder Id for Thing 'zoneminder:monitor:756ae518:monitor-2' defined (Check PASSED)
07:19:56.270 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-1' has Bridge 'null' defined (Check PASSED)
07:19:56.270 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: ThingAvailability: Bridge 'null' is ONLINE (Check PASSED)
07:19:56.270 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-1' has valid configuration (Check PASSED)
07:19:56.270 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-1]: ThingAvailability: ZoneMinder Id for Thing 'zoneminder:monitor:756ae518:monitor-1' defined (Check PASSED)
07:19:57.425 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-3' has Bridge 'null' defined (Check PASSED)
07:19:57.425 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Bridge 'null' is ONLINE (Check PASSED)
07:19:57.425 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: Thing 'zoneminder:monitor:756ae518:monitor-3' has valid configuration (Check PASSED)
07:19:57.426 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-3]: ThingAvailability: ZoneMinder Id for Thing 'zoneminder:monitor:756ae518:monitor-3' defined (Check PASSED)
07:20:12.201 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: Running Refresh data task count='1', freq='30', max='30', interval='30', intervalLow='0'
07:20:12.201 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: 'refreshDataRunnable()': (diskUsage='false')
07:20:12.201 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: 'refreshThing()': Thing='zoneminder:server:756ae518'!
07:20:12.221 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: URL='http://192.168.0.10:80/zm/api/host/getLoad.json' ResponseCode='200' ResponseMessage='OK'
07:20:12.222 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: BridgeHandler.updateChannel(): Updating channel 'cpu-load' to state='2.03'
07:20:12.224 [DEBUG] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (756ae518)]: BridgeHandler.updateChannel(): Updating channel 'disk-usage' to state='UNDEF'
07:20:12.226 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: Performing refresh
07:20:12.226 [DEBUG] [r.handler.ZoneMinderBaseThingHandler] - [MONITOR-2]: refreshThing(): Refreshing Thing - zoneminder:monitor:756ae518:monitor-2
07:20:12.228 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:enabled' to 'UNDEF'
07:20:12.230 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:force-alarm' to 'UNDEF'
07:20:12.231 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:alarm' to 'UNDEF'
07:20:12.233 [INFO ] [marthome.event.ItemStateChangedEvent] - CameraFrontDoor_Enabled changed from ON to UNDEF
07:20:12.233 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:recording' to 'UNDEF'
07:20:12.235 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:detailed-status' to 'UNDEF'
07:20:12.236 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:function' to 'UNDEF'
07:20:12.237 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:event-cause' to 'UNDEF'
07:20:12.238 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:capture-daemon' to 'UNDEF'
07:20:12.239 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:analysis-daemon' to 'UNDEF'
07:20:12.240 [DEBUG] [andler.ZoneMinderThingMonitorHandler] - [MONITOR-2]: Setting channel 'zoneminder:monitor:756ae518:monitor-2:frame-daemon' to 'UNDEF'

It should be OK that it initially sets the values to UNDEF, since this is done initially and repeated until it has a stable connection to ZM.
The strange thing is that it seems to have a fine connection to ZM (from what you describe), so obviously it should change to the correct value.
I can reproduce something that I considder to be quite similar, so I will have to dig into that, to see if I can find the problem.

I restarted OH2 and am now back to the refreshThing() exception=‘null’ error though my changes are now reflected in ZM, so that is good.

It looks like the other issue, where it is just setting the values to UNDEF may be because the Autodiscovered things weren’t configured correctly, even though the thing definition in karaf showed the bridge was set correctly, the log states:

Thing 'zoneminder:monitor:756ae518:monitor-1' has Bridge 'null' defined

so the connection must not be stable. After a restart it doesn’t cycle through the setting the values to UNDEF anymore, just:

[BRIDGE (756ae518)]: Method 'refreshThing()' for Bridge zoneminder:server:756ae518 failed for thing='zoneminder:monitor:756ae518:monitor-1' - Exception='null'

Can yopu check your log to see if you have a line like this:

[MONITOR]: Configuration for Thing 'zoneminder:monitor:xxxxxx:monitor-1' is not loaded correctly.

The ‘xxxxxx’ should be changed toi the same id as your bridge?
I am quite sure that this is somethineg that appears when something isn’t started correctly. Somehow it seems like things can happend in a order so that it doesn’t work.

Nope, I really believe that your connection is stable. It is something in the binding that falsely indicates an unstable connection. If you take a look at the debug log all http calls is logged with returd code. I bet all of them returns 200 (=not wrong with your connection).I see somewhat the same problem, so I guess it is related to initialisation.

not seeing that in the log, I did notice this line though:

[MONITOR-1]: refreshThing(): Bridge 'zoneminder:monitor:756ae518:monitor-1' Found for Thing 'zoneminder:monitor:756ae518:monitor-1'!

is that a bad log message or does monitor-1 have itself as its own bridge?

Seems to be an error in the logmessage, if it isn’t an error message, you shouyldn’t worry :slight_smile:

This is really strange, My openHAB build i #929, I am having somewhat the same problems. I have now build a addon from sources and when running in debug env. there is no problems, when running the same addon in #929 I see problemjs. I will try to update to latest openHAB build. Hopefully that solves the problem.

I’m hesitant to update to the latest as a there seems to be a breaking change in the latest snapshot:

Thanks for notifying, would be a problem for me too,a s I am using Z-Wave :slight_smile: