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
Section titled “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
Section titled “HSYCO Configuration”Add a SIASERVER I/O Server in the I/O Servers section of the Settings and set its parameters:
| Name | Default | Values | Description |
|---|---|---|---|
| port | 6410 | number | TCP port number on which the server listens |
| threads | 1 | number | number of threads used to handle connections |
| timestampdelayoffset | 20 | 0–86400 | maximum allowed time (in seconds) in the future for a valid message timestamp. If set to 0 the timestamp validation is disabled |
| timestampadvanceoffset | 40 | 0–86400 | maximum allowed time (in seconds) in the past for a valid message timestamp. If set to 0 the timestamp validation is disabled |
| encryption | false | true | enable AES encryption based on AES/CBC/NoPadding |
| false | disable encryption | ||
| encryptiontype | aes-128 | aes-128 | use aes-128 encryption |
| aes-256 | use aes-256 encryption | ||
| secret | string | secret key for AES encryption. Must match the key configured in the SIA device |
High Availability
Section titled “High Availability”- Shutdown when inactive: defaults to false
Datapoints
Section titled “Datapoints”“event” contains the meaningful part of the SIA message. All other datapoints are useful for debugging purposes.
“timestamp.seconds.elapsed” can be useful for writing an EVENTS program that sends a notification if no SIA messages are received for an extended period of time.| Datapoint | Type | R/W | Description |
|---|---|---|---|
| account | string | R | the SIA account number that sent the message |
| crc.calculated | hex string | R | locally calculated CRC based on the received message payload |
| crc.error | 1 | R | CRC error |
| 0 | R | no CRC errors | |
| crc.received | hex string | R | CRC value received in the message |
| crcpayload | string | R | message payload used to compute the CRC |
| decrypted.message | string | R | decrypted received message body, if encryption is enabled |
| event | string | R | SIA event message. Could be empty (e.g. NULL message) |
| last.response.sent | string | R | the last response message sent to the SIA device |
| last.command.sent | string | R | the last RSP command sent to the SIA device |
| received.raw | string | R | raw incoming message, as received |
| seq | number | R | sequence number of the message |
| system.timestamp | HH:MM:SS,DD-MM-YYYY | R | timestamp UTC+00:00 when the message was received by HSYCO |
| timestamp | string or "unknown" | R | timestamp UTC+00:00 extracted from the message (if present) |
| type | string or "unknown" | R | received message type parsed from the protocol |
| timestamp.error | 1 | R | timestamp error |
| 0 | R | no timestamp errors | |
| timestamp.seconds.diff | number | R | difference in seconds between system timestamp and SIA message timestamp |
| timestamp.seconds.elapsed | number | R | number of seconds since the last SIA message was received. Updated every 60 seconds of when a new message is received |
| command | <rcvr>-<pref>-<payload> | W | send the command to the SIA on-premises equipment |
| commands.queue | clear | W | clear the commands queue |
| commands.queue.length | clear | R | the length of the commands queue |
I/O Server Logic
Section titled “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
Section titled “Sending Commands”You can send a command to a connected SIA device by writing a value to the command datapoint.
The syntax is the following:
<driverid>.command = <rcvr>-<pref>-<payload>
Where:
- rcvr: receiver number (optional)
- pref: account prefix (mandatory)
- payload: the SIA message payload. The part before the brackets may not match the account number inside the message data.
Examples:
#12345[#12345"TEST"]
#12345[#7890"TEST"]
Programming in EVENTS:
TIME : IO sia.command = "0-0-#12345[COMMAND]"
In this case:
- receiver = 0
- prefix = 0
- payload = #12345[COMMAND]
If encryption is enabled, only `COMMAND]` is encrypted.
TIME : IO sia.command = "2-[COMMAND]"
- receiver omitted
- prefix = 2
- payload = [COMMAND]
Another example in JS:
TIME : {
ioSet("sia.command", "0-[#12345|\\\"TEST\\\"AWAYARM,1]");
}
Payload = #12345|"TEST"AWAYARM,1 — only the part from `[` to the end is encrypted.
Release Notes
Section titled “Release Notes”3.10.0
Section titled “3.10.0”- initial release
SIA is a trademark of Security Industry Association