The Generic IP driver turns the gateway into a raw TCP or UDP endpoint, as a client or as a server, with optional TLS. It does not implement any application protocol: every byte received on the socket is exposed as an address value, and every value written to a write address is sent on the socket as-is.
Use it whenever a device or a third-party system speaks a proprietary ASCII or binary protocol over IP that no dedicated driver covers:
TEMP=21.5<LF>) over TCP.SET (\d+)) and extract values from the replies with regular expressions.Generic IP is event-driven: there is no polling and no read-on-demand. Data appears on the addresses as soon as it is received, and a reply to a command you sent simply shows up on the data addresses.
client, and enter the device Host (IPv4) and Port.\n so that one address update corresponds to one complete message.%tcp:_data — everything received%tcp:_write — write here to send%tcp:_status — 1 when connected, 0 otherwiseWrite "GET TEMP\n" to %tcp:_write: the command is sent, and the reply appears on %tcp:_data.
Set Type = server and a Port: the gateway listens on that port for TCP connections (and UDP datagrams if UDP is checked). Writing to %tcp:_write sends to every connected client. Check One address per client to get a dedicated set of addresses for each client IP (see section 3.2).
Add an address named %tcp:data:TEMP=(\d+\.\d+). Each received frame is tested against the regular expression; when it matches, the address takes the value of the capture group, here 21.5. This value can be logged, routed and displayed like any other.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this gateway instance. |
| Cluster ID | cluster | Cluster identifier. Use 0 for single-gateway setups. |
| TCP | json.tcpEnable | Enables the TCP part and creates the %tcp:_data, %tcp:_write and %tcp:_status addresses. Default: true. |
| UDP | json.udpEnable | Enables the UDP part (IPv4) and creates the %udp:_data and %udp:_write addresses. Default: false. At least one of TCP or UDP must be enabled. |
| Type | json.type | client: connects to Host:Port (TCP) or sends datagrams to it (UDP). server: listens on Port. Applies to both TCP and UDP. Default: client. |
| Host | json.host | Remote IPv4 address, client mode only. Hostnames are not accepted. Default: 127.0.0.1. |
| Port | json.port | Remote port (client) or listening port (server), 1 to 65535. TCP and UDP share the same port number. |
| One address per client | json.separateClients | Server mode only. Creates %tcp:[ip]/_data, %tcp:[ip]/_write and %tcp:[ip]/_status for each connected client (%udp:[ip]/_data and %udp:[ip]/_write for UDP). The broadcast addresses remain. Default: false. |
| Frame separator | json.separator | TCP only. When set, a value is emitted only when a complete frame is received; the separator itself is removed. Empty: data is emitted as it arrives. Escapes \n, \r, \t, \0 and \xHH are supported. Default: empty. |
| TLS | json.tls | Wraps the TCP connection in TLS. UDP is never encrypted. Default: false. |
| Require client certificate | json.requestCert | TLS server mode only. Every client must present a certificate signed by an authority of the ca list, or by the SCEP CA when the list is empty. Connections without a valid certificate are refused. Default: false. |
| SCEP | json.scep | Obtains the certificate and key from a SCEP server and renews them automatically. When checked, the manual ca / key / cert fields are hidden. Default: false. |
| ca | json.ca | Trusted CA certificates (PEM files). Used to verify the remote certificate. A manual list has priority over the SCEP CA. |
| key | json.key | Private key (PEM), when SCEP is not used. |
| cert | json.cert | Certificate (PEM), when SCEP is not used. |
| SCEP URL | json.scepURL | SCEP server endpoint, for example https://pki.example.com/scep. |
| SCEP CN | json.scepCN | Common Name requested for the gateway certificate. |
| SCEP challenge | json.scepChallenge | Challenge password used for enrolment. |
TLS client verification. The server certificate is verified only when a CA is available, either in the ca list or from SCEP. Without a CA, any server certificate is accepted: the link is encrypted but the peer is not authenticated. Always provide a CA for production links.
{
"tcpEnable": true,
"udpEnable": false,
"type": "client",
"host": "192.168.1.50",
"port": 5000,
"tls": false,
"separator": "\\n"
}
Addresses use the %tcp: or %udp: prefix. Only the forms below are meaningful; any other name is accepted by the interface but never receives data and cannot be written.
| Address | Created | Role |
|---|---|---|
%tcp:_data |
automatically | Every TCP chunk or frame received (broadcast). |
%tcp:_write |
automatically | Write to send: to the server in client mode, to all connected clients in server mode. |
%tcp:_status |
automatically | Number of open TCP sockets: 0 or 1 in client mode, the client count in server mode. |
%udp:_data |
automatically | One value per received datagram. |
%udp:_write |
automatically | Write to send: to Host:Port in client mode, to every remote peer that already sent a datagram in server mode. |
%tcp:data:<regex> %udp:data:<regex> |
by the user | Pattern read: the regular expression is tested against each received frame (see 3.3). |
%tcp:write:<regex> %udp:write:<regex> |
by the user | Pattern write: the written value fills the capture groups of the regular expression, and the result is sent. |
%tcp:<ip>/_data %tcp:<ip>/_write %tcp:<ip>/_status |
automatically, with One address per client | Per-client variants in server mode. _status counts the sockets coming from that IP. |
%udp:<ip>/_data %udp:<ip>/_write |
automatically, with One address per client | Per-peer variants for UDP. There is no %udp:…/_status. |
%tcp:<ip>/data:<regex> %tcp:<ip>/write:<regex> |
by the user | Pattern addresses restricted to one client IP. |
In server mode, several systems may connect at the same time. With One address per client checked, the driver creates a dedicated set of addresses for each remote IPv4 as soon as it connects (TCP) or sends its first datagram (UDP). Received data is emitted both on the broadcast _data and on the client's [ip]/_data; writing to [ip]/_write reaches only that client. Several clients behind the same NAT share one IP: [ip]/_status then counts their sockets.
Reading. %tcp:data:<regex> is tested against the whole frame, anchored at both ends. The address value is:
( );Frames that do not match are ignored. For example %tcp:data:ID=(\d+);VAL=(.*) turns the frame ID=7;VAL=on into ["7","on"].
Writing. %tcp:write:<regex> builds the frame from the expression: literal text outside the groups is copied as-is, and each top-level group is replaced by the written value, in order. Writing 42 to %tcp:write:SET (\d+) sends SET 42. For several groups, write an array ([22, 1]) or a bracket string ("[22][1]"). The built frame is checked against the expression; if it does not match, the write fails with built value "…" does not match pattern.
Regular expressions in address names must be valid JavaScript expressions. An invalid read pattern is silently ignored; an invalid write pattern returns
bad pattern.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | The address, with its %tcp: or %udp: prefix. |
| Description | description | Optional description. |
| Extended value | json.extended | On _data addresses, the value is an object { "data": "<frame>", "source": "<ip>:<port>" } by default; uncheck to receive the plain string. On pattern addresses the default is the extracted value; set to true to receive { data, source, groups } instead. |
| Log | log | Logging mode: never, on update, always, or a fixed duration. |
| Property | Value |
|---|---|
| Readable | No — the driver has no read method; values arrive when data is received |
| Writable | _write addresses and write: pattern addresses only |
| Routable | Yes — _data, patterns and _status as sources, _write and write: patterns as destinations |
| Loggable | Yes |
Values written to a _write address are converted before sending: objects are serialised as JSON, everything else as a UTF-8 string. The written value is also echoed as the new value of the _write address, so it is visible in the interface. Received bytes are decoded as UTF-8.
Check TLS and upload the PEM files: ca to verify the remote side, key and cert to present your own certificate (required in server mode, optional in client mode for mutual TLS). In server mode, Require client certificate refuses any client whose certificate is not signed by an authority of the ca list.
Check SCEP and fill in the SCEP URL, SCEP CN and SCEP challenge. The gateway enrols at start-up, stores the certificate in its data directory, and then:
On renewal, a TLS server swaps its certificate without dropping existing connections; a TLS client restarts to reconnect with the new certificate. Until the first enrolment succeeds, the gateway stays offline and logs scep: no certificate yet.
{ "tcpEnable": true, "udpEnable": false, "type": "client",
"host": "192.168.1.50", "port": 5000, "tls": false, "separator": "\\n" }
| Address | Purpose |
|---|---|
%tcp:_data |
{ "data": "TEMP=21.5", "source": "192.168.1.50:5000" } |
%tcp:data:TEMP=(\d+\.\d+) |
21.5 — log it, route it to a BACnet or Modbus address |
%tcp:write:SET (\d+) |
route a setpoint here: writing 42 sends SET 42 |
%tcp:_status |
1 while connected, use it in an alert route |
{ "tcpEnable": true, "udpEnable": false, "type": "server", "port": 7000,
"separateClients": true, "tls": true, "requestCert": true,
"scep": true, "scepURL": "https://pki.example.com/scep",
"scepCN": "gateway-01", "scepChallenge": "secret", "separator": "\\r\\n" }
Each authenticated client gets %tcp:<ip>/_data, %tcp:<ip>/_write and %tcp:<ip>/_status. A pattern such as %tcp:10.0.0.12/data:ID=(\d+);VAL=(.*) extracts values from that client only.
{ "tcpEnable": false, "udpEnable": true, "type": "server", "port": 9000 }
%udp:_data receives one value per datagram. Set Extended value off to get the raw string. %udp:_write answers every peer that has already sent something.
_data (and [ip]/_data), then tested against every data: pattern address._write or a write: pattern is sent immediately on the matching sockets._status follows the number of open TCP sockets.In client mode, a closed or refused connection stops the driver, which the gateway restarts after a short delay; _status returns to 0 in the meantime. In server mode, an error on one client socket restarts the whole gateway.
%udp:_write fails with no udp peer until a first datagram has been received.