Skip to main content

A loose python wrapper around the ZoneMinder REST API.

Project description

Zm-py

image

Python package

image

license

A loose python wrapper around the ZoneMinder API for Home Assistant

Time constraints have limited the development cycles to maintenance mode. Pull Requests, passing the pipeline QA checks, will continue to be accepted.

Acknowledgments

Not to be confused with ZoneMinder's Pythonic wrapper pyzm, this zm-py project (with a hyphen) is tailored for the Home Assistant ZoneMinder Integration

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


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.5.dev2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

zm_py-0.5.5.dev2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file zm_py-0.5.5.dev2.tar.gz.

File metadata

  • Download URL: zm_py-0.5.5.dev2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.38-gentoo-x86_64

File hashes

Hashes for zm_py-0.5.5.dev2.tar.gz
Algorithm Hash digest
SHA256 b3e62d263716c0b7461b59a4fd84716431619d8c7a72cca70d3c03eb96202de2
MD5 c417f84674e7c7e3ade0d0bab644c2f7
BLAKE2b-256 3e461711c2a4b251c91923fe63323d498dda54f14d2be01ded7055c43a437f9f

See more details on using hashes here.

File details

Details for the file zm_py-0.5.5.dev2-py3-none-any.whl.

File metadata

  • Download URL: zm_py-0.5.5.dev2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.38-gentoo-x86_64

File hashes

Hashes for zm_py-0.5.5.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf9e2d46e177b20a2d868a981ae1c054b80a518e764e1abc12d471d9b65ddaa6
MD5 e566a8187916151572691d9fa764a6c2
BLAKE2b-256 0c54a4e61d2107e45bb60d4fa987a620d73f988abebb752b26a48a00073bc89e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page