PTZ commands
ℹ️ Info
These API changes will be introduced in 3.2.0
mediaPtz.php API Calls
All requests are GET requests sent to /media/mediaPtz.php.
Required Parameters for All Commands:
- id=\<device_id>: The numeric ID of the camera.
- command=\<command_name>: The command to execute.
PTZ Commands and Parameters
| Command | Description | Additional Parameters | Example URL |
|---|---|---|---|
| move | Moves the camera. Combines pan, tilt, and zoom. | * pan=\<l|r> (left/right) |
|
| * tilt=\<u|d> (up/down) | |||
| * zoom=\<t|w> (tele/in | wide/out) | |||
| * panspeed=\<0.0-1.0> | |||
| * tiltspeed=\<0.0-1.0> | |||
| * duration=\<ms> | /media/mediaPtz.php?id=1\&command=move\&pan=r\&tilt=u\&panspeed=0.8 | ||
| stop | Stops any current camera movement. | (None) | /media/mediaPtz.php?id=1\&command=stop |
| query | Retrieves presets and feature capabilities. | (None) | /media /mediaPtz.php?id=1\&command=query |
| capabilities | Retrieves detailed ONVIF capabilities as JSON. | (None) | /media/mediaPtz.php?id=1\&command =capabilities |
| save | Saves the current position to a new preset. | preset=\<id> name=\<string> | /media/mediaPtz .php?id=1\&command=save\&preset=1\&name=Front+Door |
| rename | Renames an existing preset. | preset=\<id> name=\<string> | /media/mediaPtz.php?id=1\&command= rename\&preset=1\&name=Main+Gate |
| go | Moves the camera to a specified preset. | preset=\<id> | /media/mediaPtz.php ?id=1\&command=go\&preset=1 |
| clear | Deletes a specified preset. | preset=\<id> | /media/mediaPtz.php?id =1\&command=clear\&preset=1 |
| sethome | Sets the camera's current position as home. | (None) | /media/mediaPtz.php?id=1\&command=sethome |
| gotohome | Moves the camera to its saved home position. | (None) | /media/media Ptz.php?id=1\&command=gotohome |