PTZ control 404 #764
-
I'm trying to control a PTZ camera but I always get a 404 status code return. here's my code: import requests
from requests.auth import HTTPDigestAuth
import urllib3
urllib3.disable-warnings(utllib3.exceptions.InsecureRequestWarning)
# data of camera that I'm using
ip_addres = '192.168.1.15'
username = XXXXXX
password = XXXXXX
auth = HTTPDigestAuth(username, password)
url = 'http://127.0.0.1/axis-cgi/ptz.cgi?rpan=10&camera=1'
response = requests.post(url, auth=auth, verify=False)
print(response.status_code) I know the ip adress of the server is wrong. I already tried the ip address of the network adapter on which the camera is connected to, but no luck. I also have an extra question: how do you know what camera number to use when you have multiple camera's connected to your device? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
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 @roomsjesse , You can find the VAPIX API details here: PTZ control: Control the pan, tilt, and zoom behavior of a PTZ unit. |
Beta Was this translation helpful? Give feedback.
Ya correct 😄 the method you called is POST and PTZ API only support GET call.
Please try this sample and check if the PTZ operation works for you.