How do I get the current preset name (or PTZ position) of a camera position via the API? #393
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @OleksandrRiabchun , Alternate ways:Using VAPIX:a) Get the PTZ co-ordinate data from camera.http://{{Camera_IPAddress}}/axis-cgi/param.cgi?action=list&group=PTZ.Preset.P0Response:root.PTZ.Preset.P0.HomePosition=1
root.PTZ.Preset.P0.ImageSource=0
root.PTZ.Preset.P0.Name=
root.PTZ.Preset.P0.Position.P1.Data=tilt=0.000000:pan=0.000000
root.PTZ.Preset.P0.Position.P1.Name=Home
root.PTZ.Preset.P0.Position.P2.Data=tilt=29.949020:pan=2.403732
root.PTZ.Preset.P0.Position.P2.Name=a
root.PTZ.Preset.P0.Position.P3.Data=tilt=29.949112:pan=102.301025
root.PTZ.Preset.P0.Position.P3.Name=b
root.PTZ.Preset.P0.Position.P4.Data=tilt=25.486313:pan=155.013062
root.PTZ.Preset.P0.Position.P4.Name=c
root.PTZ.Preset.P0.Position.P5.Data=tilt=-12.519455:pan=-133.764984
root.PTZ.Preset.P0.Position.P5.Name=d
root.PTZ.Preset.P0.Position.P6.Data=tilt=-60.977142:pan=-82.329605
root.PTZ.Preset.P0.Position.P6.Name=fb) Get the current PTZ co-ordinate data from camera.http://{{Camera_IPAddress}}/axis-cgi/com/ptz.cgi?query=positionResponse:pan=2.37
tilt=30.00Note: This will return round off value. Above value is for PTZ preset "a" from step 2. Using the PTZ co-ordinate data for different preset and current PTZ co-ordinate data, Preset location can be found.Using Overlay Modifiers:Modifier: "Preset Location: #P"Using Rule and Action:Using metadata from Axis camera: |
Beta Was this translation helpful? Give feedback.





Hi @OleksandrRiabchun ,
As per my experience there is no VAPIX API available to know the current preset position.
Alternate ways:
Using VAPIX:
a) Get the PTZ co-ordinate data from camera.
http://{{Camera_IPAddress}}/axis-cgi/param.cgi?action=list&group=PTZ.Preset.P0Response: