No project description provided
Project description
ZMHA-Py
A loose Python wrapper of ZoneMinder's API for the Home Assistant Integration
Acknowledgments
zmha-py forked from rohankapoorcom/zm-py latest release 0.5.2 Oct 17, 2020. The goal is to restore Home Assistant functionality with the current ZoneMinder 1.36 deployments by providing bug fixes and refactoring with upstream's API changes.
zm-py is based on code that was originally part of Home Assistant. As time goes on additional functionality will be added to this API client.
Historical sources and authorship information is available as part of the Home Assistant project:
Installation
PyPI
$ pip install zmha-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
zmha_py-0.5.3.post2.tar.gz
(12.7 kB
view hashes)
Built Distribution
Close
Hashes for zmha_py-0.5.3.post2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3010c9369d386055428dc40c9c131c4eb87ba7cf6ac0942bb909372ef0a36d5 |
|
MD5 | d5fc80436729cb080666726091479044 |
|
BLAKE2b-256 | 64bb91aaeeb4cfc87a62de4c31dd3e2d28776064a419c84c4394bb0b3da7955a |