Avonic CamDirector Teacher Tracker User manual

USER MANUAL
TCP and HTTP API commands
CamDirector® Teacher Tracker
www.avonic.com • © August 2022 • Version 1.0.1

DISCLAIMER, CONTACT AND LIABILITY
Disclaimer
All text, graphics, photographs, trademarks, logos, artwork and computer code (collectively, “Content”),
including but not limited to the design, structure, selection, coordination, expression, “look and feel” and
arrangement of such Content, contained in this Manual is owned, controlled or licensed by or to Avonic, and is
protected by trade dress, copyright, patent and trademark laws, and various other intellectual property rights and
unfair competition laws.
Except as expressly provided in these Terms of Use, no Content of this Manual may be copied, reproduced,
republished, uploaded, posted, publicly displayed, encoded, translated, transmitted or distributed in any way
(including “mirroring”) to any other computer, server, Web site or other medium for publication or distribution or for
any commercial enterprise, without the prior written consent of Avonic.
Copyright © 2022 AVONIC All Rights Reserved.
The information contained in this Manual is subject to change without notice.
Contact Info
For any questions or suggestions, contact your reseller or local distributor of Avonic.
Visit the Avonic website www.avonic.com to find your local Avonic distributor or to download the most recent
version of the documentation.
Join Avonic on Social Media
www.Facebook.com/avonicPTZ www.instagram.com/avonicPTZ
www.LinkedIn.com/company/avonic www.youtube.com/channels/avonic
www.twitter.com/avonic
Liability
Avonic will NOT be held responsible for any damage or injury caused by unqualified persons carrying out these
tasks, or by not following the instructions in this Manual.
Symbols Used in This Manual
Symbol Meaning Description
Danger Not following the instructions associated with this symbol may lead to
personal injury and / or serious damage to the Product.
Electrical Shock Not following the instructions associated with this symbol may lead to life-
threatening situations and / or serious damage to the Product.
Important The information associated with this symbol requires special attention.
Information The information associated with symbol refers to a general remark or a
reference to other documentation.
Instruction This symbol refers to one or more user instructions.
Recycling Specific parts of the Product can be re-used.
ii

Acronyms
The following acronyms are used in this Manual:
API Application Programming Interface
ACK ACKnowledgment message
COM COMpletion message
IP Internet Protocol
PTZ Pan / Tilt / Zoom
TCP Transmission Control Protocol
iii

Contents
DISCLAIMER, CONTACT AND LIABILITY................................................................................................ ii
Symbols Used in This Manual..................................................................................................... ii
Acronyms.....................................................................................................................................iii
INTRODUCTION......................................................................................................................................5
Purpose of This Manual..............................................................................................................5
Target Audience.........................................................................................................................5
Document Structure...................................................................................................................5
TCP SETTINGS AND COMMAND LIST................................................................................................... 6
TCP over IP.................................................................................................................................. 6
CamDirector® Return Commands................................................................................. 7
CamDirector® Control Commands................................................................................8
HTTP API CamDirector®....................................................................................................................... 9
How to use HTTP API.................................................................................................................. 9
HTTP API list................................................................................................................................ 10
iv

INTRODUCTION
Purpose of This Manual
This Manual describes the instructions and programming commands of the TCP and HTTP API functionality for the
CamDirector® Teacher Tracker, which you could use to control the CamDirector® Teacher Tracker over serial or
using your local network.
Target Audience
This manual is developed for IT professionals who are responsible for operating the Product.
Document Structure
The Manual is subdivided into the following Chapters:
1. Introduction
2. TCP Settings and Commands List
3. HTTP API CamDirector®
5

TCP SETTINGS AND COMMAND LIST
TCP is a professional camera control protocol used with PTZ cameras and can be used in combination with the
CamDirector® Teacher Tracker. It works by sending commands to the CamDirector® over an IP connection,
in return the camera sends ACK acknowledgment and COM completion answers to let the sender know
the commands have been received and completed. The list below describes the commands, ranges and
CamDirector® answers. The TCP Settings and Command list is available as a separate document that you can
download on the product website.
TCP over IP
Avonic CamDirector® is implemented with a TCP server. The TCP port is 1260. (Different to CM70 port!)
The default TCP address setting is always 1 when using TCP over IP. As all CamDirectors® are uniquely identified
by their IP address, all TCP addresses are set to 1, the serial addressing plays no part. For TCP over IP, every
command starts with 81 xx xx xx .
To control the camera, you need an TCP supported application, like Hercules SETUP utility or Packet
Sender for example. Follow the instructions below:
1. Open the TCP supported application.
2. Fill in the camera's IP Address, TCP port number and connect the application to your camera. Once
the connection between client and server is set up, the client will be able to send PTZ commands to
the server. The server then parses and executes the PTZ command.
3. Fill in the command to be sent to the camera. The camera will send you the return commands.
4. If you see the returned commands, the camera has executed the command. You can check this in
the WebInterface of the camera.
Default settings: TCP port 1260 / TCP address 1
The pictures below are showing an example of a TCP command (Focus near) with their return commands.
The green RX commands in the picture "Receive message" is the ACK command (to let the sender know
that the command is received and executed) and the COM command (to confirm that the command has
been successfully executed and completed). You can find these commands in the CamDirector® Return
Commands list and CamDirector® Control Commands.
Note that the pictures below are ONLY an example to show you how a TCP supported application works. The
pictures could be different from the application you are using!
TCP IP address and port TCP command example
6

