Описание протокола сообщений MQTT v1.0
Publish
/LWT
device/umni-838a74/lwt
{
"state":"online"
}
{
"state":"offline"
}
/PONG
device/umni-838a74/pong
{
"ping":"pong"
}
/REGISTER
device/umni-838a74/register
{
"hostname": "umni-838a74",
"capabilities": [
"ethernet",
"sdcard",
"webserver",
"webhooks",
"mqtt",
"opentherm",
"rf433",
"onewire",
"alarm",
"ntc1",
"ntc2",
"ai1",
"ai2",
"opencollectors",
"oc1",
"oc2",
"buzzer",
"inputs",
"inp1",
"inp2",
"inp3",
"inp4",
"inp5",
"inp6",
"outputs",
"out1",
"out2",
"out3",
"out4",
"out5",
"out6",
"out7",
"out8"...
],
"networks": [
{
"name": "ethernet",
"ip": "192.168.88.122",
"mask": "255.255.252.0",
"gw": "192.168.88.9",
"active": true
}
],
"heap": {
"total": 383104,
"free": 191552,
"min": 178628
},
"device_type": "generic"
}
/CONFIG (onewire)
device/umni-838a74/config
{
"key":"onewire",
"config":{
"sensors":[
{
"sn":"F7062454B2EE5528",
"label":"Sensor F7062454B2EE5528",
"active":true
}
]
}
}
/CONFIG (rf433)
device/umni-838a74/config
{
"key":"rf433",
"config":{
"devices":[]
}
}
/CONFIG (ntc)
device/umni-838a74/config
{
"key":"ntc",
"config":{
"channels":[
{
"id":0,
"label":"NTC Sensor 1",
"active":true
},
{
"id":1,
"label":"NTC Sensor 2",
"active":true
}
]
}
}
/CONFIG (adc)
device/umni-838a74/config
{
"key":"adc",
"config":{
"channels":[
{
"id":0,
"label":"ADC Input 1",
"active":true
},
{
"id":1,
"label":"ADC Input 2",
"active":true
}
]
}
}
/CONFIG (dio)
device/umni-838a74/config
{
"key": "dio",
"config": {
"inputs": [
{
"config_index": 1,
"port_index": 1,
"label": "Input 1 (port 1)",
"active": true
},
...
],
"outputs": [
{
"config_index": 1,
"port_index": 0,
"label": "Output 1 (port 0)",
"active": true,
"default_state": 0
},
...
]
}
}
/SENSORS (onewire)
device/umni-838a74/sensors
{
"category": "onewire",
"capability":"onewire",
"value":28.25,
"serial":"F7062454B2EE5528"
}
/SENSORS (ntc)
device/umni-838a74/sensors
{
"category": "ntc",
"capability":"ntc1",
"value":27.906805038452148,
"serial":null
}
/SENSORS (adc)
device/umni-838a74/sensors
{
"category": "adc",
"capability":"ai1",
"value":27.906805038452148,
"serial":null
}
/SENSORS (outputs)
device/umni-838a74/sensors:
{
"category": "outputs",
"capability":"out2",
"value":1,
"serial":null
}
/SENSORS (inputs)
device/umni-838a74/sensors:
{
"category": "inputs",
"capability":"inp4",
"value":0,
"serial":null
}
Subscribe
Ping
device/umni-838a74/ping
Payload ""