mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-04 12:18:19 +00:00
Fix up Values Topic and Node Statistics JSON encoding
This commit is contained in:
parent
ce0022e4d2
commit
5e25c94bc0
2 changed files with 2 additions and 2 deletions
|
@ -261,7 +261,7 @@ void mqttpublisher::doStats() {
|
||||||
nsjson["routeTries"] = ns.routeTries; /**< The Number of attempts the Controller made to route the packet to the Node */
|
nsjson["routeTries"] = ns.routeTries; /**< The Number of attempts the Controller made to route the packet to the Node */
|
||||||
nsjson["lastFailedLinkFrom"] = ns.lastFailedLinkFrom; /**< The Last Failed Link From */
|
nsjson["lastFailedLinkFrom"] = ns.lastFailedLinkFrom; /**< The Last Failed Link From */
|
||||||
nsjson["lastFailedLinkTo"] = ns.lastFailedLinkTo; /**< The Last Failed Link To */
|
nsjson["lastFailedLinkTo"] = ns.lastFailedLinkTo; /**< The Last Failed Link To */
|
||||||
nodes[QString(NodeID)] = nsjson;
|
nodes[QString::number(NodeID)] = nsjson;
|
||||||
}
|
}
|
||||||
stats["Nodes"] = nodes;
|
stats["Nodes"] = nodes;
|
||||||
this->m_client->publish(QMqttTopicName(getTopic(MQTT_OZW_STATS_TOPIC)), QJsonDocument(stats).toJson(), 0, false);
|
this->m_client->publish(QMqttTopicName(getTopic(MQTT_OZW_STATS_TOPIC)), QJsonDocument(stats).toJson(), 0, false);
|
||||||
|
|
|
@ -17,7 +17,7 @@ class MqttCommands;
|
||||||
#define MQTT_OZW_STATS_TOPIC "statistics/"
|
#define MQTT_OZW_STATS_TOPIC "statistics/"
|
||||||
#define MQTT_OZW_STATUS_TOPIC "status/"
|
#define MQTT_OZW_STATUS_TOPIC "status/"
|
||||||
#define MQTT_OZW_NODE_TOPIC "node/%1/"
|
#define MQTT_OZW_NODE_TOPIC "node/%1/"
|
||||||
#define MQTT_OZW_VID_TOPIC "node/%1/%2/"
|
#define MQTT_OZW_VID_TOPIC "node/%1/values/%2/"
|
||||||
#define MQTT_OZW_COMMAND_TOPIC "command/%1/"
|
#define MQTT_OZW_COMMAND_TOPIC "command/%1/"
|
||||||
#define MQTT_OZW_RESPONSE_TOPIC "event/%1/"
|
#define MQTT_OZW_RESPONSE_TOPIC "event/%1/"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue