Commit d1456c9a authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Publish human readable nodestatus to node# mqtt topic

Makes for a nice node listing with pure-text MQTT clients/tools
parent fec7f7de
Pipeline #3588 passed with stage
in 6 minutes and 26 seconds
......@@ -104,6 +104,11 @@ int sbbs_t::putnodedat(uint number, node_t* node)
);
SAFEPRINTF(topic, "node%u/status", number + 1);
int result = mqtt_pub_strval(mqtt, TOPIC_BBS, topic, str);
if(result == MQTT_SUCCESS) {
SAFEPRINTF(topic, "node%u", number + 1);
result = mqtt_pub_strval(mqtt, TOPIC_BBS, topic
,nodestatus(&cfg, node, str, sizeof(str), number + 1));
}
if(result != MQTT_SUCCESS)
lprintf(LOG_WARNING, "ERROR %d (%d) publishing node status: %s", result, errno, topic);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment