# Change ptz camera preset position through homey

**URL:** <https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723>\
**Category:** Questions & Help\
**Created:** [January 22, 2019, 8:15pm UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723 "2019-01-22T20:15:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_271](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_271/32/5014_2.png) [@Frank\_271](https://community.homey.app/u/Frank_271)\
**Post date:** [January 22, 2019, 8:15pm UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/1 "2019-01-22T20:15:12Z")

</div>

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](http://username):password@ip\_address:80/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0

---

<div class="post-metadata">

**Author:** ![Frank\_271](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_271/32/5014_2.png) [@Frank\_271](https://community.homey.app/u/Frank_271)\
**Post date:** [January 27, 2019, 6:55am UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/2 "2019-01-27T06:55:52Z")

</div>

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

Thanks in advance

---

<div class="post-metadata">

**Author:** ![bvdbos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bvdbos/32/2352_2.png) [@bvdbos](https://community.homey.app/u/bvdbos)\
**Post date:** [January 27, 2019, 7:17am UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/3 "2019-01-27T07:17:39Z")

</div>

I think you should try to find another way of calling, the use of [http://user:password@url/](http://user:password@url/) has been decrepated for 14 years:  
[https://tools.ietf.org/html/rfc3986#section-3.2.1](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…

---

<div class="post-metadata">

**Author:** ![Frank\_271](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_271/32/5014_2.png) [@Frank\_271](https://community.homey.app/u/Frank_271)\
**Post date:** [January 27, 2019, 9:07am UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/4 "2019-01-27T09:07:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bvdbos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bvdbos/32/2352_2.png) [@bvdbos](https://community.homey.app/u/bvdbos)\
**Post date:** [January 27, 2019, 9:20am UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/5 "2019-01-27T09:20:27Z")

</div>

> [@Frank\_271](#):
>
> dahua ptz camera

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

---

<div class="post-metadata">

**Author:** ![Frank\_271](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_271/32/5014_2.png) [@Frank\_271](https://community.homey.app/u/Frank_271)\
**Post date:** [January 27, 2019, 11:36am UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/6 "2019-01-27T11:36:58Z")

</div>

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.

> **[Dahua camera presets how to?](https://community.home-assistant.io/t/dahua-camera-presets-how-to/26781/4)**
>
> Thanks Johnnyletrois, I just found your other post with the digest included in the curl command. If I run those from my Windows command prompt they work, so thats another step closer 🙂 I really have no idea where i should put the curl command and...

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

---

<div class="post-metadata">

**Author:** ![Frickadillus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frickadillus/32/69500_2.png) [@Frickadillus](https://community.homey.app/u/Frickadillus)\
**Post date:** [February 1, 2023, 9:55pm UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/7 "2023-02-01T21:55:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ManuSwe](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/manuswe/32/56617_2.png) [@ManuSwe](https://community.homey.app/u/ManuSwe)\
**Post date:** [August 21, 2023, 8:28pm UTC](https://community.homey.app/t/change-ptz-camera-preset-position-through-homey/7723/8 "2023-08-21T20:28:39Z")

</div>

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](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](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/4/f409c831d4d727f2a79d7dd5e7270d382f694e11.png)
