How to make one camera trigger cause another camera to go to preset

Joined
Jan 8, 2018
Messages
20
Reaction score
2
After long searches I found one method but no matter what I do I cannot make it work...

I’m basically trying to use a stationary cameras motion trigger to cause another PTZ to move to a designated preset (the area the stationary camera is looking at obviously)

The method I found was with the web server option on the trigger camera and a string of HTML code. The thread was a little old and not sure if this is still even the correct method. Any help would be much abliged!

Josh
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
This method is working for me. I'm using "admin:password@ipaddress/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0set(1)"

In the example below the triggered camera moves another PTZ to preset 1. The trigger reset moves it back to preset 5. The triggers are scheduled based.

web_alert.PNG
 
Last edited:

lgRich

Young grasshopper
Joined
Mar 9, 2014
Messages
84
Reaction score
20
Location
Québec Canada
After long searches I found one method but no matter what I do I cannot make it work...

I’m basically trying to use a stationary cameras motion trigger to cause another PTZ to move to a designated preset (the area the stationary camera is looking at obviously)

The method I found was with the web server option on the trigger camera and a string of HTML code. The thread was a little old and not sure if this is still even the correct method. Any help would be much abliged!

Josh
Take a look at this tread:

https://www.ipcamtalk.com/showthread.php/9327-Motion-detection-with-a-ptz?p=83447#post83447
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
This method is working for me. I'm using "admin:password@ipaddress/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0set(1)"

In the example below the triggered camera moves another PTZ to preset 1. The trigger reset moves it back to preset 5. The triggers are schedule based.

View attachment 25421

Cam IP or system IP? Also where are you designating which cam receives the move command... aaand also, do you just input any admin credentials in there or does it have to be default admin? I think the emoji messed your code formatting up a little, haha. Sorry for the questions... I’m just a baby over here, lol!
 
Last edited:

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
It's the cam's IP. I have my front door cam triggering my driveway cam to a specific preset. I'm using the camera credentials in the string and yes, the emoji messed up the code. It should be user colon password (with no spaces).

Note: Using a : followed by the letter p creates the emoji on this forum and I couldn't figure out how to get around it.

Alert.PNG
 
Last edited:
Joined
Jan 8, 2018
Messages
20
Reaction score
2
Awesome, thanks. I will give it another try when I get back to the server and give an update.

Thanks again!
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
Still having some trouble. Do you have to put the cameras port in with the IP? Couldn’t see why you would but never know... I have inputted the code strings into the stationary cameras alert properties. Do I have to do anything to the PTZ? The IP and credentials seen here in the code string is for the PTZ, again being applied to stationary cams alert properties. here’s what my code string looks like,
 

Attachments

Last edited:
Joined
Jan 8, 2018
Messages
20
Reaction score
2
Also, here is my find/inspect, if it helps... is it possible my camera doesn’t support web commands?

