Problem with Zoneminder binding on OH4


on my updated OH4 instance my zoneminder binding does not work any moore.
I get the following error in the logs:

14:27:34.396 [INFO ] [.core.thing.internal.ThingManagerImpl] - Updating 'zoneminder:server:Zoneminder_Server01' from version 0 to 1
14:27:34.397 [ERROR] [.internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request.
java.lang.IllegalArgumentException: Provider for thing zoneminder:server:Zoneminder_Server01 cannot be determined because it is not known to the registry
	at org.openhab.core.thing.internal.ThingManagerImpl.thingUpdated( ~[?:?]
	at org.openhab.core.thing.internal.ThingManagerImpl.checkAndPerformUpdate( ~[?:?]
	at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler( ~[?:?]
	at org.openhab.core.thing.internal.ThingManagerImpl.setEnabled( ~[?:?]
	at ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke( ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
	at java.lang.reflect.Method.invoke( ~[?:?]
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation( ~[bundleFile:3.4.5]
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$ ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage( ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest( ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut( ~[bundleFile:3.4.5]
	at javax.servlet.http.HttpServlet.service( ~[bundleFile:4.0.4]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service( ~[bundleFile:3.4.5]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.service( ~[bundleFile:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter( ~[bundleFile:9.4.50.v20221201]
	at org.ops4j.pax.web.service.spi.servlet.OsgiFilterChain.doFilter( ~[bundleFile:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle( ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle( ~[bundleFile:9.4.50.v20221201]
	at ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.servlet.ServletHandler.doScope( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.session.SessionHandler.doScope( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle( ~[bundleFile:9.4.50.v20221201]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle( ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.Server.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.HttpChannel.dispatch( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.HttpChannel.handle( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.server.HttpConnection.onFillable( ~[bundleFile:9.4.50.v20221201]
	at$ReadCallback.succeeded( ~[bundleFile:9.4.50.v20221201]
	at ~[bundleFile:9.4.50.v20221201]
	at$DecryptedEndPoint.onFillable( ~[bundleFile:9.4.50.v20221201]
	at ~[bundleFile:9.4.50.v20221201]
	at$2.succeeded( ~[bundleFile:9.4.50.v20221201]
	at ~[bundleFile:9.4.50.v20221201]
	at$ ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce( ~[bundleFile:9.4.50.v20221201]
	at ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( ~[bundleFile:9.4.50.v20221201]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$ ~[bundleFile:9.4.50.v20221201]
	at ~[?:?]

Any ideas?

Thanks for your help!


1 Like

I don’t know if it will help but did you clear the cache ?

Thanks for your reply - cleaning the cache i tried already.

I don’t remember if I had the same issue, but after the upgrade my zoneminder bridge wouldn’t work anymore.
I had to delete the bridge and recreate it.
I reassociated my monitor things with the new bridge and now, my devices are all online.

1 Like

Thanks, it worked.

Just tried to delete the bridge and recreate it still get an error:

Can't get version information

Openhab server:

Openhab 4.0.2
Zoneminder binding is 4.0.2
Rocky Linux 8.8
Java 17.0.8

Zoneminder server:

Zoneminder is 1.36.33
Rocky Linux 8.8

ZM is using https on the standard 443 port. They’re both working just fine but I can’t get openhab to talk to zoneminder.

I did try clearing cache. Also deleted the bridge thing, uninstalled the binding, shutdown openhab, cleared cache again, started openhab, installed ZM binding and added the bridge again. Still getting the same error.


I turned on debug for the binding and see this in the openhab.log:

2023-08-26 08:34:15.203 [DEBUG] [der.internal.handler.ZmBridgeHandler] - Bridge: Background discovery is ENABLED
2023-08-26 08:34:15.204 [DEBUG] [g.zoneminder.internal.handler.ZmAuth] - ZmAuth: Authorization is enabled
2023-08-26 08:34:15.205 [DEBUG] [der.internal.handler.ZmBridgeHandler] - Bridge: Checking for valid Zoneminder host:
2023-08-26 08:34:15.206 [DEBUG] [g.zoneminder.internal.handler.ZmAuth] - ZmAuth: Update expired REFRESH token using url ''
2023-08-26 08:34:15.229 [DEBUG] [der.internal.handler.ZmBridgeHandler] - Bridge: IOException on POST request, url='': java.util.concurrent.ExecutionException: PKIX path building failed: unable to find valid certification path to requested target

Your issue seems linked with HTTPS/SSL.
I don’t know why openHAB 4 / zoneminder binding is more touchy than before, but four options are on the table :

  • someone changes zoneminder binding and add an option to trust all certificates. Requires someone willing to put time in dev. I don’t know if it is still actively maitained, though ?
  • fight with java keystore to import your custom public certificate, use it with openHAB, etc. You will find information on internet but if you hope 5 minutes and a few command line, I can take a bet that it won’t be this easy. There is ALWAYS something in the way :sweat_smile:
  • use a let’s encrypt certificate for your zoneminder or (better) for a reverse proxy (must be exposed on the internet). Again, not so easy, but it could be interesting if you want to check zoneminder from outside.
  • very easy route : dump HTTPS and use HTTP

I choosed the very easy route. Many experts will tell you that using HTTP is a bad idea. But frankly, if someone is inside my network spying my communication, HTTP or HTTPS will be the least of my worries.

fight with java keystore to import your custom public certificate, use it with openHAB, etc. You will find information on internet but if you hope 5 minutes and a few command line, I can take a bet that it won’t be this easy. There is ALWAYS something in the way :sweat_smile:

Been fighting this for a bit now. I’m no stranger to command line so I thought this might be the best solution. Ran keytool and got the cert added but can’t get past the “Can’t get version information” error.

When I get some time I think I’m gonna head down the let’s encrypt path.

Got a let’s encrypt cert working and after fiddling around with various auth and api settings I finally have my zoneminder server working as a bridge in Openhab.

I haven’t looked too much into it as yet, but it appears that whatever was working for a separate CA in V3 of Openhab no longer works. I’m in the process of re-establishing my Openhab (and zoneminder!) setups and adding my CA cert into the keystore as a CA used to sort that out.
This doesn’t work any more, I’ve got new certs, both issued by my CA to ZM and openhab, but openhab won’t connect using https. Symptom was the same on my previously running V3 install (which did recognise ZM via https), once it upgraded to V4 it stopped behaving itself.

A let’s encrypt cert on my zoneminder setup got the bridge working for me. I also have the monitors working but can’t seem to setup image or video URL items/links to use them on a page. Pretty sure I’m just doing it wrong or missing a step in the workflow. Still banging away with it though.

BTW, I have started working up some notes on getting zoneminder and openhab working with each other on the Zoneminder Wiki. Openhab

1 Like

Did a bit of investigation, it used to be possible to add the CA root cert as ca in the specific openhab keystore. Now the CA root cert must be added to the relevant Java cacerts keystore instead.

Think I found why I’m not getting good links to ZM image or video.

When I add an item for a video URL I end up with:


The path appears to be incorrect. I can watch the feed using this:


So how do I adjust the URL so it’s got the correct cgi-bin path? I can’t find anyplace to edit that.

I suspect that’s related to Zoneminder, and how it configures Apache for the specific distribution. I recall seeing that cgi-bin-zm path when I was using CentOS for my zoneminder install but it’s now /zm/cgi-bin/ with my ubuntu install. Config files are likely available somewhere like /etc/apache2/conf-enabled or similar on the ZM install. I suspect that upgrades may break it though.