Change ptz camera preset position through homey

I have a dahua ptz cameras installed at the front of my house and I want to use fibaro motion sensors to change the camera to preset positions when motion is detected in certain places. I am not very good with programming and I cant get this to work.
If I enter the below link in a web browser without the user name and pasword I can get the camera to change position after i manually type the username and password. But the link with pasword and username included does not.
Is there a homey app available, or does anybody have a sugestion that can help me in the good direction.

http://username:password@ip_address:80/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0

Does anybody have an idea how to help me with this please?

Thanks in advance

I think you should try to find another way of calling, the use of http://user:password@url/ has been decrepated for 14 years:
https://tools.ietf.org/html/rfc3986#section-3.2.1
It’s unsafe for multiple reasons like sending a password in the url and easy of misleading url’s…

Thank you very much for your reply bvdbos. So in general this means that it is going to be impossible what I want to do.

well, are you sure this is the only way to control the camera?

I have not very much experience in programming but that is what I found on the internet.
This was actually on the home assistant forum. But it seems that there is a little bit more programming necessary, And I am not sure if the Homey has the same functionality as the home assistant.

I have also tried to use the HTTP request flow cards app but this is maybe not the right way.

ftp://ftp.wintel.fi/drivers/dahua/SDK-HTTP_ohjelmointi/DAHUA_IPC_HTTP_API_V1.00x.pdf

Hey Frank,

Did you find a way to accomplish this? I am looking for exactly the same thing. To change PTZ position of my Hikvision camera to a fixed position.

Hi, it is quite simple to move the Camera to the position if you have this kind of instruction:
http://username/:password@ip_address:80/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0
Just make a Variable with all the info inside and then make a HTTP GET to that Variable.

image

1 Like