pyzm
pyzm copied to clipboard
Get Monitor_Status from Monitor API
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?).