Skip to content

Commit

Permalink
fix: add node id to node status payload (#499)
Browse files Browse the repository at this point in the history
* fix: add node id to node status payload

Fixes #492

* fix: lint issues
  • Loading branch information
robertsLando authored Feb 8, 2021
1 parent 8e3a4e3 commit bf8a545
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,12 @@ function onNodeStatus (node) {
if (this.config.payloadType === 2) {
data = node.ready
} else {
data = { time: Date.now(), value: node.ready, status: node.status }
data = {
time: Date.now(),
value: node.ready,
status: node.status,
nodeId: node.id
}
}

this.mqtt.publish(nodeTopic + '/status', data)
Expand Down

0 comments on commit bf8a545

Please sign in to comment.