A loose python wrapper around the ZoneMinder REST API.
Project description
Zm-py
A loose python wrapper around the ZoneMinder API. As time goes on additional functionality will be added to this API client.
zm-py is based on code that was originally part of Home Assistant. Historical sources and authorship information is available as part of the Home Assistant project:
Installation
PyPI
$ pip install zm-py
Usage
from zoneminder.zm import ZoneMinder
SERVER_HOST = "{{host}}:{{port}}"
USER = "{{user}}"
PASS = "{{pass}}"
SERVER_PATH = "{{path}}"
zm_client = ZoneMinder(
server_host=SERVER_HOST, server_path=SERVER_PATH, username=USER, password=PASS, verify_ssl=False
)
#Zoneminder authentication
zm_client.login()
#Get all monitors
monitors = zm_client.get_monitors()
for monitor in monitors:
print(monitor)
>>> Monitor(id='monitor_id', name='monitor_name', controllable='is_controllable')
#Move camera down
controllable_monitors = [m for m in monitors if m.controllable]
for monitor in controllable_monitors:
zm_client.move_monitor(monitor, "right")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zm-py-0.5.2.tar.gz
(12.7 kB
view hashes)
Built Distribution
zm_py-0.5.2-py3-none-any.whl
(14.2 kB
view hashes)