From daf022614a511c6d00c1f109bfd4b4e9d6104bbe Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Wed, 23 Nov 2016 20:56:11 +0000 Subject: [PATCH] using the host from the document.location --- lib/mqtt/mqttClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mqtt/mqttClient.js b/lib/mqtt/mqttClient.js index 5fc7bc7..2c6d944 100644 --- a/lib/mqtt/mqttClient.js +++ b/lib/mqtt/mqttClient.js @@ -79,7 +79,7 @@ const mqttClient = function (events) { logger.info('LR temp:', this.livingRoom.temp); events.emit('sendIFTTT', mode); - const data = {id: 'temperature', data: {mode: mode, temp: this.livingRoom.temp}}; + const data = {id: 'temperature', data: {mode: globalMode, temp: this.livingRoom.temp}}; events.emit('sendSocket', data); setTimeout(this.fanTimer.bind(this), mod + 10); @@ -122,7 +122,7 @@ const mqttClient = function (events) { const d = new Date(); this.lastMsg = d.getTime(); - const data = {id: 'temperature', data: {mode: mode, temp: this.livingRoom.temp}}; + const data = {id: 'temperature', data: {mode: globalMode, temp: this.livingRoom.temp}}; events.emit('sendSocket', data); }.bind(this));