Opening 192.168.0.10 port 80...
HTTP Get / request...
OK
ONVIF GetSystemDateAndTime
HTTP 0
Opening 192.168.0.10 port 8899...
ONVIF GetSystemDateAndTime
2018-01-09T21:38:58.000Z
Requesting device information...
Manufacturer: H264
Model: N51820L
FirmwareVersion: V4.02.R11.A5901906.10012.230100..ONVIF 2.41
GetCapabilities...
Querying services
Has Imaging services: /onvif/imaging
Has media services: /onvif/Media
Has RTP_RTSP_TCP, requesting profiles
first profile is 000
first source is 000
requesting URI for profile 000
RTSP URI: xxxxxxchannel=1_stream=0.sdp?real_stream
Has Event services: /onvif/Events
Has WSPullPointSupport
RelayOutputs: 0
InputConnectors: 0
Has PTZ service: /onvif/PTZ
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
Still having some trouble. Do you have to put the cameras port in with the IP? Couldn’t see why you would but never know... I have inputted the code strings into the stationary cameras alert properties. Do I have to do anything to the PTZ? The IP and credentials seen here in the code string is for the PTZ, again being applied to stationary cams alert properties. here’s what my code string looks like,
You don't need a port for the PTZ camera, but you do need to predefine the presets in the PTZ UI.
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
You don't need a port for the PTZ camera, but you do need to predefine the presets in the PTZ UI.
I did do that, it’s on patrol presets 1-5, and I’m just trying to get the stationary trigger camera (Cam2) to move PTZ (Cam3) to preset 2. It’s not a dahua or anything, it’s a sunba, that’s why I was wondering if this just works on all ptzs. Does the string look right? The PTZ cam is local ip 192.168.0.10.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,525
I did do that, it’s on patrol presets 1-5, and I’m just trying to get the stationary trigger camera (Cam2) to move PTZ (Cam3) to preset 2. It’s not a dahua or anything, it’s a sunba, that’s why I was wondering if this just works on all ptzs. Does the string look right? The PTZ cam is local ip 192.168.0.10.
The url @Vettester used would be camera brand specific. I don't use blue iris. I imagine there are ways to do it using execute a program or script. Yep, #3 above links to a method that does this.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
The string looks correct assuming the login name for your camera UI is admin. You should be able to test this by using the string in a browser address bar. Use http:// followed by the string.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,525
The string looks correct assuming the login name for your camera UI is admin. You should be able to test this by using the string in a browser address bar. Use http:// followed by the string.
Are you passing http commands to blue iris from blue iris? If that's the case, sorry I didn't catch that before.
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
The url @Vettester used would be camera brand specific. I don't use blue iris. I imagine there are ways to do it using execute a program or script. Yep, #3 above links to a method that does this.
Thanks for the help, I was leaning that way already. In fact I searched to the point I hit a road block trying to find the .bat scripts and exactly how to apply it in the execute properties. The only link found was to an old gone cam it site.
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
Are you passing http commands to blue iris from blue iris? If that's the case, sorry I didn't catch that before.
I’d like to do iris to iris commands like that but since this string uses camera IP and credentials I assumed it was direct to the camera. I also tried applying preset location in both BI and camera UI... no dice

Script does seem to be the way, just can’t find what I need.
 

jaycanter

Getting the hang of it
Joined
Mar 1, 2015
Messages
124
Reaction score
33
This is what i use for my cams -----192.168.1.xx:xx/cam/ptz1/preset=4

I don't have to use user names or passwords since this is just telling BI to use preset in BI. You have to use the short name of the cam ex-ptz1

Sorry if this has been covered but looks like your trying to use http commands which i couldn't get to work.
 

oldman

n3wb
Joined
Nov 22, 2017
Messages
27
Reaction score
13
Here is what I have been using that has worked great... (pretty similar to Vettester' method)

Select the camera in BI that will cause the trigger...
Bring up the properties for that camera...
Click on the Alerts tab...
select which profile or profiles this will work under...
Under "Actions" select 'Request from a web service'
Press "Configure" ...
In the "When Triggered" text box enter the following:
http://192.168.1.35:10028/admin?&user=admin&pw=password&camera=Greenhouse&preset=4

substitute the IP address and Port for your IP and Port for your Blue Iris server
change the user specification, admin in this case to a valid user name on your BI system
Change the pw specification to the valid password
Supply the short camera name that you want the preset to occur on (This case it is Greenhouse)
change the preset value to a defined preset in your camera (i.e. the short name you provided above)

In this case you are using BI's webserver as the web service. Just make sure "Enable the HTTP web server on port: " is checked.

All of the http commands for BI are documented at the end of the help section for the "Web server"
In this case the help file reads:
/admin?camera=x&preset=x Enable or disable camera x (short name)

Good luck !
 
Joined
Jan 8, 2018
Messages
20
Reaction score
2
Thanks so much for your reply... I’ve tried this, and still no luck... I’m sure I’m doing something wrong. I put the string into the stationary (Cam2) alert web service properties. And Cam3 in the string is the one I want to move to preset 2. IP, port and credentials are all for blue iris server

I’ve attached pictures of the string as I have it. Sorry to burden
 

Attachments

Last edited:

lgRich

Young grasshopper
Joined
Mar 9, 2014
Messages
84
Reaction score
20
Location
Québec Canada
Have you tried the solution I have proposed in POST #3... This work very well into BI.

Unzip the file BiCommand1.1 into your root.

upload_2018-1-10_18-50-12.png


upload_2018-1-10_18-47-51.png
 

Attachments

Top