I run cameras remotely, since i'm not running RS232, right now I have no way to power off the cameras so they run indefinitely. It would be nice to be able to power them off remotely.
The cameras, using the latest firmware, should offer you the ability to place the device into a standby mode and wake them up from that standby mode using the PTZOptics VISCA over IP commands as displayed below.
CAM_Power ON: 81 01 04 00 02 FF
CAM_Power OFF: 81 01 04 00 03 FF
If your camera is not responding to these commands, or is providing a syntax error, it likely requires an update to the firmware to gain this capability.
New firmware for your camera can be acquired at the following resource location... PTZOptics Firmware Finder https://ptzoptics.com/firmware-finder/
Just to note this command enables the ability to remotely place the camera into Standby Mode and then wake it up from standby... it does not allow you to fully "turn off" the camera.
This limitation is imposed because if the camera was fully powered off there would be no way to listen for a wake up command.
If you are looking to disable all power consumption by the device it would require use of remotely manageable PoE ports or the use of an IP controllable power strip depending on your setup.
If there is anything else we can assist with please don't hesitate to come back.
Thanks, the standby method is sufficient.
Very glad to hear that.
If you ever have other questions please don't hesitate to come back and ask.
Hope you have a wonderful rest of your day and thanks for using our cameras.
I was wondering the best way to send commands to the camera? I'm fairly new to visca over IP. Any tips or tricks would be greatly appreciated!
So you have a few options for "remote" control of the camera using either PTZOptics VISCA over IP or HTTP-CGI commands.
I'll do my best to provide some insight on easy ways to test / implement control of these options.
PTZOptics HTTP-CGI Commands - Reference Document: https://ptzoptics.com/wp-content/uploads/2019/10/PTZOptics-HTTP-CGI-Commands-rev-1.3-9-19.pdf
The HTTP-CGI Commands are likely the simplest form of control using simple POST & GET Commands.
In the beginning you can issue these commands by simply entering the strings into the URL bar on any modern web browser for execution.
Please note that each of the commands features variables such as IP Address, Mode, Values, etc... that must be entered for proper execution of the command
Example for "Preset Recall"
Here is the provided, with variables, preset recall command... http://[camera ip]/cgi-bin/ptzctrl.cgi?ptzcmd&[action]&[position number]
So in this example we will use a camera with the IP address of 192.168.100.88 and we will recall preset 3
The final command would look as follows... http://192.168.100.88/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&3
If executed in a web browser it would tell our camera at 192.168.100.88 to move to Preset 3
Once you get more advanced these commands can easily be built into a customized web interface for operation.
Note: The HTTP-CGI Command set is limited in comparison to the capabilities offered by PTZOptics VISCA / VISCA over IP
PTZOptics VISCA over IP - Reference Document: https://ptzoptics.com/wp-content/uploads/2019/10/PTZOptics-VISCA-over-IP-Commands-Rev1_1.1-10-19.pdf
The PTZOptics VISCA over IP Commands offer substantially more capabilities than the more limited HTTP-CGI commands.
The PTZOptics VISCA over IP Commands can be implemented into most modern coding from C, C#, C++, Python and more depending on the goal of your project.
Note: The PTZOptics VISCA over IP commands can be issued as TCP (Port 5678) or UDP (Port 1259) to the camera and are always issued as HEX.
Please be aware of potential DEC to HEX and HEX to DEC translations that need to be made when building your commands
For the purposes of this introduction I will focus on using Packet Sender and simple Python Scripts for getting started playing with these PTZOptics VISCA over IP commands.
Packet Sender & PTZOptics VISCA over IP
Packet Sender is a free application that you can utilize to execute HEX commands via TCP or UDP to the cameras.
Packet Sender Download: https://packetsender.com/download#show (Note: Donations are optional)
Once installed you can connect PacketSender to the cloud to easily import our current PTZOptics VISCA over IP Command Library
URL to use for importing: https://cloud.packetsender.com/ptzoptics/2019-03-28_PTZOptics
Once imported you can easily search the list of commands using the command titles as referenced in the PTZOptics VISCA over IP Commands document.
Note: The command library comes using the default camera IP of 192.168.100.88 for your purposes you may need to adjust this if your camera is at a different IP
At this point you should be able to send commands and inquiries to the camera using Packet Sender for testing of commands and simple operation.
Python Scripts & PTZOptics VISCA over IP
Once you've become somewhat familiar with working on the PTZOptics VISCA over IP commands using Packet Sender you could begin exploring simple Python Scripts that can execute these same HEX commands.
In the attached Python Script example I will showcase how to send a STANDBY command to a camera at 192.168.100.88, via UDP, then wait five (5) minutes and finally issue a WAKEUP command.
One of the nice things about the Python Scripts, and depending on your end goal, these can be scheduled to be executed using Task Scheduler, in Windows, or Automater, for Mac OS.
If you encounter any issues after attempting any of the above suggestions please let us know and we'll be happy to try and support your needs to the best of our abilities.
In addition if a little more information on any subject mentioned above would be helpful please don't hesitate to ask.
Good luck and happy programming!
Matthew this is amazing! It's all super useful to me so thank you very much. I just tested the packet sender and it works perfectly. You're one of the reasons I love PTZ Optics!
And great customers like you are why I love being here at PTZOptics :-)
I am very happy to hear that you were able to get up and running so quickly using the information I provided.
As you dive into the world of PTZOptics camera control if more questions arise please don't hesitate to come back and ask away.
P.S. I have attached a little excel spreadsheet file for you... it's a small collection of tools and references I use when testing / building third-party control options. I hope it serves you as well as it serves me.
Is it possible to edit the camera's web interface to add a simple sleep on/off toggle?
Just wondering if this is something available to me that I can write.
Unfortunately there is no "easy" / long term way to add anything to the actual WebUI of the camera.
If running an internal, LAN only, website to serve these functions would suffice in lieu of being directly on the camera I could suggest the following super simple web server.
MiniWEB HTTP Server - https://sourceforge.net/projects/miniweb/
A simple lightweight HTTP server solution for Windows OS.
If I can be of any additional assistance in supporting this endeavor just let me know and I am happy to offer any ideas I have.
I hope this message finds you having a great day.