Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Monitor_Status from Monitor API #53

Open
cam-avida opened this issue Jan 9, 2025 · 0 comments
Open

Get Monitor_Status from Monitor API #53

cam-avida opened this issue Jan 9, 2025 · 0 comments

Comments

@cam-avida
Copy link

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:

def status(self):
"""Returns status of monitor, as reported by zmdc
TBD: crappy return, need to normalize
Returns:
json: API response
"""
url = self.api.api_url+'/monitors/daemonStatus/id:{}/daemon:zmc.json'.format(self.id())
return self.api._make_request(url=url)

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?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant