IP Camera PTZ Control

266 views
Skip to first unread message

Jamie Owst

unread,
Jul 21, 2014, 4:05:37 AM7/21/14
to comman...@googlegroups.com
Hi, i have  currently got a IP camera video stream working on my iPad mini and would like to control it i understand i have to use HTTP commands to do so but how do i go about implementing them in my GUI?

here is what the camera manufactuer (Tenvis) state in there documentation what they state CGI URLs

PTZ Control

/ptzctrl?[username=xxx&userpswd=yyy&]act=action&param=parameter

action

parameter

Remark

left

speed(1~64)

Pan left

right

speed

Pan right

up

speed

Tilt up

down

speed

Tilt down

callpsp

Number of pre-set point

Call the preset point

stop

-

Stop

 Example: http://192.168.0.233:8001/ptzctrl?act=left&para=32 

i have tired just putting /ptzctrl?act=left&para=32 as the command value in a HTTP client system but it didn't work. 

any help will be appreciated.

thanks, Jamie 


GUI designer version v2.7.1.124

iViewer 4 version v4.0.303 build 303 (with full License)

Barry Gordon

unread,
Jul 21, 2014, 7:30:23 AM7/21/14
to comman...@googlegroups.com
Look up CF.request in the CommandFusion Wiki or in the scripting documentation


Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tulio

unread,
Jul 21, 2014, 10:09:35 AM7/21/14
to comman...@googlegroups.com
It could be authentication problem. Try to put username and password inside command

Terence

unread,
Jul 21, 2014, 11:21:45 AM7/21/14
to comman...@googlegroups.com
The command value should work if there's no need for authentication. Try adding a \x0D\x0A at the end of your command. Double check that the port settings is 8001 and not port 80.

Alternatively, like Barry said, you can use the CF.request JS API to send a simple HTTP command : http://www.commandfusion.com/docs/scripting/net.html#cF.request
So a sample of the command will look something like this :

CF.request("http://192.168.0.233:8001/ptzctrl?act=left&para=32", function (status, headers, body) {
            if (status == 200) {                                                            // extract information from body here
                CF.log("Request succeeded (HTTP 200 OK). Body received: " + body);
                          } else {                                                                        // an error occurred, display the returned status code
                CF.log("Error: returned status code " + status);
            }
        });

Jamie Owst

unread,
Jul 22, 2014, 3:26:31 AM7/22/14
to comman...@googlegroups.com
Ok thank you for the help will try and see if the authentication works 

Jamie Owst

unread,
Jul 22, 2014, 4:19:17 AM7/22/14
to comman...@googlegroups.com
Sorry for the stupid question, but how do i call the CF.Request using a button when i try to do so in the debugger its says there is an exception and there is a token missing 

Barry Gordon

unread,
Jul 22, 2014, 7:07:54 AM7/22/14
to comman...@googlegroups.com
It would be much easier to help you if you posted what you have done and exactly what the debugger says, I am assuming Javascript is new for you.

Sent from my iPad

On Jul 22, 2014, at 4:19 AM, Jamie Owst <jamie...@gmail.com> wrote:

Sorry for the stupid question, but how do i call the CF.Request using a button when i try to do so in the debugger its says there is an exception and there is a token missing 

--
Reply all
Reply to author
Forward
0 new messages