diff --git a/devices/outlet.js b/devices/outlet.js index 8ad3917d..927f5247 100755 --- a/devices/outlet.js +++ b/devices/outlet.js @@ -111,6 +111,9 @@ module.exports = function(RED) { RED.log.debug("OutletNode(updated): states = " + JSON.stringify(states)); this.updateStatusIcon(states); + + this.states.on = device.states.on; + this.states.online = device.states.online; let msg = { topic: this.topicOut, diff --git a/devices/thermostat.js b/devices/thermostat.js index f700d889..ee661b1c 100644 --- a/devices/thermostat.js +++ b/devices/thermostat.js @@ -48,6 +48,9 @@ module.exports = function(RED) { this.states = this.clientConn.register(this, 'thermostat', config.name); this.status({fill: "yellow", shape: "dot", text: "Ready"}); + + this.on('input', this.onInput); + this.on('close', this.onClose); } registerDevice(client, name) { @@ -91,7 +94,7 @@ module.exports = function(RED) { } updateStatusIcon(states) { - this.status({fill: "green", shape: "dot", text: states.thermostatTemperatureSetpoint + " °C"}); + this.status({fill: "green", shape: "dot", text: "T: " + states.thermostatTemperatureAmbient + " °C | S: " + states.thermostatTemperatureSetpoint + " °C"}); } /******************************************************************************************************************