I have unfortunately found that ZoneMidner seems to act a little bit different from what I thought it did.
It is all about the handling of events, especially the recording modes (Mocord and Record) shows this behaviour. I thought that a event could be translated to a recording in ZoneMinder. But not quite.....
With regards to motion detection yes, but when we look at what happens when we switch to Record, we will see a short event (eg. a start and then a stop occurs), but recording continues. This means that using the event Switch in openHAB won't give the true picture to determine if ZoneMinder is Recording or not. It tells the truth about the current state of the event, but that isn't the same story. The only / best solution I see is to add a new readonly switch called "Recording" or something like that. ON whenever the monitor is recording and OFF when it is idle. The Event switch is kept as an indicator if the monitor has an active event.
If somebody has some points about this one, then speak up
I have also been looking a bit into the disconnect problem. In my ZoneMinder setup it seems (from looking at the ZoneMinder log) that ZoneMinder has some kind of hickup at almost the same time. I am a little in doubt how I can safely determine if ZoneMidner is up and running.