How to get BI to trigger preset of camera from external HTTP.....

sorka

Pulling my weight
Joined
Aug 9, 2015
Messages
366
Reaction score
198
I have 6 different kind of PTZ cameras. Over the years as I've added or replaced them, I've needed to learn their http cgi-bin commands to trigger camera setpoints so when things like doors, windows, mailbox, etc are opened or a motion sensor is triggered, I could move the cameras in view of those locations to those locations. For example, I have a Toshiba IK-WB11A with a 20x optical zoom. When my mailbox is opened, it zooms in so I can see the face of the person opening it and what they're putting in or out.

The down side is that I have either find the API online or use wireshark to reverse engineer it. Since BI already knows the preset/setpont APIs of all the cameras I have, I wanted a way to tell BI from an external app, like Homeseer to move a camera to a particular preset.

This may be doable through the json interface. I haven't even looked at that yet.

But for those issuing simple http commands from other programs, there is a way:

http://{ip address}:{port}/cam/{short camera name}/pos = {x + 7}​

Where x is the setpoint/preset of your camera. i.e to move to setpoint 1, pos = 8. This doesn't appear to be documented and it doesn't appear to have come up here in the forum via searching as a solution. I just guessed that perhaps the documented:

/cam/{cam-short-name}/pos=x Performs a PTZ command on the specified camera, where x= 0=left, 1=right, 2=up, 3=down, 4=home, 5=zoom in, 6=zoom out​

might have pos values beyond {1,2,3,4,5,6,7,100} that could be used to trigger setpoints and it appears to work :)
 
Last edited:

nbstl68

Getting comfortable
Joined
Dec 15, 2015
Messages
1,399
Reaction score
322
I don't even know what, "issuing simple http commands from other programs" means, but I see a lot of posts that talk about scripts and commands to control the camera and I'd like to learn more about it and its uses.
What other program is issuing the command for example and how\why?

Any suggested reading on this topic or is this more of a , you already need to know how to program, kind of thing?

I use BI and I'd love to be able to tell it to go from overview to zoom into the mailbox when motion is noticed there or some other trigger.
 
Last edited:

sorka

Pulling my weight
Joined
Aug 9, 2015
Messages
366
Reaction score
198
In my case, I'm using Homeseer but it's just using a vbs script to issue the http post or get. Many different scripting languages support this. For example, another simple way to do it is from the command line in linux using curl.
 
Top