IPCam control over html cgi commands

Leo

Some IPCams, such as Foscam cameras, allow control over html including the ability to switch their IR light on and off using cgi commands:

IR-Off
http://xxx.xxx.xxx.xxx:####/decoder_control.cgi?command=94&user=username&pwd=password

IR-On
http://xxx.xxx.xxx.xxx:####/decoder_control.cgi?command=95&user=username&pwd=password

Where xxx is the local network IP address of the camera and #### the port assigned to it. username and password are also specific to each user.

Quite a few observatories house these cameras to monitor equipment. Would it be possible to add the ability to control IPCams and switch on/off their IR lights during a sequence (on whilst slewing / off when imaging)?
Thanks

Roberto

Hello Roberto,

you can use external script in Voyager to do this and you can put in DragScript. I think you use the first time slewing and off before start sequence.

Create a vbs file with this:

 Dim objRequest 
 Dim URL 
 Set objRequest = CreateObject(“Microsoft.XMLHTTP”)      
 URL = “http://xxx.xxx.xxx.xxx:####/decoder_control.cgi?command=94&user=username&pwd=password”    
 objRequest.open “POST”, URL , false      
 objRequest.Send      
 Set objRequest = Nothing 

You can try to create one for the ON e one for the OFF and just call like external escript
From onthefly you can use the action run external dragscript if you want to do manually

Leo

Leo

Thank you. As soon as I posted my request, I thought about the ability of Voyager to run scripts such as the above in between actions.
I hope the weather cooperates soon so I can try it more. Last night I managed to test the focusing routines and they are really fast and consistent.
Thanks again

Roberto

Ok Roberto. Thanks to you.

All the best
Leo