pyzm icon indicating copy to clipboard operation
pyzm copied to clipboard

Get Monitor_Status from Monitor API

Open cam-avida opened this issue 1 year ago • 0 comments

From https://zoneminder.readthedocs.io/en/stable/api.html#return-a-list-of-all-monitors

It is worthwhile to note that starting ZM 1.32.3 and beyond, this API also returns a Monitor_Status object per monitor. It looks like this:

"Monitor_Status": { "MonitorId": "2", "Status": "Connected", "CaptureFPS": "1.67", "AnalysisFPS": "1.67", "CaptureBandwidth": "52095" }

The current Monitor object's status() method only returns the status from the daemon: https://github.com/ZoneMinder/pyzm/blob/043e304131394ad407fb01144f1ce8ac6f4f9898/pyzm/helpers/Monitor.py#L183-L191

It'd be great to get the Monitor_Status object if possible (version >= 1.32.3), and if not, then return the daemon (or both?).

cam-avida avatar Jan 09 '25 23:01 cam-avida