mike_va 0 Posted September 14, 2011 I can set my Axis up to send itself a command for day / night for example, or set the shutter speed. Is there some way I could do this with Panasonic cameras like the 502? I'm imagining I would need some scheduling program on the computer - not sure how to go about doing this. Any advice appreciated. Share this post Link to post Share on other sites
NotoriousBRK 0 Posted September 14, 2011 If you had access to a linux box you could do it with cron (for scheduling) and either wget or curl (http://linux.about.com/od/commands/l/blcmdl1_curl.htm) for formatting/sending the http commands. Share this post Link to post Share on other sites
bike_rider 0 Posted September 14, 2011 That's weird I was just thinking about this topic over the weekend. The scheduling can almost certainly be done on most any PC platform, but it might be tricky getting the right commands sent. What's the exact model? I'll poke around on the internet for the user manual and see what I can come up with. On the Axis, where do the commands come from? Do they come from a management system that is running on a PC? Share this post Link to post Share on other sites
mike_va 0 Posted September 14, 2011 That's weird I was just thinking about this topic over the weekend. The scheduling can almost certainly be done on most any PC platform, but it might be tricky getting the right commands sent. What's the exact model? I'll poke around on the internet for the user manual and see what I can come up with. On the Axis, where do the commands come from? Do they come from a management system that is running on a PC? It runs on the camera, here's an example: http://www.axis.com/techsup/faq/index.php/index_axis.php?action=artikel&cat=0&id=115397&artlang=en&search=ir+cut+flter An example might look like http://192.168.1.96/axis-cgi/ param.cgi?action=update &ImageSource.I0.Sensor.MaxExposureTime=166827 http://192.168.1.96/axis-cgi/opticssetup.cgi?autofocus=perform The latter command is not intended to be used continuously. The camera I'm trying to get it to work on is the Panasonic WV-NP502. I'm using it for plate capture during the day at 1/250s but would like be slower at night. Share this post Link to post Share on other sites
rory 0 Posted September 14, 2011 (edited) Windows has Task scheduler, so can have that run any list of files like exe, cmd, vbs, etc Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
bike_rider 0 Posted September 14, 2011 Maybe. There are some Pany cameras that do allow direct control from a URL command, but it looks like it is all consumer level or older models. Check out this list http://panasonic.net/pcc/support/netwkcam/download/other.html. The manual for the 502 does not talk about these commands. It only talks about using the web server on the camera. You could try some of those commands to see if the camera responds to them, but again you might run into an authentication requirement. If you used a packet sniffer while using the web interface (like WireShark) you could probably figure out what the commands are. Then you would need a program to send them under windows scheduler, like Rory said. It isn't that hard to do if you can figure out what the commands should be. Share this post Link to post Share on other sites
thewireguys 3 Posted September 14, 2011 I was able to get Axis cameras to send commands to other Axis cameras..... example. Fixed camera sees motion then sends command to PTZ to move to different preset. So you might be able to have the Axis send a command to the Panasonic camera. Share this post Link to post Share on other sites
mike_va 0 Posted September 14, 2011 I was able to get Axis cameras to send commands to other Axis cameras..... example. Fixed camera sees motion then sends command to PTZ to move to different preset. So you might be able to have the Axis send a command to the Panasonic camera. Yes, but I'd like it centralized somewhere. Preferably the computer as it is quicker to play around. Share this post Link to post Share on other sites
mike_va 0 Posted September 14, 2011 Then you would need a program to send them under windows scheduler, like Rory said. It isn't that hard to do if you can figure out what the commands should be. The program is the part I don't know how to do. Share this post Link to post Share on other sites
rory 0 Posted September 14, 2011 (edited) Then you would need a program to send them under windows scheduler, like Rory said. It isn't that hard to do if you can figure out what the commands should be. The program is the part I don't know how to do. depends, might be as easy as command line program eg. .cmd Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
bike_rider 0 Posted September 14, 2011 Then you would need a program to send them under windows scheduler, like Rory said. It isn't that hard to do if you can figure out what the commands should be. The program is the part I don't know how to do. I like a challenge. If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. Share this post Link to post Share on other sites
mike_va 0 Posted September 14, 2011 I like a challenge. If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. Thanks, that would be great! It may take me a few days - as of tonight my backup computer (ZT systems quad core athlon) died (will not power on). A few days ago my main computer (Dell i7 quad core) also died (bad motherboard). I must have upset the computer gods somehow... Share this post Link to post Share on other sites
rory 0 Posted September 14, 2011 (edited) also if it has an activeX for IE, it might contain some commands in that, if so then can download that separately, stick it in a webpage on your desktop, save it as an HTA so the scheduler can run that, and in the HTA send the commands using client side VBScript. Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
bike_rider 0 Posted September 14, 2011 I like a challenge. If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. Thanks, that would be great! It may take me a few days - as of tonight my backup computer (ZT systems quad core athlon) died (will not power on). A few days ago my main computer (Dell i7 quad core) also died (bad motherboard). I must have upset the computer gods somehow... Oh brother, I have been there. "Keep calm and carry on." Share this post Link to post Share on other sites
mike_va 0 Posted September 16, 2011 If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. I was not able to find it on my own on the Panasonic site or with google but Panasonic support helped me out: http://panasonic.net/pss/security/library/developer.html then download "New CGI Command Supported Models for V1.03 document". http://192.168.0.10/cgi-bin/ and "image_adjust?shutter=1_250" or "image_adjust?shutter=1_30" I have a PC and a mac available. Share this post Link to post Share on other sites
Soundy 1 Posted September 16, 2011 Try this from Start->Run: "iexplore http://www.cctvforum.com" (without the quotes). Same should work using the Task Scheduler, and the appropriate URL for the camera. You should see if the camera itself supports cron scripts - I know the IQ cameras do: you write a little crontab file and then ftp it to the camera's storage, and the camera will execute it automatically. http://www.iqeye.com/spt/TechTips/V1001.pdf Share this post Link to post Share on other sites
bike_rider 0 Posted September 16, 2011 If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. I was not able to find it on my own on the Panasonic site or with google but Panasonic support helped me out: http://panasonic.net/pss/security/library/developer.html then download "New CGI Command Supported Models for V1.03 document". http://192.168.0.10/cgi-bin/ and "image_adjust?shutter=1_250" or "image_adjust?shutter=1_30" I have a PC and a mac available. Awesome. Have you actually tested these with your camera to make sure they work when you are not logged in? Which version of Windows? Share this post Link to post Share on other sites
rory 0 Posted September 16, 2011 (edited) If you can get the http commands to send (I'm not sure it can be done), I can get you a windows script file (or some solution) that can send them on command. As long as you have a PC you can leverage. I was not able to find it on my own on the Panasonic site or with google but Panasonic support helped me out: http://panasonic.net/pss/security/library/developer.html then download "New CGI Command Supported Models for V1.03 document". http://192.168.0.10/cgi-bin/ and "image_adjust?shutter=1_250" or "image_adjust?shutter=1_30" I have a PC and a mac available. Well a quick and dirty VBScript like this should do it - I dont know what kind of response codes the camera in question sends back but In this case im using 200 Okay response that it performed the action. In this example it sends a query to a webpage, and the webpage in question just updates a text file on the server with the time it was sent - just as a test. You would save this as a .VBS file, and remove the MsgBox line or comment it out for it to be silent. And change the sURL to your complete URL - this is a working example BTW, give it a try if you like. sURL = "http://bahamassecurity.com/test.asp?bright=up" sRet = SendCommand(sURL) MsgBox sRet, vbOkOnly Function SendCommand(pURL) Dim objHttp, Status On Error Resume Next Set objHttp = CreateObject("Microsoft.XMLHTTP") objHttp.Open "HEAD", pURL, False If Err = 0 Then objHttp.Send "" Status = objHttp.Status If Status <> 200 Then SendCommand = "RESPONSE ERROR - " & Status Else SendCommand = "Sent Ok" End If Else SendCommand = "Error!" & _ vbCrLf & Err.Description End If Set objHttp = Nothing End Function OR you can even make it a general script and use a CMD file to send your commands to it: SendCommand.vbs sURL = "http://bahamassecurity.com/test.asp?" & WScript.Arguments(0) sRet = SendCommand(sURL) MsgBox sRet, vbOkOnly Function SendCommand(pURL) Dim objHttp, Status On Error Resume Next Set objHttp = CreateObject("Microsoft.XMLHTTP") objHttp.Open "HEAD", pURL, False If Err = 0 Then objHttp.Send "" Status = objHttp.Status If Status <> 200 Then SendCommand = "RESPONSE ERROR - " & Status Else SendCommand = "Sent Ok" End If Else SendCommand = "Error!" & _ vbCrLf & Err.Description End If Set objHttp = Nothing End Function SendBrightUp.cmd @echo off echo SENDING BRIGHT UP TO CAMERA ... Start /b /wait SendCommand.vbs "bright=up" exit Here is the location of the test.txt file http://bahamassecurity.com/cache/test.txt And here is a list of common and not so common Response Codes. I left it out of the script in this case but it can easily be put in with one simple function 200 = OK 201 = CREATED 202 = ACCEPTED 203 = NON-AUTHORITATIVE INFORMATION 204 = NO CONTENT 205 = RESET CONTENT 206 = PARTIAL CONTENT 300 = MULTIPLE CHOICES 301 = MOVED PERMANENTLY 302 = FOUND 303 = SEE OTHER 304 = NOT MODIFIED 305 = USE PROXY 306 = UNUSED 307 = TEMPORARY REDIRECT 400 = BAD REQUEST 401 = NAUTHORIZED 402 = PAYMENT REQUIRED 403 = FORBIDDEN 404 = NOT FOUND 405 = METHOD NOT ALLOWED 406 = NOT ACCEPTABLE 407 = PROXY AUTHENTICATION REQUIRED 408 = REQUEST TIMEOUT 409 = CONFLICT 410 = GONE 411 = LENGTH REQUIRED 412 = PRECONDITION FAILED 413 = REQUEST ENTITY TOO LARGE 414 = REQUEST-URI TOO LONG 415 = UNSUPPORTED MEDIA TYPE 416 = REQUESTED RANGE NOT SATISFIABLE 417 = EXPECTATION FAILED 500 = INTERNAL SERVER ERROR 501 = NOT IMPLEMENTED 502 = BAD GATEWAY 503 = SERVICE UNAVAILABLE 504 = GATEWAY TIMEOUT 505 = HTTP VERSION NOT SUPPORTED 12000 = ERROR BASE 12001 = OUT OF HANDLES 12002 = TIMEOUT 12003 = EXTENDED ERROR 12004 = INTERNAL ERROR 12005 = INVALID URL 12006 = UNRECOGNIZED SCHEME 12007 = NAME NOT RESOLVED 12008 = PROTOCOL NOT FOUND 12009 = INVALID OPTION 12010 = BAD OPTION LENGTH 12011 = OPTION NOT SETTABLE 12012 = SHUTDOWN 12013 = INCORRECT USER NAME 12014 = INCORRECT PASSWORD 12015 = LOGIN FAILURE 12016 = INVALID OPERATION 12017 = OPERATION CANCELLED 12018 = INCORRECT HANDLE TYPE 12019 = INCORRECT HANDLE STATE 12020 = NOT PROXY REQUEST 12021 = REGISTRY VALUE NOT FOUND 12022 = BAD REGISTRY PARAMETER 12023 = NO DIRECT ACCESS 12024 = NO CONTEXT 12025 = NO CALLBACK 12026 = REQUEST PENDING 12027 = INCORRECT FORMAT 12028 = ITEM NOT FOUND 12029 = CANNOT CONNECT 12030 = CONNECTION ABORTED 12031 = CONNECTION RESET 12032 = FORCE RETRY 12033 = INVALID PROXY REQUEST 12034 = NEED UI 12036 = HANDLE EXISTS 12037 = SEC CERT DATE INVALID 12038 = SEC CERT CN INVALID 12039 = HTTP TO HTTPS ON REDIR 12040 = HTTPS TO HTTP ON REDIR 12041 = MIXED SECURITY 12042 = CHG POST IS NON SECURE 12043 = POST IS NON SECURE 12044 = CLIENT AUTH CERT NEEDED 12045 = INVALID CA 12046 = CLIENT AUTH NOT SETUP 12047 = ASYNC THREAD FAILED 12048 = REDIRECT SCHEME CHANGE 12049 = DIALOG PENDING 12050 = RETRY DIALOG 12052 = HTTPS HTTP SUBMIT REDIR 12053 = INSERT CDROM 12054 = FORTEZZA LOGIN NEEDED 12055 = SEC CERT ERRORS 12056 = SEC CERT NO REV 12057 = SEC CERT REV FAILED 12152 = ERROR HTTP INVALID SERVER RESPONSE 12157 = SECURITY CHANNEL ERROR 12158 = UNABLE TO CACHE FILE 12159 = TCPIP NOT INSTALLED 12163 = DISCONNECTED 12164 = SERVER UNREACHABLE 12165 = PROXY SERVER UNREACHABLE 12166 = BAD AUTO PROXY SCRIPT 12167 = UNABLE TO DOWNLOAD SCRIPT 12169 = SEC INVALID CERT 12170 = SEC CERT REVOKED Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
rory 0 Posted September 16, 2011 (edited) or in a webpage ... if its on the same server (wont work in your case but putting it out there anyway) using jQuery Ajax <html> <head> <title>Send Command</title> <script type="text/javascript" src="jquery-1.6.2.js"></script> </head> <body> <span id="response">Sending command ... please wait</span> <script language="Javascript" type="text/javascript"> var url = "http://192.168.0.10/cgi-bin/image_adjust" function sendcmd(cmd){ var jqxhr = $.ajax({ type: "HEAD", url: ""+url+"?"+cmd }) .success(function() { //alert("Sent Ok - "+jqxhr.status); document.getElementById("response").innerHTML = "Sent Ok - "+jqxhr.status; }) .error(function() { //alert("Send Error - "+jqxhr.status); document.getElementById("response").innerHTML = "Send Error - "+jqxhr.status; }) } $(window).load(function() { sendcmd("shutter=1_250"); }); </script> </body> </html> or just the basic IMG tag from a webpage located anywhere will send the request. Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
mike_va 0 Posted September 16, 2011 Thanks Rory. For example, if I save as a vbs and double click sURL = "http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250" sRet = SendCommand(sURL) MsgBox sRet, vbOkOnly Function SendCommand(pURL) Dim objHttp, Status On Error Resume Next Set objHttp = CreateObject("Microsoft.XMLHTTP") objHttp.Open "HEAD", pURL, False If Err = 0 Then objHttp.Send "" Status = objHttp.Status If Status <> 200 Then SendCommand = "RESPONSE ERROR - " & Status Else SendCommand = "Sent Ok" End If Else SendCommand = "Error!" & _ vbCrLf & Err.Description End If Set objHttp = Nothing End Function it returns -500 putting "http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250" in the browser tells me I'm opening root, then opens part of the shutter speed but does not seem to change it. Share this post Link to post Share on other sites
rory 0 Posted September 16, 2011 (edited) or using IE as Soundy mentioned. @echo off echo SENDING COMMAND TO CAMERA ... Start /b /wait iem.lnk "http://192.168.0.10/cgi-bin/image_adjust?shutter=1_250" PING 1.1.1.1 -n 2 -w 1000 >NUL taskkill /f /im iexplore.exe exit 1-create a shortcut to IE, set the run type to minimized, name it "iem" 2-create a new text file and paste the above code into it, save it as a .CMD file. 3-put both in the same path and run the .CMD file to send the command. It starts IE minimized and sends it to that URL. As IE doesnt exit after loading we run a short 2 second delay then force terminate it. The /wait is not really needed but I left it in. You may have to increase the delay depending on how long your camera takes to respond. Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
rory 0 Posted September 16, 2011 (edited) putting "http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250" in the browser tells me I'm opening root, then opens part of the shutter speed but does not seem to change it. Ok so it needs to send a user and password? try this, replace the line objHttp.Open "HEAD", pURL, False with objHttp.Open "HEAD", pURL, False, "root", "password" thats where root is the username and password is the password so it would be sURL = "http://192.168.1.12/cgi-bin/image_adjust?shutter=1_250" sRet = SendCommand(sURL) MsgBox sRet, vbOkOnly Function SendCommand(pURL) Dim objHttp, Status On Error Resume Next Set objHttp = CreateObject("Microsoft.XMLHTTP") objHttp.Open "HEAD", pURL, False, "root", "password" If Err = 0 Then objHttp.Send "" Status = objHttp.Status If Status <> 200 Then SendCommand = "RESPONSE ERROR - " & Status Else SendCommand = "Sent Ok" End If Else SendCommand = "Error!" & _ vbCrLf & Err.Description End If Set objHttp = Nothing End Function If that doesnt work try changing "HEAD" to "GET" Maybe that command doesnt work though. Try another one like bright=up I cant find shutter= in that PDF Edited November 4, 2011 by Guest Share this post Link to post Share on other sites
mike_va 0 Posted September 16, 2011 Try this from Start->Run: "iexplore http://www.cctvforum.com" (without the quotes). Same should work using the Task Scheduler, and the appropriate URL for the camera. Perfect, this appears to work! Pasted this in notepad iexplore http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250 then saved with a cmd extension. Double clicking it changed the shutter speed. Should be able to use task scheduler. Thanks to all! Share this post Link to post Share on other sites
mike_va 0 Posted September 16, 2011 I cant find shutter= in that PDF It's in the "CGI Common Ref Panasonic_Network_camera ver1.25" pdf as one of the three files in the zip. Share this post Link to post Share on other sites
rory 0 Posted September 16, 2011 (edited) Perfect, this appears to work! Pasted this in notepad iexplore http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250 then saved with a cmd extension. Double clicking it changed the shutter speed. Should be able to use task scheduler. Thanks to all! @echo off echo SENDING COMMAND TO CAMERA ... Start /b /wait iexplore "http://root:password@192.168.1.12/cgi-bin/image_adjust?shutter=1_250" PING 1.1.1.1 -n 2 -w 1000 >NUL taskkill /f /im iexplore.exe exit Edited November 4, 2011 by Guest Share this post Link to post Share on other sites