Page 1 of 1

Example PTZ control script with start/stop type events

Posted: Sat May 17, 2014 12:43 pm
by TheKorn
So I'm getting reasonable at hacking zm ptz control scripts to do what I want so far. But I'm working on a new type of camera (HooToo HT-IP006N) that doesn't send singular button events but rather start/stop events and don't have anything to model it off of.

What I mean is, let's say I hit the Pan Up button. The web interface then executes

Code: Select all

http://(blahblah)/decoder_control.cgi?command=0
and the camera pans up and continues going up until I release the button. At that point the web interface executes

Code: Select all

http://(blahblah)/decoder_control.cgi?command=1
at which point the camera stops panning up. Each direction has its own unique start/stop combo, along with zoom in and zoom out having their own unique start/stop combos.

Anyone have an example script they know of that works in a similar way that I can hack up and re-purpose? I suppose I could send a start immediately followed by a stop, but am wondering out loud if there's a better way or (even better!) if someone has already invented this wheel.

Thanks in advance!

Re: Example PTZ control script with start/stop type events

Posted: Tue May 20, 2014 2:14 am
by TheKorn
Anybody?

Re: Example PTZ control script with start/stop type events

Posted: Tue May 20, 2014 1:17 pm
by jHeron
I started looking into the same thing for my easyN cam but have not had time lately to follow up with it...
Have a look at the FI8608W_Y2k.pm script that's included with the 1.27RPM, I believe thats what your looking for. He uses an autoStop function that operates on a timer, the timer gets set based on how far up on the UI arrow you click.
At least thats how I remember it but its been a couple weeks :)
Let us know how you make out!
Cheers,
Jon

Re: Example PTZ control script with start/stop type events

Posted: Tue May 20, 2014 2:42 pm
by TheKorn
Ahhh, thanks for the point, I'll check it out!