using the host from the document.location

This commit is contained in:
Martin Donnelly 2016-11-23 20:56:11 +00:00
parent c2a8982250
commit daf022614a

View File

@ -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));