Zoneminder 1.34 w/ Openhab 2.5.12

Hi - I am trying to connect from OH 2.5.12 to my ZoneMinder installation 1.34.26, both running on a Debian SOHO server. On ZM I added a specific user for the API, enabled the API for it and logged in to the ZM GUI w/o problems. OH2 however gives me the “Cannot access ZoneMinder Server. Check provided usercredentials” thing. I finally tried:

root@tiger:~# curl  -d "<username>=openhab&<password>=xxxxxxxx&action=login&view=console" -c cookies.txt

as suggested in the binding’s instructions. This however does not provide any screen output but only populates cookies.txt, independently from whether I insert the correct or an incorrect password. Probably I am missing something very obvious here.

Can somebody please point me in the right direction ? Thanks - Martin

openHAB 2.6 ???
Where did you get that from ? We never released it.

Yes, stupid me. Corrected to 2.5.12. I’m getting old …

did you literally enter

especially <username> resp. <password> ?
The parts before the equal sign have to be field names that are used in a web form.
I doubt that the < resp. > are part of the field names.

I found that here:

Well, now that I read that again, it says to change <username> and <password> with the actual values. But that does not make sense to me. What to do with “XXXX” and “YYYY” then … ?

Zoneminder shows this in the API docs:

Yes, I just tried that and it works.

root@tiger:~# curl -XPOST -d "user=openhab&pass=xxxxxxxx"

The OH2 binding does not …

won’t it work anymore w/ ZM 1.34 ? (I know I need to update to OH3 …)

Any advanced error information in openhab.log file ?
If that does not help enable debug / trace logging for the binding.

When I reinstall the ZM bridge I get:

2022-03-05 22:21:20.895 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (668d10cf)]: Starting ZoneMinder Server Bridge Handler (Bridge='null')
2022-03-05 22:21:20.898 [INFO ] [andler.ZoneMinderServerBridgeHandler] - BRIDGE: ZoneMinder Server Bridge Handler Initialized
2022-03-05 22:21:23.387 [INFO ] [andler.ZoneMinderServerBridgeHandler] - [BRIDGE (668d10cf)]: Bridge status changed from 'OFFLINE' to 'OFFLINE'

The ZoneMinder binding that comes bundled with 2.5.12 doesn’t work with ZoneMinder version 1.34.x. The API changed in 1.34, and it’s not compatible with the ZoneMinder binding in 2.5.

However, the ZoneMinder binding in OH3 was rewritten to work with 1.34.x. But, if you want/need to run OH 2.5, there’s a 2.5 version of the OH3 binding that will work in 2.5.12. It’s located here.

1 Like