Skip to content
Snippets Groups Projects
Commit d1456c9a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Publish human readable nodestatus to node# mqtt topic

Makes for a nice node listing with pure-text MQTT clients/tools
parent fec7f7de
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3588 passed
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment