Skip to main content

ONVIF PTZ control

ONVIF PTZ control

The ptz component can be used to control PTZ (Pan-Tilt-Zoom) cameras. It supports the ONVIF protocol, which is widely supported by most modern cameras.

Configuration

Configuration example
ptz:
cameras:
camera_1:
onvif_port: 80 # The port the camera listens to for ONVIF connections
onvif_username: <username> # username associated with ONVIF
onvif_password: <password> # password associated with ONVIF
camera_min_x: -0.73 # used in "patrol" mode to limit swings to useful fov
camera_max_x: 0.04 # used in "patrol" mode to limit swings to useful fov
presets: # allows switching between pre-defined (absolute) positions
- name: front # name them
x: 0.0
y: 0.0
on_startup: true # have the camera move to this preset when Viseron starts
- name: left
x: -0.5
y: 0.0
- name: right
x: 0.5
y: 0.0
ptzmap required
Telegram bot to control pan-tilt-zoom cameras.

Troubleshooting

To enable debug logging for ptz, add the following to your config.yaml
/config/config.yaml
logger:
logs:
viseron.components.ptz: debug