[Resolved] PTZ - How to Control Auto Tracking On/OFF With a Schedule and Presets

Alaska Country

Getting comfortable
Joined
Jun 10, 2021
Messages
487
Reaction score
708
Location
Alaska
Using a Dahua SD5A425XA-HNR PTZ with auto tracking. Looked in the WEB 5 manual and could not find any information about how to turn auto tracking on/off with a schedule using a PTZ preset.

auto_tracking.PNG

The goal is to have auto tracking on for part of the day but IVS on full time.

Specifically as follows:
0000 to 1200 - Auto tracking ON - IVS ON
1200 to 1600 - Auto tracking OFF - IVS ON
1600 to 2400 - Auto tracking ON - IVS ON

wide_view_1.PNG

Did try setting up a schedule with two presets using the WEB 5 Dahua camera GUI. Both presets are the same FOV, the only difference being auto track is on for one of the presets and off for the other preset. IVS for both is on. The logic being that one schedule is used for auto tracking ON while the 2nd schedule is used to turn auto tracking OFF.

wide_view_2.PNG

The result of this setup is that when the schedule changes at 1200 auto tracking is OFF with IVS also OFF. The desired behavior is to have IVS ON full time (0000 to 2400) and only switch auto tracking off at 1200 and back on again at 1600.

Looking for suggestions to make this operational as indicated.
 
Last edited:

Alaska Country

Getting comfortable
Joined
Jun 10, 2021
Messages
487
Reaction score
708
Location
Alaska
When using the camera GUI there was not a working solution to disabling Auto Tracking and retaining IVS triggers. It is possible that one or more of the following is the cause.

1) Improper setup of camera GUI on my part
2) GUI was never designed for this function
3) A bug in the GUI for this function
4) GUI was never tested for this application
5) Is a non needed function for the overall user base

Solution

Used an API HTTP statement to disable/enable Auto Tracking and yet retain IVS triggers for the PTZ.

Tested with FireFox and it changes the state of auto tracking while still keeping IVS on. The nice part is when using the camera GUI on BI the auto tracking button will move to the selected on/off position when the page is refreshed based on the state of TrackEnable.

auto_tracking.PNG

Code:
http://admin:password@192.168.55.62/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][1].TrackEnable=false
Change the TrackEnable to true to turn on auto tracking. Keep at false to turn off. Note: the [0][1] are specific to my settings.

To display all of the PTZ settings using a browser, on the BI computer, use the below URL. Paste into the browser and run. The output will be in excess of 17,000 lines. Then use the search function in Windows "Ctrl+F" to filter for the desired settings. See below for sample of a shortened listing.

Code:
http://admin:password@192.168.55.62/cgi-bin/configManager.cgi?action=getConfig&name=All
get-all.png

If only looking for PTZ Auto Movement data then this URL will limit file output to only that section.

Code:
ttp:/admin:password@192.168.55.62/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
ptz-auto.PNG

NOTE: These are GET functions which only obtain information and display. The SET statement will make changes to the camera settings and can cause issues if not used properly.

FOV Change

There could also be an occurrence when the PTZ is zoomed in when auto tracking is turned off and the PTZ has not returned to its home position. The image would then not be set to wide view. Thus the need to toggle on the preset for that FOV and then change auto tracking to off.

Code:
http://admin:password@192.168.55.62/cgi-bin/ptz.cgi?action=start&code=GotoPreset&channel=0&arg1=0arg2=2arg3=0
Note: arg2 is the preset number and is specific to my settings (preset 1 is arg2=1 and present 2 is arg2=2). arg1 and arg3 are not used.

How a preset is used is described on page 300 of the Dahua "API of HTTP Protocol Specification" version 3.26 under PTZ Auto Movement.

The overall goal is to first test with a browser, then use the Rules Machine in Hubitat to create an APP that will send these functions to a specific camera at a specific time.
 
Top