Standard Communication For TGH - XML-RPC
Standard Communication For TGH - XML-RPC
Page 1
Versions
Standard SGV Version Date Authors Comments
Version
Modified GetStatusPGV
Modified SetOutputs
Added OutputEnable
command
Added OutputSelect
command
Added SendReboot
command
Page 2
1.2 23/11/2015 K. De Cuyper Explanation of the minor
and major defects
Added examples of
GetStatusSGV
Clarification in Result[0] of
GetStatusSGV
Clarification of
SendCommandSGV
Add
SetAuthorisationTGL
Add new parameters
in GetStatus
(validation & rejection)
Page 3
Version Date Software Change log
GetCounterFromTo (update
counters list)
Removed function :
GetStatusStd
Page 4
6.8 27 Apr 2020 29384_040ed2efb Modified Functions :
Page 5
Table of Contents
Versions
Table of Contents
Introduction
Purpose
Interface definition
Unencrypted channel
Encrypted channel
XML-RPC References
How-to
Python code Example
Secured Functions
Introduction
Generate hashed password
Conventions
Description
Software version
ApplyUpdate (Secured Function)
GetAuthorizedUserList (Secured Function)
GetBuzzerFraud
GetBuzzerIntrusion
GetClientInfo
GetCounter
Counters
GetCounterFromTo
Counters
GetCurrentPassage
GetDate
GetDoorOperationModeList
GetInputs
Digital Inputs
Analog Inputs
GetMaintenanceLogFromTo
GetMotorSpeed
GetOperatingDirection
GetParkeonLogFromTo
GetProperties
GetSetTempo
GetSideOperationModeList
GetStatus
Door Modes
Side Operating Modes
Infractions
Timeouts
Errors
GetVersion
SendReboot
SendRestart
SetAuthorisation
SetAuthorisationTGL
SetAuthorizedUserList (Secured Function)
SetBuzzerFraud
SetBuzzerIntrusion
SetClientInfo
SetCredentials (Secured Function)
SetDate
SetEmergency
SetMaintenanceMode
SetMode
Door Modes
Side Operating Modes
SetMotorSpeed
SetOperatingDirection
SetOutputClient
Digital Outputs
Pictograms
SetProperties
Page 6
Introduction
Purpose
This document describes the API (Application Programming Interface) that is available on the gate product line. Clients can use this API to
manage and control a gate. This API offers the following features:
This API is implemented as a XML-RPC API. As a consequence, the API can be called remotely through an HTTP connection. Clients can
be written in a wide variety of programming languages as libraries implementing the XML-RPC protocol are available.
Interface definition
Unencrypted channel
Encrypted channel
The following cipher suites are offered (presented here in order of precedence) :
sect283k1, sect283r1, sect409k1, sect409r1, sect571k1, sect571r1, secp256k1, prime256v1, secp384r1, secp521r1, brainpoolP256r1,
brainpoolP384r1, brainpoolP512r1
XML-RPC References
XML-RPC is a well documented protocol. Numerous books have been published on this topic. See for example the following book published
by O'REILLY:
Programming of a XML-RPC client can be simplified by using libraries that implements the protocol. XML-RPC libraries exist for a wide
range of programming languages including C/C++, Java, PHP, Perl, Python, Ruby, etc.
How-to
How to connect to the XML-RPC server
The following is written in Python 2.6 using the standard library xmlrpclib. It shows how to connect to the gate XML-PRC server and how to
use the different calls that are provided:
File: gateRPC.py
Page 7
import xmlrpclib
def run(IPaddress,port=8081):
URI="http://%s:%i" % (IPaddress,port)
proxy=xmlrpclib.ServerProxy(URI,xmlrpclib.Transport())
#get the list of RPC calls supported by the gate
methods=proxy.system.listMethods()
print "gate RPC calls:"
print
for name in methods:
if name.find("system.") <> 0: # exclude introspection
methods
print "method: %s" % (name,)
if _name_ == "_main_":
IPaddress=raw_input("gate IP address: ")
run(IPaddress)
Execution:
C:\pyScripts>python gateRPC.py
gate IP address: 172.18.0.206
gate RPC calls:
method: GetCounter
method: GetCounterFromTo
method: GetDoorOperationModeList
method: GetProperties
method: GetSideOperationModeList
method: GetStatus
method: SetAuthorisation
method: SetEmergency
method: SetMode
C:\pyScripts>
Page 8
Secured Functions
Introduction
The be able to use the secured functions you need to be authenticated (at least integrator level). The SetCredentials function call will return
you a cookie to be used afterward with the other functions.
1. Use the SetCredentials function that returns the cookie (using integrator or techician level of accreditation).
2. Use the GetAuthorizedUserList with the cookie created by the call to SetCredentials.
$hash_type$salt$hashed_password
$6$xkztK57I$2X7.o3ebRDKlWv8rHDG.aa2mudNHgpO1BohOc6TXMrLo/68VFTwVEglF7bp99xlyuSFjlT/wQHzvjScpSgDUS1
import crypt
import string
import random
salt = ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.ascii_lowercase + string.
digits) for _ in range(8))
salt = "$6$" + salt + "$"
hashed = crypt.crypt("password", salt)
Page 9
Conventions
The available XML-RPC functions are documented according to the following convention:
Results = function_name(Parameters)
Where:
Note: Globally the functions will returns 0 if their is a problem with the parameters.
Description
Software version
This documentation was generated for the following device:
Software T04E00V06R08
SVN 29384_040ed2efb583b8105ca28f57c28bef484c6a4af4
user = upload
password = upload
target directory = update.
0 int
1: the gate is about to reboot
2: the archive is gzipped
3: can not read the file status of the
archive
4: the archive is too short
5: the archive is corrupted
6: There is not enough disk space for
the archive
7: The communication is lost. Try
again.
0: No changes needed
-1: Invalid archive
Page 10
string level Level of accreditation
(profile) : technician,
integrator, client
Technician
Integrator
Client
GetBuzzerFraud
Return the volume of the buzzer during a fraud
GetBuzzerIntrusion
Return the volume of the buzzer during an intrusion
GetClientInfo
Retrieve the Client information stored with SetClientInfo
GetCounter
Return the current counters
Counters
The following counters are available through the XML-RPC Interface and through the Web Interface
The accreditation level required to have access to the counters is equal to "Client" for all counters available through this command
Page 11
"01004" Client Crossings in direction B Complete passages from the exit
to the entrance
"01011" Client Exit timeout The exit has not been cleared
completely in the allotted time
GetCounterFromTo
Return the list of counters saved every hour during a given time-period.
Note : This function can generate a lot of data, be sure that the used client/library support it, or use a smaller time range
Note2 : If the difference between date is more than 7 days, the query is executed only on the last 7 days of the time windows (maximum
24*7+1 entries)
Page 12
Results Type SubType SubSubType Descriptor Comments
Counters
The following counters are available through the XML-RPC Interface and through the Web Interface
The accreditation level required to have access to the counters is equal to "Client" for all counters available through this command
"01011" Client Exit timeout The exit has not been cleared
completely in the allotted time
Page 13
"01062" Client Validation in direction B Authorisations given to leave the
gate through the entry
GetCurrentPassage
Return the summary of the last passage.
1 int
1: Tracking in progress
0: Tracking in standby, no occulted
sensor in the tracking area
2 int
0: Entry doors are closed
1: Entry doors are open or in motion
3 int
0: Exit doors are closed
1: Exit doors are open or in motion
GetDate
Return the system date as UTC date/time.
Return the timezone modifier if available.
GetDoorOperationModeList
Return the list of all lane status that are supported by the gate.
Page 14
1..N array of int ivalue Index in array
Door Modes
GetInputs
Return the current value of the digital and analog inputs.
Notes:
The value of the digital inputs are the logical state, not the electrical one.
If multiple digital inputs have the same function (i.e. the same sType), only one entry is present in the returned array. The iValue
field contains the result of a logical OR applied to all inputs of the corresponding type.
If multiple analog inputs have the same function (i.e. the same sType), only one entry is present in the returned array. The iValue
field contains the maximum value of all inputs of the corresponding type.
0 : off
1 : on
0 : off
1 : on
Digital Inputs
"74999" Disabled
"74972" Rejection
"74971" Validation
Page 15
"74962" Locked Closed (entry door)
Analog Inputs
"74999" Disabled
"74985" Enabled
"74992" ADC1
"74885" ADC2
"74992" ADC1
"74885" ADC2
GetMaintenanceLogFromTo
Returns the list of events during a given time-period. Those events include :
Note : the number of actions returned by the method is limited to 1000 , to get all the information split the request.
Page 16
4 int Start date - Minute (0 - 59)
9: string Identifier of the user who performed the action (if relevant)
GetMotorSpeed
Return the opening and closing speeds of the doors. These speeds are defined in percent of the maximum speed, which is computed
internally by the application.
Modified using the maintenance interface SetMotorSpeed.
Note : the parameters defined in Results1 are only used when the gate is equipped with two sets of obstacles.
Page 17
int Standard opening speed percent
(0-100)
GetOperatingDirection
Return the operating direction of the gate.
It specifies if the gate is available in both directions or not.
0 string Operating direction, see Message code for the Operating Direction
Operating Direction
GetParkeonLogFromTo
Returns the list of events during a given time-period, those events are :
Parkeon status
Parkeon function
Parkeon validation result
Parkeon Contract Serial
Parkeon Media Serial
Parkeon nb of authorizations
Note : the Number of actions returned by the method is limited to 1000 , to get all the information please split the request.
Page 18
8 int Ending date - Day (1 - 31)
int Status
int Function
GetProperties
Return the name assigned to the lane, the group that contains the lane, and the position of the lane in the group. These properties are used
by the Smart&Slim monitoring panel.
GetSetTempo
Change the timer durations (ms) and return the current/new values in Results.
If you pass -1 as a parameter it will not change the current timer value, so to get all the values pass 9 times -1.
Page 19
4 int Intrusion time delay after a user is
detected in the lane (in Controlled Mode
only).
GetSideOperationModeList
Return the list of all entry/exit operating modes that are supported by the gate.
00316 Free
00315 Controlled
00317 Closed
GetStatus
Return status information. The following data are returned:
Summary
Number of entrance/exit authorisations
Lane status and entrance/exit operating mode
Frauds
Timeouts
Technical defects
0 string
Char 0: User
processing on-going
(0-1)
Char 1: Door is open
(0-1)
Char 2: Fraud or
Intrusion (0-1)
Char 3: Timeout (0-1)
Char 4: Technical
defect (0 : OK / 1 :
Minor defect / 2 :
Major defect)
Char 5: Emergency (0-
1)
Char 6: Maintenance
(0-1)
Char 7: Side modes
and #Door Modes
forced by inputs (0-1) 1
Page 20
1 int Number of authorisations to
cross from the entrance
0: Minor
1: Major
Note 1: The inputs are overwriting the configuration files and the configurations sent by Xml-Rpc.
Operator’s identifier
This field will be non-empty if a logged user performed an action on the maintenance interface in the last 5 minutes.
If multiple users are logged simultaneously, only the identifier corresponding to the last action will be returned.
Door Modes
Page 21
Side Operating Modes
"00316" Free
"00315" Controlled
"00317" Closed
Infractions
"01060" Stop in the gate Someone has stopped his movement for
too long inside the gate.
Timeouts
"01011" Exit timeout The exit has not been cleared completely
in the allotted time
"01046" No crossing timeout A passenger coming did not cross the gate
in the allotted time
Errors
"02001"
Name : CAN Heartbeat
Major Error: One or more CAN boards are missing
Minor Error: There are too many CAN boards connected to
the bus
Page 22
"02002"
Name : Software version on CAN board
Major Error: Software version is not OK on 1 or more boards
Minor Error: Software version is not OK on 1 or more boards
"02003"
Name : Product number on CAN board
Major Error: One or more board product version is not OK
Minor Error: One or more board product version is not OK
"02004"
Name : DIRAS emitter
Major Error: A DIRAS emitter board has failed
Minor Error: A DIRAS emitter board has failed
"02005"
Name : DIRAS receiver
Major Error: A DIRAS receiver board has failed
Minor Error: A DIRAS receiver board has failed
"02006"
Name : Obstructed photocells
Major Error: One or more photocells are obstructed
Minor Error: One or more photocells are obstructed
"02008"
Name : Obstacle blocked
Major Error: The motor is blocked, verify if the motor can be
moved freely
Minor Error: The motor is blocked, verify if the motor can be
moved freely
"02009"
Name : Motor : high current consumption
Major Error: The motor current consumption is too high
Minor Error: The motor current consumption is too high
"02010"
Name : Brake
Major Error: The mechanical lock blocks the movement of
the obstacles
Minor Error: Brake malfunction. Check the brake output
"02011"
Name : Motor drive
Major Error: The motor board has failed or is not installed
Minor Error: The motor board has failed or is not installed
"02012"
Name : Detection
Major Error: Multiple photocells have failed
Minor Error: Multiple photocells have failed
"02013"
Name : Client communication
Major Error: No message have been received using the
communication interface. Check the wiring with the
“customer” device
Minor Error: Communication with server is lost
"02014"
Name : Frontal detection
Major Error: The communication with the camera is lost.
Check if the camera is powered and/or if there is activity on
the network cable.
Minor Error:
Page 23
"02026"
Name : Frontal detection occulted
Major Error:
Minor Error: Something obstruct the sight of view of the
camera. This minor defect leads to a camera fraud.
"02020"
Name : Temperature
Major Error: The processor or a motor board is overheating
Minor Error: The processor or a motor board is overheating
"02023"
Name : Motor drive configuration
Major Error: The obstacle width and/or height are not ok,
please measure the obstacles and check the dimensions in
the motor parameters
Minor Error: The obstacle width and/or height are not ok,
please measure the obstacles and check the dimensions in
the motor parameters
"02024"
Name : Egress configuration
Major Error: Error on Egress input. Check the input. If the
gate have no egress function check the configuration
(configuration > General configuration > Mode configuration
> Security mode )
Minor Error: Error on Egress input. Check the input. If the
gate have no egress function check the configuration
(configuration > General configuration > Mode configuration
> Security mode )
"02025"
Name : Motor not initialized
Major Error: One or more motor did not finish its
initialisation. If the door has moved check the limit switches, if
not, check if no cells are obstructed ( Individual tests > IR
sensors )
Minor Error:
"02019"
Name : Installation
Major Error: One or more board does not have the same
number of IO as configured. Create an debug archive to
investigate this problem
Minor Error: Wrong detection plane height. The default
value based on the gate type is used.
"02027"
Name : CPU
Major Error: CPU board is faulty and must be replaced
Minor Error: CPU board is faulty and must be replaced
"02028"
Name : CAN Overflow
Major Error: There are too many CAN message on the bus.
Check the CANbus information (individual tests).
Minor Error: There are too many CAN messages on the bus.
Check the bus status (Individual Tests > Diagnostics).
"02021"
Name : Inputs/Outputs
Major Error: Error while reading the value of the angular
position sensor. Check if it is correctly connected to the
motherboard. Check if the sensor is working correctly
Minor Error: One or more of the digital outputs is/are active
but not using power. Check the page: Visualization > Show
device info. The corresponding output(s) will appear in red.
Check the outputs connections and if the connected device is
working as expected.
Page 24
"02031"
Name : Extension board
Major Error: Check connection with the extension board and
then restart the system
Minor Error: Check connection with the extension board and
then restart the system
"02033"
Name : Client controller failure
Major Error: The client controller / CPU is defective, please
check its own maintenance interface to correct this problem
Minor Error: The client controller / CPU is defective, please
check its own maintenance interface to correct this problem
"02032"
Name : CAN bus
Major Error: Abnormal error rate on CAN bus, please check
wiring and shielding (check Unitary Test>Diagnostic>CANx)
Minor Error: Abnormal error rate on CAN bus, please check
wiring and shielding (check Unitary Test>Diagnostic>CANx)
"02034"
Name : Failed FTP synchronisation
Major Error:
Minor Error: No answer from ftp server
"02035"
Name : LCD
Major Error:
Minor Error: No communiction with LCD. Check wiring or
replace the LCD
"02036"
Name : Reader
Major Error: No Communication with the reader, check the
wiring or replace the Reader
Minor Error: No Communication with the reader, check the
wiring or replace the Reader
"02037"
Name : Camera error
Major Error: Check the connection with the camera
computer, and connect on its maintenance interface
Minor Error:
"02038"
Name : Sound reader error
Major Error:
Minor Error: No communication with sound board. Check
the wiring or replace the sound board
"02039"
Name : Camera version error
Major Error:
Minor Error: Check Camacq version
"02041"
Name : Camera height error
Major Error:
Minor Error: Check Camacq Camera Height
GetVersion
Return the installed software attributes
Page 25
0 string Type of the lane
SendReboot
Reboot the whole system immediately.
0 int 1 : OK
SendRestart
Restart the application immediately.
0 int 1 : OK
SetAuthorisation
Sets the number of authorisations for both directions (entry to exit and exit to entry)
Since this command must wait for the functional module to cycle before setting the Results, it may take up to 200ms before sending the
response
0 int 1 : OK
SetAuthorisationTGL
Set the number of authorisations for both directions (entry to exit and exit to entry)
0 int 1 : OK
Page 26
Establishes and uploads the list of users authorised to access the maintenance interface uploaded in the gate, as well as their password and
accreditation level.
The easiest way to update the user list is to first get them via GetAuthorizedUserList function.
Note : the command completely replaces the current user list.
0 int
1: User’s list properly uploaded
0: No changes needed
-1: Invalid number of arguments or
Invalid value for Params 0
-2: Error in some element Params N
Technician
Integrator
Client
SetBuzzerFraud
Configure the volume of the buzzer during a fraud.
0: Disabled
1: C / DO
2: D / RE
3: E / MI
4: F / FA
5: G / SOL
6: A / LA
7: B / SI
0 int
1: Valid
0: Invalid number of Params
-1: Not valid
SetBuzzerIntrusion
Configure the volume of the buzzer during an intrusion.
Page 27
1 int Buzzer note (optional field)
0: Disabled
1: C / DO
2: D / RE
3: E / MI
4: F / FA
5: G / SOL
6: A / LA
7: B / SI
0 int
1: Valid
0: Invalid number of Params
-1: Not valid
SetClientInfo
Set the Client information string
Type Comments
string
"OK"
"Invalid lenght"
"Invalid number of arguments"
0 int
1: Access granted
0: Invalid number of Params
-1: Access denied
Technician
Integrator
Client
SetDate
Change the system date, used for log synchronisation.
Date/Time is considered as being UTC.
Page 28
1 int Month (1..12)
0 int
1 : Success
0 : Invalid number of parameters
-1: Not OK
Page 29
/Zaporozhye, Europe/Zurich, Indian/Antananarivo, Indian/Chagos, Indian/Christmas, Indian/Cocos, Indian/Comoro, Indian/Kerguelen, Indian
/Mahe, Indian/Maldives, Indian/Mauritius, Indian/Mayotte, Indian/Reunion, Mexico/BajaNorte, Mexico/BajaSur, Mexico/General, Pacific/Apia,
Pacific/Auckland, Pacific/Bougainville, Pacific/Chatham, Pacific/Chuuk, Pacific/Easter, Pacific/Efate, Pacific/Enderbury, Pacific/Fakaofo,
Pacific/Fiji, Pacific/Funafuti, Pacific/Galapagos, Pacific/Gambier, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Johnston,
Pacific/Kiritimati, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro, Pacific/Marquesas, Pacific/Midway, Pacific/Nauru, Pacific/Niue, Pacific
/Norfolk, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Palau, Pacific/Pitcairn, Pacific/Pohnpei, Pacific/Ponape, Pacific/Port_Moresby, Pacific
/Rarotonga, Pacific/Saipan, Pacific/Samoa, Pacific/Tahiti, Pacific/Tarawa, Pacific/Tongatapu, Pacific/Truk, Pacific/Wake, Pacific/Wallis,
Pacific/Yap, US/Alaska, US/Aleutian, US/Arizona, US/Central, US/Eastern, US/East-Indiana, US/Hawaii, US/Indiana-Starke, US/Michigan,
US/Mountain, US/Pacific, US/Pacific-New, US/Samoa, Global/CET, Global/CST6CDT, Global/EET, Global/EST, Global/EST5EDT, Global
/GMT, Global/HST, Global/MET, Global/MST, Global/MST7MDT, Global/NZ, Global/PRC, Global/PST8PDT, Global/ROC, Global/ROK,
Global/UCT, Global/UTC, Global/WET, Global/W-SU
SetEmergency
Put the gate in emergency mode or return to normal operation mode
When the emergency mode is set by a digital input, this command has no effect.
0: Disabled
1: Enabled
0 int
1 : Success
0 : Invalid number of parameters
-1: Invalid value
SetMaintenanceMode
Sets the gate in maintenance mode (door are in free wheel)
After reboot, the modifications are lost
0 int
1: Enable
0: Disable
0 int
1: Success
0: Invalid number of parameters
*-1: Not OK
SetMode
Set the lane status, the entry operating mode and the exit operating mode. You can change specific parameters by setting invalid value (like
empty string) for the parameter(s) you don't want to change.
After reboot, the modifications are lost (the gate will use the modes written in its configuration file)
Note : Take care to use, string arguments.
0 string Entrance door, see Message code for the #Door Modes
1 string Entrance Side, see Message code for the #Side Operating Modes
2 string Exit Side, see Message code for the #Side Operating Modes
3 string Exit door, see Message code for the #Door Modes
Page 30
0 int
1 : Success
-1 : All Params are invalid
Door Modes
"00316" Free
"00315" Controlled
"00317" Closed
SetMotorSpeed
Configure the opening and closing speeds of the doors. These speeds are defined in percent (0-100) of the maximum speed, which is
computed internally by the application.
See the Maintenance Interface Manual for detailed information about the different speeds.
Notes
0 int
1: Valid
0: Invalid number of Params
-1: Not valid
Page 31
SetOperatingDirection
Set the operating direction of the gate.
Note : Take care to use, for example, 00329 and not 329.
0 string Operating direction, see Message code for the Operating Direction
0 int
1 : Success
-1 : invalid value
Operating Direction
SetOutputClient
Sets the client-controlled binary digital outputs and pictograms
For Customer outputs, refer to the 'Digital output' table
For Customer pictograms, refer to the 'Pictograms' table
0 int 1: OK
Digital Outputs
Value Description
0 Off
1 On
2 Temporized
Page 32
3 Pulsing
Pictograms
Value Description
0 Off
1 Red
2 Green
3 Yellow
4 Blue
5 Magenta
6 Cyan
7 White
8 Custom
9 Pulsing Red
10 Pulsing Green
11 Pulsing Yellow
12 Pulsing Blue
13 Pulsing Magenta
14 Pulsing Cyan
15 Pulsing White
16 Pulsing Custom
SetProperties
Set the name assigned to the lane, the group that contains the lane, and the position of the lane in the group. These properties are used by
the Smart&Slim monitoring panel.
0 int
1: OK
0: Invalid number of Params
-1: Invalid param values
Page 33