Skip to main content

SIACLIENT

The SIACLIENT driver implements a SIA (Security Industry Association protocol) client, following the DC-09 specification. It has been developed and tested with HSYCO acting as a SIA DC-09 client, sending messages to a SIA-compatible receiver. Compatibility with other SIA protocol variants is possible but not guaranteed.

Communication

The driver opens an outbound TCP connection to a SIA receiver, formats and sends messages (optionally encrypted), and handles acknowledgements/responses. It exposes datapoints to monitor both outgoing traffic and the incoming acknowledgements. Optional heartbeat (NULL) messages can be sent at a configurable interval.


Communication

  • IP Address: the SIA server IP address
  • IP Port: the SIA server TCP port

High Availability

  • Shutdown when inactive: defaults to true.
note

Receiver option can be omitted since this field is not mandatory in SIA protocol.

note

Setting heartbeat to a value other than 0 will send a NULL message at the specified interval in seconds. The NULL message is a standard SIA DC-09 keep-alive message, containing no event data, used only to signal that the client is active.

Options

IDDefaultValuesDescription
receivernumberReceiver identifier (Rrcvr in SIA message). Coulb be empty
lpref0numberLine prefix (Lpref in SIA message)
accountHSYCOnumber/lettersAccount identifier (#acct in SIA message).
encryptionfalsetrue, falseEnable/disable AES encryption (AES/CBC/NoPadding)
encryptiontypeaes-128,aes-256AES key size when encryption is active
secretstringSecret key for AES encryption; must match the receiver configuration.
heartbeat10numberHeartbeat interval (seconds) for NULL messages. Set 0 do disable heartbeat. The maximum value is 65535

Datapoints

DatapointTypeR/WDescription
last.message.sentstringRLast SIA message sent to the receiver.
message.queue.lengthnumberRNumber of messages currently queued for sending.
received.accountstringRAccount field extracted from the received acknowledgement/response.
received.crchex stringRCRC value received in the acknowledgement.
received.crc.calculatedhex stringRLocally calculated CRC of the received acknowledgement payload.
received.crc.error0,1RCRC validation: 0 = valid, 1 = error.
received.decrypted.messagestringRDecrypted acknowledgement body, when encryption is enabled.
received.eventstringRParsed event/response information from the acknowledgement.
received.rawstringRRaw incoming message received from the receiver.
received.seqnumberRSequence number extracted from the acknowledgement.
received.timestampstring or unknownRTimestamp extracted from the acknowledgement, if present.
timestamp.seconds.elapsednumberRSeconds since the last acknowledgement was received. Updated every 60s or on new message.
messagestringWSend the message to the SIA server
message.queueclearWClear the message queue. Could be useful if the SIA server has not replied to the latest messages and the driver is trying ro re-send them and it's necessary to reset and restart with a new message

I/O Server Logic

  • If heartbeat is set, the driver sends a NULL command every x seconds.
  • When the message datapoint is updated, the specified message is queued and transmitted as soon as possible.
  • After sending a message, the driver waits one second for a response from the SIA server. If no response is received, the message is placed back in the queue.
  • The queue can be cleared at any time by setting message.queue = clear

EVENTS programming examples

This JavaScript module generates randomized SIA (Security Industry Association) protocol messages for HSYCO automation systems. The code creates a timer that sends a new random security alarm message every 10 seconds to the siaclient.message I/O point.

The generator combines random elements from predefined arrays: 15 SIA event codes (BA, BR, CS, PA, GA, etc.), 35 building zones (LivingRoom, Kitchen, Garage, etc.), 9 account numbers (Nri1-Nri9), and 99 sensor indices to create over 465,000 unique message combinations.

Generated messages follow the standard SIA format: ***Nri3/BA42**** RKitchen

Key Features:

Automatic random message generation every 10 seconds Industry-standard SIA codes for burglary, fire, panic, and tamper alarms Comprehensive zone coverage for typical building layouts Easy customization by modifying the predefined arrays The module is ideal for testing SIA client integrations and simulating realistic security system events in HSYCO environments.

INIT : {
// Array of most common SIA codes for security alarms
var siaCodes = [
"BA", // Burglary alarm
"BR", // Burglary restore
"CS", // Communication supervision alarm
"ZC", // Zone short circuit
"TA", // Automatic test
"PA", // Panic alarm
"GA", // Gate/door alarm
"ZD", // Zone disabled
"OP", // Open/close
"CA", // Tamper alarm
"CG", // Tamper restore
"AT", // Alarm test
"RT", // Restore test
"FA", // Fire alarm
"FR" // Fire restore
];

// Array of zones/rooms
var zones = [
"LivingRoom", "Kitchen", "Bedroom1", "Bedroom2", "MasterBed",
"Bathroom", "Entrance", "Garage", "Backyard", "Basement",
"Attic", "Office", "Study", "Dining", "Hallway", "Stairway",
"Laundry", "Pantry", "Closet", "StorageRoom", "Utility",
"Balcony", "Terrace", "Garden", "Pool", "Fence", "Gate",
"FrontDoor", "BackDoor", "SideEntrance", "WindowLiving",
"WindowKitchen", "WindowBedroom", "GardenGate", "Walkway", "Roof"
];

// Function to generate a random number between min and max (inclusive)
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}

// Function to select a random element from an array
function getRandomElement(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}

// Function to generate a random SIA message
function generateRandomSiaMessage() {
var account = "Nri" + getRandomInt(1, 9); // Account from 1 to 9
var code = getRandomElement(siaCodes); // Random SIA code
var index = getRandomInt(1, 99); // Sensor index from 1 to 99
var zone = "R" + getRandomElement(zones); // Random zone

return "***" + account + "/" + code + index + "**** " + zone;
}

programTimerRepeat("testsia", 10);
}

function programTimerEvent(name) : {

if (name.toLowerCase() == "testsia"){
// Genera un messaggio SIA completamente casuale
var randomMessage = generateRandomSiaMessage();

// Invia il messaggio SIA
ioSet("siaclient.message", randomMessage);
}
}

Example of sending a SIA message every 60 seconds using basic EVENT logs.

TIME: io siamessage.message = "TEST"

This will cause the driver to send a message like this one (if encryption isn't active):

6A2B004B"SIA-DCS"0001L1R1#12345[#12345|TEST]_14:09:11,08-19-2025

Following the SIA protocol message syntax:

<LF><TYPE><CRC><LLL><SEQ><RRCVR><LPREF><#ACCT>[#ACCT>|payload]<CR>

Release Notes

3.10.0

  • initial release

SIA is a trademark of Security Industry Association