HiveMQ
Jump to navigation
Jump to search
example integration with Cobra/PowerCable/PowerPDU4PS + HiveMQ public broker + MQTT Dash Android App
cobra MQTT-flex configuration:
{
"config":{
"broker":{
"url":"broker.hivemq.com",
"protocol":"mqtt",
"port":1883,
"ssl":false,
"type":"generic",
"username":"freedom",
"password":"peace|LOVE|empathy4ALL"
},
"subscribe":[
{
"topic":"netio/${DEVICE_NAME}/output/1/action",
"qos":0,
"target":"OUTPUTS/1/ACTION",
"action":"${payload}"
}
],
"publish":[
{
"topic":"netio/${DEVICE_NAME}/output/1/state",
"qos":0,
"retain":true,
"payload":"${OUTPUTS/1/STATE}",
"events":[
{
"type":"change",
"source":"OUTPUTS/1/STATE"
}
]
},
{
"topic":"netio/${DEVICE_NAME}/output/1/load",
"qos":0,
"retain":false,
"payload":"${OUTPUTS/1/LOAD}",
"events":[
{
"type":"timer",
"period":5
},
{
"type":"delta",
"source":"OUTPUTS/1/LOAD",
"delta":1
}
]
}
]
}
}
HiveMQ connection settings (just to check, that data are being send towards internet):
Android App MQTT Dash (you can use any other, of course): https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en