CamDirector® Return Commands
All parameter values are in HEX.
•y = Socket Number
The commands will only work when you update your CamDirector® Teacher Tracker to version 1.05!
Webinterface - Settings > Status > Firmware and check for new firmware. Click the update now button.
Return/complete Command
Command Function Command Packet Comments
ACK 90 4y FF
(y: Socket No.)
Return when the command is
accepted.
ACK/Completion Messages
Completion 90 5y FF
(y: Socket No.)
Return when the command has
been executed.
Error Command
Command Function Command Packet Comments
Syntax Error 90 60 02 FF Returned when the command
format is different or when a
command with illegal command
parameters is accepted.
Command Buffer Full 90 60 03 FF Indicates that two sockets are
already being used (executing
two commands) and the
command could not be
accepted when received.
Command Canceled 90 6y 04 FF
(y: Socket No.)
Returned when a command
which is being executed in a
socket specified by the cancel
command is canceled. The
completion message for the
command is not returned.
No Socket 90 6y 05 FF
(y: Socket No.)
Returned when no command is
executed in a socket specified
by the cancel command, or
when an invalid socket number is
specified.
Error Messages
Command Not Executable 90 6y 41 FF
(y: Execution command Socket
No. Inquiry command: 0)
Returned when a command
cannot be executed due to
current conditions. For example,
when commands controlling
the focus manually are received
during auto-focus.
7

CamDirector® Control Commands
All parameter values are in HEX
•x = CamDirector®TCP over IP Address
Note that, when you are setting the Privacy Mode to ON, you will see only a black screen with the Avonic logo
on your monitor!
The commands will only work when you update your CamDirector® Teacher Tracker to version 1.05!
Webinterface - Settings > Status > Firmware and check for new firmware. Click the update now button when
the new firmware is found.
Camera Control Commands
Command Function Command Packet Comments
On 8x 00 01 6F 01 FF Privacy Mode ONPrivacy_Mode
Off 8x 00 01 6F 00 FF Privacy Mode OFF
Start 8x 01 01 6F 01 FF Manual Control ON
Stop 8x 01 01 6F 00 FF Manual Control OFF
Manual_Control
Switch streams 8x 01 01 6F 02 FF Switch streams during manual
control
Start 8x 02 01 6F 01 FF Tracking ONTracking
Stop 8x 02 01 6F 00 FF Tracking OFF
8

HTTP API CamDirector®
With the HTTP API you can control the CamDirector® Teacher Tracker by using a web browser like Microsoft Edge
or Google Chrome for example. It is possible to change multiple settings at once using this feature.
How to use HTTP API
To use the HTTP API you need the following link:
http://192.168.5.50/api?szCmd=
Follow instructions below:
1. Click on the link above, or copy and paste it to your browser.
2. Note that the IP Address in this link is an example of an IP address. Change this IP Address to the
one you use for your camera. See the WebInterface Settings/ Status. Note also that you need the IP
address of the CD500 (network) and NOT the addresses of the cameras!
3. Copy the code from the list. Remember that you need to copy this from the first to the last bracket!
See the example below (the pictures are the ones from the CM70 API list, but it works still the same):
4. Paste the code at the end of HTTP link. It will look like this:
5. Change the settings in the link. In this case:
6. Press ENTER. If correct, you get in return:
If failed, you get in return.
9

7. In case of a failed return, check the following:
• Brackets in the code. Have you copy and paste the first and the last bracket?
• No long white spaces between the key values of the code. For example this " code " is error and
this "code" is right.
• If you have typed the correct IP address of the camera.
• Typing errors in the code.
8. If you have done it correct, you can check the settings you have changed in the WebInterface.
HTTP API list
Note that, when you set the Privacy Mode to ON, you will see only a black screen with the Avonic logo on it on
your monitor!
The commands will only work when you update your CamDirector® Teacher Tracker to version 1.05!
Webinterface - Settings > Status > Firmware and check for new firmware. Click the update now button.
API Commands
Code: http://192.168.5.50/api?szCmd={"SetENV"{"TeacherTracker":"on}}
Command Code Function Command
TeacherTracker ip.address/api?cmd={"SetEnv": {"TeacherTracker":
"on"}}
Teacher Tracker ON on
TeacherTracker ip.address/api?cmd={"SetEnv": {"TeacherTracker":
"off"}}
Teacher Tracker OFF off
PrivacyMode ip.address/api?cmd={"SetEnv": {"PrivacyMode": "on"}} Privacy Mode on
PrivacyMode ip.address/api?cmd={"SetEnv": {"PrivacyMode": "off"}} Privacy Mode off
ManualControl ip.address/api?cmd={"SetEnv": {"ManualControl": "on"}} Manual Control ON on
ManualControl ip.address/api?cmd={"SetEnv": {"ManualControl": "off"}} Manual Control OFF off
ManualControl ip.address/api?cmd={"SetEnv": {"ManualControl":
"switch"}}
Manual Control Switch switch
10

TCP and HTTP API commands
CamDirector® Teacher Tracker
© August 2022 • Version 1.0.1
Exportweg 11a • 2645 ED Delfgauw • The Netherlands
+31(0)15 7112 712 • [email protected] • www.avonic.com
Table of contents