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.2.tar.gz (4.3 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.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c400g_ptz-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 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.2.tar.gz
Algorithm Hash digest
SHA256 040d0d9c59c2032a58eb7a246e72217e14a3feb5a75d7966452927e1db76814d
MD5 81f7a1b19094579f7ab5260462366f30
BLAKE2b-256 dd5ecde8e7792305f163f33c6e5c6a636857a33cbedac7c7ccf3a9ebf12fdb1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c400g_ptz-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 83d0309aad743d09c74e0358d107bfcb413f79e181fe5684802a7686379856f6
MD5 152e1cfd4731581f9fde57223443da61
BLAKE2b-256 a3e3b146a4ff720cdca4e6a760e6ce39d8447bf9bea01bfdfbc2b8dabd10e582

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