Well in my experience the autoFocus command worked reliably with only one request.
The adjustFocus command is the unreliable one. This command requires both zoom and focus values. I settled on repeating it 5 times, waiting one second between each request. The 5th repeat may optionally be replaced by an autoFocus command.
So, these are the 4 possible courses of action which the DahuaSunriseSunset app may take for handling zoom and focus:
A) 1x autoFocus command
B) 5x adjustFocus commands, 1 second sleep between
C) 4x adjustFocus commands followed by 1x autoFocus command, 1 second sleep between
D) Do nothing.
Different numbers of repeats may work too. Those are just what I determined to be reliable for the camera models I tested against.
The adjustFocus command is the unreliable one. This command requires both zoom and focus values. I settled on repeating it 5 times, waiting one second between each request. The 5th repeat may optionally be replaced by an autoFocus command.
So, these are the 4 possible courses of action which the DahuaSunriseSunset app may take for handling zoom and focus:
A) 1x autoFocus command
B) 5x adjustFocus commands, 1 second sleep between
C) 4x adjustFocus commands followed by 1x autoFocus command, 1 second sleep between
D) Do nothing.
Different numbers of repeats may work too. Those are just what I determined to be reliable for the camera models I tested against.