Skip to content

Commit 9045467

Browse files
committed
corrections
1 parent b25c62d commit 9045467

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

homemon-server/homemon-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ mqttclient.on("connect", function() {
111111
var messageString = value.toString();
112112
// console.log (topic + " " + message.toString());
113113

114-
if (topic == "push/alert") {
114+
if (topic === "push/alert") {
115115
io.sockets.in("pushmessage").emit("data", { topic: message.toString() });
116116
}
117117

118-
if (topic == "jsonsensors") {
118+
if (topic === "jsonsensors") {
119119
// var messageData = JSON.parse(message.toString());
120120
//io.sockets.in("mqtt").emit("data", { topic: messageData.topic, value: messageData.value });
121121
}
@@ -143,7 +143,7 @@ mqttclient.on("connect", function() {
143143
name = names[topic].name;
144144
}
145145
messageString = value.toFixed(0);
146-
io.sockets.in("power").emit("data", { topic: topic, value: messageString, name: name1 });
146+
io.sockets.in("power").emit("data", { topic: topic, value: messageString, name: name });
147147
}
148148

149149
if (topic.beginsWith("sensors/power") || topic.beginsWith("rate/sensors/snmp/router/total")

0 commit comments

Comments
 (0)