Appearance
Generic I/O (function 17)
A general-purpose input/output module: two relay outputs, two digital inputs and two analogue voltage inputs. It is what gets used for equipment that has no MUXEN interface of its own — a switch to read, a pump to energise, a sender to measure.
Published
device/17/<i>/life
metadata adds counter; expireAfterSec: 30.
data field | Type | Unit | Description |
|---|---|---|---|
relay0, relay1 | bool | — | Relay states |
input0, input1 | bool | — | Digital inputs |
ana0, ana1 | number (3 dec) | V | Analog inputs (signed) |
json
{
"data": {
"relay1": false,
"relay0": true,
"input1": false,
"input0": true,
"ana0": 3.271,
"ana1": 0.045
},
"metadata": {
"rxdate": "2026-06-17T14:30:45.123Z",
"rxTimestamp": 1781793045,
"expireAfterSec": 30,
"counter": 2
}
}device/17/<i>/testcanhost
metadata adds counter; expireAfterSec: 30. data is empty — payload is the metadata counter only.
json
{
"data": {},
"metadata": {
"rxdate": "2026-06-17T14:30:45.123Z",
"rxTimestamp": 1781793045,
"expireAfterSec": 30,
"counter": 3
}
}bash
mosquitto_sub -h 127.0.0.1 -t 'device/17/+/#' -vCommand — device/17/<i>/command
Regex ^device/17/([[:digit:]]+)/command$. channel must be a JSON integer 0-15 or dropped. If both true → requestOn cleared.
| Field | Type | Description |
|---|---|---|
channel | int 0-15 | Target channel |
requestOn | bool | Enable channel |
requestOff | bool | Disable channel |
bash
mosquitto_pub -h 127.0.0.1 -t 'device/17/0/command' -m '{"channel":3,"requestOn":true}'
mosquitto_pub -h 127.0.0.1 -t 'device/17/0/command' -m '{"channel":3,"requestOff":true}'