Config file notes:
For now all configurations are done in the file EasyPTZConfigs.txt that lives in the same directory as the main executable. Edit it to define up to 10 cameras with the syntax:
[camera1] camera_address = 192.168.0.50 camera_username = whatever camera_password = whatever camera_port_http = 80 camera_port_rtsp = 554 camera_substream = 0 # remap some buttons? button5 = preset1 button6 = tour1 # how many presets? (Used by random preset button) number_of_presets = 10
Note the line "button5 = preset1", which makes it so pressing the 5 button on the GUI opens the camera's preset 1. Or it could be "button5 = tour1", which would start the camera's tour 1. If not redefined like that it would just open the camera's preset 5.
And the line "number_of_presets = 10" is used by the "random preset" button (the "R" button). Since that's 10 it'll choose a random preset between 1 and 10. If omitted it assumes 30.
If you have a second camera you'd add the section:
[camera2] camera_address = 192.168.0.51 camera_username = whatever camera_password = whatever camera_port_http = 80 camera_port_rtsp = 554 camera_substream = 0
Also note that at the top of the config file are some variables that let you hide the PTZ buttons and some other things. You can also hide PTZ buttons for any camera by putting those values in that camera's section. For example put "show_ptz_buttons=no" under camera2 to hide the PTZ buttons for that camera.
Here's the full list of commands for each button, showing how to to go to specific presets, tours, scans, patterns or cameras:
button2 = preset1 button3 = tour1 button4 = pattern1 button5 = scan1 button6 = customtour:interval=4, loops=1, preset1, preset2, preset3, preset4 button15 = camera2
You define your presets, tours, patterns and scans in the Dahua camera interface. If left undefined then button 5 opens preset 5, etc.
You can also open other cameras, videos or even photos by defining a camera like this:
[camera3] camera_force_url = http://gizmoware.net/tides/chart/graphics/boathouse-slideshow.png
That opens a tide chart for the place in the screenshot above, but it could be the URL of any type of camera.
And note that if you're using a joystick, the joystick buttons do whatever that GUI button does. So joystick button 5 does whatever GUI button 5 does, etc.
And you can define buttons for each camera, or put the definition at top in the "[general]" section and it applies for all cameras. Useful for setting a button to switch between cameras.
And that "customtour" is experimental: the "interval" is the time it'll show each preset, and the "loops" is how many times it'll do it.
And there's *some* support for non Dahua cameras by using the "camera_force_url" value in the config file. Put that param in the config file under a camera with the full URL of the camera stream and it'll play that camera with no PTZ controls. Can also use it to display an image. Experimental.