Skip to main content

SIASERVER

The SIASERVER driver implements a SIA (Security Industry Association protocol) server, specifically following the DC-09 specification. It has been developed and tested with HSYCO acting as a SIA DC-09 server, though compatibility with other SIA protocol variants is possible but not guaranteed.

Communication

The driver listens for incoming TCP connections from SIA-compatible devices, decodes the received messages (including optional decryption), and exposes the most relevant fields as datapoints. It also allows sending control or response messages.

HSYCO Configuration

Add a SIASERVER I/O Server in the I/O Servers section of the Settings and set its parameters:

NameDefaultValuesDescription
port6410numberTCP port number on which the server listens
threads1numbernumber of threads used to handle connections
timestampdelayoffset200-86400maximum allowed time (in seconds) in the future for a valid message timestamp. If set to 0 the timestamp validation is disabled
timestampadvanceoffset400-86400maximum allowed time (in seconds) in the past for a valid message timestamp. If set to 0 the timestamp validation is disabled
encryptionfalsefalseenable AES encryption based on AES/CBC/NoPadding
truedisable encryption
encryptiontypeaes-128aes-128encryption mode if encryption is enabled is AES-128
aes-256encryption mode if encryption is enabled is AES-256
secretstringsecret key for AES encryption. Must match the key configured in the SIA device.

High Availability

  • Shutdown when inactive: defaults to false.

Datapoints

DatapointTypeRDescription
accountstringRthe SIA account number that sent the message
crc.calculatedhex stringRlocally calculated CRC based on the message payload
crc.error0Rno CRC errrors
1RCRC error
crc.receivedhex stringRCRC value received in the message
crcpayloadstringRmessage payload used to compute the CRC
decrypted.messagestringRdecrypted message body, if encryption is enabled
eventstringRSIA event message. Could be empty, in case, for example of a NULL message
last.response.sentstringRthe last response message sent to the SIA device
last.command.sentstringRthe last RSP command sent to the SIA device
received.rawstringRraw incoming message, as received
seqnumberRsequence number of the message
system.timestampHH:MM:SS,DD-MM-YYYYRtimestamp when the message was received by HSYCO
timestampstring or "unknown"Rtimestamp extracted from the message (if present)
timestamp.seconds.diffnumberRdifference in seconds between system timestamp and SIA message timestamp
typestring or "unknown"Rmessage type parsed from the protocol
timestamp.error0Rno timestamp errrors
1Rtimestamp error
command<rcvr>-<pref>-<payload>Wsend the command to the SIA on premises equipment. rcrv and pref are numbers. See the next section for details
commands.queueclearWclear the commands queue

I/O Server Logic

This I/O Server listens for SIA protocol commands on the TCP port specified in the driver options.

Upon receiving a valid SIA command:

It responds with an ACK (Acknowledge) if the timestamp check is either correct or disabled.

Otherwise, it responds with a NAK (Negative Acknowledge) and the current timestamp.

When a NULL command is received, the server responds with an ACK unless there are commands queued. In that case, it sends the oldest command from the command buffer. This logic applies identically in both encrypted and clear (unencrypted) modes

Sending Commands

You can send a command to a connected SIA device by writing a value to the command datapoint.

note

SIA commands to be sent are queued in a first-in, first-out (FIFO) buffer and transmitted one at a time upon receipt of a NULL message from the on-premises equipment.

Therefore, to facilitate immediate command transmission, it is recommended to reduce the time interval between consecutive NULL messages to a few seconds.

note

For encrypted messages, commands will have the identifier *RSP. The timestamp, in SIA format, will be appended and encrypted at the end of the message, just before the carriage return.

The syntax is the following

<driverid>.<command> = <rcvr>-<pref>-<payload>

Where:

rcvr: receiver number - The premise equipment may be programmed to further extend the identification provided by the account number and account prefix by providing a receiver number. This field is optional.

pref: account prefix - The account prefix can be programmed into the premises equipment to extend the identification provided by the account number. This field is mandatory.

payload: the SIA message payload, in which the #acct (account number) part before the brackets [ and ] may not match the account number contained within the message data.

Examples of valid payloads:

#12345[#12345"TEST"]

or

#12345[#7890"TEST"]

Examples of EVENTS programming:

TIME : IO sia.command = "0-0-#12345[COMMAND]"

In this example:

  • receiver number = 0
  • account prefix = 0
  • the payload is #12345[COMMAND]

If encryption is enabled, only the content after the first square bracket (COMMAND] in this case) will be encrypted. The rest of the payload #12345 remains in clear text.

This behavior complies with the SIA DC-09 specification, where encryption applies exclusively to the message body after the first [ till the <CR> char at the end of the message.

TIME : IO sia.command = "2-[COMMAND]"

In this example:

  • receiver number = omitted, not present
  • account prefix = 2
  • the payload is [COMMAND]

If encryption is enabled, only the content after the first square bracket (COMMAND] in this case) will be encrypted. This behavior complies with the SIA DC-09 specification, where encryption applies exclusively to the message body after the first [ till the <CR> char at the end of the message.

TIME : {
ioSet("sia.command", "0-[#12345|\\\"TEST\\\"AWAYARM,1]");
}

In this example:

  • receiver number = 0
  • account prefix = 0
  • the payload is #12345|"TEST"DISARM,1,2,3]

If encryption is enabled, only the content after the first square bracket (#12345|\\\"TEST\\\"AWAYARM,1] in this case) will be encrypted. This behavior complies with the SIA DC-09 specification, where encryption applies exclusively to the message body after the first [ till the <CR> char at the end of the message. Note that the characters \\\ are used to escape the " character.

Release Notes

3.10.0

  • initial release

SIA is a trademark of Security Industry Association