From d15a7efcaee2be5fd5c8396ecb178c69e5b3a868 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Sat, 14 Jul 2018 17:52:55 +0100 Subject: [PATCH] turned off debug message for light --- lib/light-controller.js | 1 + lib/mqtt-controller.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/light-controller.js b/lib/light-controller.js index 6c59772..85bbe3b 100644 --- a/lib/light-controller.js +++ b/lib/light-controller.js @@ -49,6 +49,7 @@ const LightController = function() { client.on('light-offline', light => { logger.debug(`Light: ${light.label} has gone offline`); + _this.emit(light.label.replace(' ', ''), light.status); }); diff --git a/lib/mqtt-controller.js b/lib/mqtt-controller.js index 4539e03..90bc3a6 100644 --- a/lib/mqtt-controller.js +++ b/lib/mqtt-controller.js @@ -19,7 +19,7 @@ const MqttController = function() { }); logger.debug('Trying to connect'); - this.client = mqtt.connect('mqtt://192.168.1.150', options); + this.client = mqtt.connect('mqtt://192.168.1.156', options); this.client.on('error', function(m) { logger.error(m);