ESPA 4.4.4 is the industry standard interface between alarm or call systems and paging systems, used in hospitals, care homes and industry. Created in 1984 by the European Selective Paging Manufacturers Association, it carries short text messages with a call address over a serial line (RS-232, RS-422 or RS-485). The Weble IoT Universal Gateway ESPA 4.4.4 driver sends and receives ESPA 4.4.4 messages over a serial port or over TCP.
The driver works in four roles:
In RTU roles, "RTU" only means the serial line.
Driver key:
espa— listed as ESPA 4.4.4 under Alarming in Gateway driver. Licence: required, contact support@weble.ch. Without it the gateway does not connect and its crash log reads missing license. Platforms: Linux and Windows.
Always give a
callAddresswhen you send a message: a message written without call address is sent to call address 123.
insert as address if you want one address per distinct message text (section 3), otherwise keep no action.%espa:lastMessage, %espa:lastMessageObject and %espa:status. %espa:status turns to 1 when the remote system talks.In a master or TCP role, write a text to %espa:lastMessageObject, for example {"callAddress": "401", "displayMessage": "Test WBox"}. The pager 401 receives Test WBox.
Name, Cluster ID and Description are common to all drivers: see Gateways.
| Label | JSON key | Default | Description |
|---|---|---|---|
| Role | json.role |
slave (RTU Slave) |
slave (RTU Slave), master (RTU Master), tcp-slave (TCP Slave), tcp-master (TCP Master). See the introduction. |
| Host | json.host |
(empty) | TCP Slave only: IP address or host name of the remote system. |
| Port | json.port |
9000 |
TCP roles. TCP Master: port on which the gateway listens. TCP Slave: port of the remote system. |
| Serial Port | json.serialPort |
(empty) | Serial roles: serial interface of the gateway or USB adapter. |
| Wait ack | json.waitMessageAck |
checked | After sending a message, wait for the acknowledge of the remote system; without answer within 8 s, the driver warns and starts the exchange again. Unchecked: no wait. |
| InactivityTimeout | json.inactivityTimeout |
20000 |
Milliseconds without traffic before the link is considered lost: %espa:status goes to 0 and the driver restarts the exchange (RTU Slave: the driver restarts). Minimum 2000 in the form. |
| onNewMessage | json.onNewMessage |
noAction |
insertAsAddress (insert as address): one address per distinct message text, received or sent. noAction (no action): only the three standard addresses. |
| BaudRate | json.baudRate |
9600 |
Serial roles: 9600, 19200, 38400, 57600 or 115200. Set it explicitly to the speed of the remote system. |
| Parity | json.parity |
none |
Serial roles: none, even, odd, space. |
| DataBit | json.dataBits |
8 |
Serial roles: 5 to 8. |
| Stopbit | json.stopBit |
1 |
Serial roles: 1 or 2. |
Changes to the gateway are applied when the driver restarts, which saving the gateway does.
Serial master sending to a paging system at 9600 baud, 7 data bits, even parity:
{
"role": "master",
"serialPort": "/dev/extcomm/1/0",
"baudRate": 9600,
"dataBits": 7,
"parity": "even",
"stopBit": 1,
"waitMessageAck": true,
"inactivityTimeout": 20000,
"onNewMessage": "noAction"
}
TCP slave connecting to a serial-to-Ethernet converter of the call system:
{
"role": "tcp-slave",
"host": "192.168.20.40",
"port": 9000,
"waitMessageAck": true,
"inactivityTimeout": 20000,
"onNewMessage": "insertAsAddress"
}
The driver creates its addresses itself; they cannot be inserted by hand.
| Address | Content |
|---|---|
%espa:lastMessage |
Text of the last message received or sent. Write a text here to send it. |
%espa:lastMessageObject |
Last message received or sent, as an object with its fields (section 4). Write an object here to send it. |
%espa:status |
1 while the remote system talks, 0 after InactivityTimeout without traffic. |
%espa:1, %espa:2… |
With onNewMessage = insert as address: one address per distinct message text; its description is the text, its value the last message object with this text. |
Only the description and Log can be changed. Log and Store value work the same way for every driver: see Log and Store value policies.
| Property | Value |
|---|---|
| Readable | Yes — last value |
| Writable | %espa:lastMessage and %espa:lastMessageObject, in the RTU Master, TCP Master and TCP Slave roles |
| Created automatically | Yes |
| Routable | Yes |
| Loggable | Yes |
Write to %espa:lastMessage or %espa:lastMessageObject, from a route, the logic module, the API or the interface:
| Field | ESPA record | Content |
|---|---|---|
callAddress |
1 — call address | Pager, phone or extension number. Default 123: always set it. |
displayMessage |
2 — display message | Text to show. Required. |
beepCoding |
3 — beep coding | Beep pattern, as defined by the paging system. |
callType |
4 — call type | Call type, as defined by the paging system. |
priority |
6 — priority | Priority of the call. Default 3. |
Before sending, accents are removed from the text (é becomes e, ß becomes ss, æ ae, œ oe) and non-printable characters are dropped; punctuation is kept. An empty text is refused.
In the RTU Master role, messages are queued and sent one after the other when the paging system answers the poll. In TCP roles, a message is sent at once.
In the RTU Slave role the gateway cannot send: a write is refused.
In the RTU Slave and TCP Slave roles, each message received updates %espa:lastMessage (text) and %espa:lastMessageObject (all the records of the message: callAddress, displayMessage, beepCoding, callType, numberOfTransmissions, priority, callStatus). The gateway acknowledges each message.
Route %espa:lastMessage to an SMS, notification or SMTP address to forward the calls. With onNewMessage = insert as address, each distinct text gets its own address, which you can route or log separately.
Gateway in RTU Master role, connected to the paging system. A route on the alarm address of a chiller (for example a Modbus coil) has this function:
function chillerAlarm(newValue, sourceAddress, destinationAddress, options){
if(newValue == 1){
return { callAddress: "401", displayMessage: "Chiller 2 fault - roof", priority: 1 }
}
return null // nothing is sent when the alarm clears
}
and writes to %espa:lastMessageObject. Pager 401 receives Chiller 2 fault - roof with priority 1. See Route functions (Blockly) and Routes for writing route functions.
| Symptom | Cause | What to do |
|---|---|---|
Gateway does not connect; crash log missing license |
No ESPA licence on the gateway. | Contact support@weble.ch. |
%espa:status stays 0 |
No traffic on the line: wiring, serial settings, wrong role, or the remote system is off. | Check the cable, BaudRate, Parity, DataBit, Stopbit and that one side is master and the other slave. |
Log Waiting client confirmation timeout ! |
The paging system did not acknowledge within 8 s. | Check the call address and the link; uncheck Wait ack only if the remote system never acknowledges. |
Write refused with Unable to write on EPSA address |
The gateway is in the RTU Slave role. | Use the RTU Master role (or a TCP role) to send. |
Write refused with Please provide a valid displayMessage value or Message empty after cleaning |
The text is empty, or contains only characters removed before sending. | Send a text with printable characters. |
| Message delivered to the wrong pager | The message was sent without callAddress and went to 123. |
Send an object with callAddress. |
TCP Master: log Only one client is supported |
A second system tried to connect. | Only one remote system per gateway. |
TCP Slave: log connection to … lost/unreachable, reconnecting every 1s |
The remote system does not answer. | Check Host, Port and the network. |
To read the driver log: open the gateway log (see Gateways and Logs and diagnostics).