Skip to main content

A Python package for controlling PTZ cameras through various protocols

Project description

Peateazea

A Python package for controlling PTZ (Pan-Tilt-Zoom) cameras through various protocols. Currently supports Avkans cameras, VISCA, and VISCA over UDP.

Features

  • Multi-protocol support:
    • Avkans cameras
    • VISCA (TCP)
    • VISCA over UDP
  • Basic PTZ controls (pan, tilt, zoom)
  • Preset position recall
  • Home position support
  • Simple, unified API across different protocols

Installation

Install using pip:

pip install peateazea

Or install from source:

git clone https://github.com/benbaptist/peateazea.git
cd peateazea
pip install -e .

Requirements

  • Python 3.9 or higher
  • requests
  • visca-over-ip

Usage

Basic Example

from peateazea import Avkans, Visca, ViscaUDP

# For Avkans cameras
camera = Avkans("192.168.1.100", 80, username="admin", password="password")

# For VISCA over TCP
camera = Visca("192.168.1.100", 1259)

# For VISCA over UDP
camera = ViscaUDP("192.168.1.100", 52381)

# Basic controls
camera.pantilt(-12, 0)  # Pan left
camera.pantilt(12, 0)   # Pan right
camera.pantilt(0, -12)  # Tilt up
camera.pantilt(0, 12)   # Tilt down

camera.zoom(7)    # Zoom in
camera.zoom(-7)   # Zoom out

camera.stop()     # Stop all movement
camera.home()     # Return to home position

# Recall preset position
camera.recall_preset(1)

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

peateazea-0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peateazea-0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file peateazea-0.1.tar.gz.

File metadata

  • Download URL: peateazea-0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for peateazea-0.1.tar.gz
Algorithm Hash digest
SHA256 51d3f285af6ded8010111e4f2111b8697f0f1a1552b318612981f2279ed4f818
MD5 05fd0299c9ddc0149ff535d3a180fe85
BLAKE2b-256 71b06cd2a269c27d2388826cb65b8bcb9dbe698b475a0ffdaf5c305ba6c06a5d

See more details on using hashes here.

File details

Details for the file peateazea-0.1-py3-none-any.whl.

File metadata

  • Download URL: peateazea-0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for peateazea-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6873169966f4e4dee4e9ea83117fe5f6b2c6771e9b8fd62fbe66f8545eac588d
MD5 61de41684e4a402b8870da01831415b9
BLAKE2b-256 2c5af39b76600a1f0c12d17cfb1723bf3d8a5d3f99fa805ccceaa10d771660b7

See more details on using hashes here.

Supported by

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