PTZOptics Camera

Has anyone written a plugin (or in any way) connected to a PTZOptics camera. I can connect the camera via IP to get the feed but would like to control it also.

Thanks in advance.

Use Node-RED : and the HR mqtt plug-in to do that…
The buttons you create send/publish the mqtt messages to Node-RED

Thanks Eman. As I was looking up more info on the solution you suggested I found some documentation that describes how I can just make HTTP calls to control the camera directly. Link here for reference.

While I’ve got this to work with one camera (and a hardcoded IP), I’m having a hard time figuring out how to make the IP a variable that changes based on the camera (tile) selected.

Some context. I have two IP cameras setup and then a plugin with 5 devices (one for each direction and home). Each button has two variables I’ve added, IPAddress and HTTPCommand. On the IPCameraDetails page I have the buttons placed. The HTTPCommand is constant for the button (left is left, right is right, etc.) but I’m trying to set the IP address to be specific to the camera I’m on the details page for.

The code above works in that when the left buttons is pressed, the HTTPCommand value is “left” which is sent as the action in the URL to the camera and the panning begins. When the button is released, the HTTPCommand “ptzstop” is sent and the camera stops moving. All perfect. Now I’m trying to replace the hardcoded IP address with the IP of the specific camera I’m viewing but I’ve hit a wall in two ways:

  • can’t seem to set the button’s IPAddress variable to the actual IP address of the camera…I tried a few things like creating a VirtualDeviceVariable and setting it to the camera stream ID (which I set as the IP), or setting the button variable to the device.ID, but no luck.
  • In the meantime I’ve tried to just hard code the IP for a camera in the “IPAddress” variable on the button and I’m not able to get it. I’ve tried different variations of the case logic but again, no luck.

Any help in getting the IP of the camera to get set, somewhere, so that I can recall it along with the proper HTTPCommand tied to the button?

Thanks in advance!

Hi George, did you finally get this working, what make of pan tilt and zoom camera were you using and will this work for any IP pan tilt zoom camera?
Thanks, Colin

Hi, I was able to get it working but probably not in the cleanest way. Every time the button is pushed I get the IP and call the specific pan/tilt/zoom URL that corresponds to the function. It works.

I’m using a couple variations - PTZ Optics 30x SDI and the newer version of that same camera.

@Eman, could you please provide a bit more detail on how you are using Node-Red PTZ optics to control your IP cams? I use Node-Red and MQTT, and have installed the “single” PTZ-optics node, but I am having trouble figuring out how to send a command to the node. Also, I don’t see a way to enter “user” and “password” to gain access to the camera.


I use these nodes for my ip cameras and they work well. The author is very helpful but very busy to ever finish them. Regardless they work well in the beta state.
Follow all the documentation and you won’t go wrong.