Skip to main content

ipTIME C400G ONVIF PTZ control wrapper

Project description

c400g-ptz

ipTIME C400G 전용 ONVIF PTZ 컨트롤 래퍼입니다. C400G의 ONVIF PTZ 특성(속도 magnitude 무시, RemoteDisconnected 등)을 고려하여 좌/우/상/하 이동과 정지에 집중한 단순한 API를 제공합니다.


ipTIME C400G ONVIF PTZ control wrapper. Provides a simple API for pan/tilt control, handling C400G's ONVIF quirks (ignoring speed magnitude, RemoteDisconnected errors, etc.).

Requirements

중요: PTZ 제어를 사용하기 전에 ipTIME CCTV 앱에서 RTSP 설정을 활성화해야 합니다.

Important: You must enable RTSP settings in the ipTIME CCTV app before using PTZ control.

Installation

pip install c400g-ptz

Usage

from c400g_ptz import C400GPTZ

# Connect to camera
cam = C400GPTZ("192.168.1.100", 5000, "admin", "password")

# Step movements (with duration)
cam.left(0.3)
cam.right(0.3)
cam.up(0.5)
cam.down(0.5)

# Continuous movement
cam.start_move("left")
# ... do something ...
cam.stop()

# Generic step with custom duration
cam.step("up", duration=0.4)

API

C400GPTZ(ip, port, user, password, *, profile_index=0, default_step_time=0.3, log=None)

Main PTZ control class.

Parameters:

  • ip: Camera IP address
  • port: ONVIF port (usually 5000)
  • user: Username
  • password: Password
  • profile_index: ONVIF media profile index (default: 0)
  • default_step_time: Default duration for step movements in seconds (default: 0.3)
  • log: Optional logger instance

Methods:

  • step(direction, *, duration=None): Move in direction for specified duration
  • left(duration=None): Move left
  • right(duration=None): Move right
  • up(duration=None): Move up
  • down(duration=None): Move down
  • start_move(direction): Start continuous movement
  • stop(): Stop movement

Directions: "left", "right", "up", "down"

Logging

Enable logging to see what's happening:

import logging
logging.basicConfig(level=logging.INFO)

from c400g_ptz import C400GPTZ
cam = C400GPTZ("192.168.1.100", 5000, "admin", "password")

License

MIT

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

c400g_ptz-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

c400g_ptz-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file c400g_ptz-0.1.1.tar.gz.

File metadata

  • Download URL: c400g_ptz-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for c400g_ptz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 407f5816ae6a10224f909d8cb3dcfe93d9d2c04078687bbacce7ee14ce4f61c2
MD5 d4dc16d5f1ca8aad1ece022068379c2c
BLAKE2b-256 aa5df935d0d4d6cebc85850f48f4afaa6deb6740f7e750912788f606537a15c1

See more details on using hashes here.

File details

Details for the file c400g_ptz-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: c400g_ptz-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for c400g_ptz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 639ef6616ab167f0763c03002c9e25573ff8510b004906eb2e24ae0324710234
MD5 9734edf115f535b1cfd4f857d49601e7
BLAKE2b-256 c77d0f5cd3883d01c8254d892f32273104e42288e0cc14c7b3b30ce726098096

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