This object is in archive! 

Http request to move an IPcamera To an open window with a sensor

urbi shared this question 10 years ago
Need Answer

Good morning everybody,

I'm working on an alarm system for my house.

I put shock sensors on each window and an IPcam in the middle if 1 shock sensor is activate I want to ask my IP cam to move to a saved position.

I want to know if someone know how to manage this?

My IP cam is a TENVIS JPT3815W (and if someone know how to make it working with zipabox first i'm waiting also answer to help me for the setting.)


thank's in advance.

Replies (7)

photo
1

I think you first need SDK for your IP camera, needed to know how to

move the camera by http.. usually something like

http://camera.ip/cgi-bin/ptz_page.cgi?command=xxxx

If no SDK available (but I think google is your friend :) ), you need a little reverse engineering of ip camera web interface.

Next

you need to develop a script (that you can store in a local web server,

or in google drive or in a web space) that, based on one or more

parameter, send the right commands to your ip camera.

In the script

you must define sensors and how the camera need to move to point to that

sensor... next you need to pass the sensor as parameter to the script.


A

little bit difficult to describe.. more simple to do..but programming

skills is required, I think there's no other simple way to do that.

photo
2

With foscam cams, you can save different positions.

For exemple

position 1 aiming to window 1

position 2 aiming to window 2

....


Then you cas use a local http request to go to position 1/2/3...


You don't even have to program a script.All you have to do is find if you can control your ipcam by http request.


If it is the case, then just set up rules like this:

  1. --------------------
  2. WHEN shock sensor 1 TRUE OR shock sensor 2 TRUE OR shock sensor 3 TRUE (and more if you have more sensors)
  3. -----
  4. IF shock sensor 1 TRUE
  5. HTTP REQUEST (put the url to set the position of the cam)
  6. -----
  7. IF shock sensor 2 TRUE
  8. HTTP REQUEST
  9. -----
  10. IF shock sensor 3 TRUE
  11. HTTP REQUEST
  12. -------------------------------

It should do the trickYou can even put a second HTTP REQUEST to take a snapshot and send it by mail for exampleHope it helps

photo
1

if the ipcam can save location, the tomas solution is perfect!

photo
1

Thanks everybody for your answer

My cam can save position.First I wanted to use the rules creator as thomas explained.I found the http request to move the camera but I'm' not really familiar with that.Did you have an example of an http request including the login ? and aslo wich kind of http request should I use (get, post..)? and the adress of the camera should be the internal IP adress or external?Thank's again

photo
1

Here are the links to the API doc :

http://apps.tenvis.com/Download/iprobot3/SDK_CGI.rar

http://apps.tenvis.com/Download/JPT3815W/common_use/TENVIS_SDK.zip


Use a local url. I would try: (set up the ip of your cam and verify which port is used by your ipcam but it seems to be 81 by default)


http://192.168.0.X:81/ptzctrl?username=admin&userpwd&act=callpsp¶m=X (put your user password and write down the number of your recorded position)Now take an example:You have 3 windows with 3 shock sensors.Shock sensor 1 is triggered.The ipcam will aim to position 1 automatically.You rule will look like this:

  1. --------------------
  2. WHEN shock sensor 1 TRUE OR shock sensor 2 TRUE OR shock sensor 3 TRUE (and more if you have more sensors)
  3. -----
  4. IF shock sensor 1 TRUE
  5. HTTP REQUEST
  6. -----
  7. IF shock sensor 2 TRUE
  8. HTTP REQUEST
  9. -----
  10. IF shock sensor 3 TRUE
  11. HTTP REQUEST
  12. -------------------------------

Set up HTTP REQUEST like this:In "method" field: GetIn "url" field: http://192.168.0.X:81/ptzctrl?username=admin&userpwd&act=callpsp¶m=X


You can also use the HTTP REQUEST to get a push notification on your smartphone.And I suppose that you can use a specific command with your cam in order to get a snapshot by mail when the command is triggered.You could then add this HTTP REQUEST in your rule and get a snapshot automatically when shock sensor is triggered.

photo
1

Thanks everybody for your help I found the way

the HTTP request is a bit different for this webcam:

http://192.168.x.xxx:xx/decoder_control.cgi?user=admin&pwd=xxxx&command=37

This camera (Tenvis JPT3815W) have 6 positions you should use the following command :

31 : preset 1

33 : preset 2

35 : preset 3

37 : preset 4

39 : preset 5

41 : preset 6

photo
1

I want to Ask if Somebody have problem with Http request? For me sometimes it works and sometimes not. Is It a zipato server problem?

Leave a Comment
 
Attach a file