From 64838f78a6404f1d0845f53757b5d7b3e039a3f8 Mon Sep 17 00:00:00 2001 From: Blake Thomas Date: Sun, 28 Jun 2015 10:37:19 -0700 Subject: [PATCH] Update lifx.js to fix lightsOn/lightsOff issues Proper power value range is 0x0000 - 0xffff. --- lifx.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lifx.js b/lifx.js index 37cb3b6..6c4f0dc 100644 --- a/lifx.js +++ b/lifx.js @@ -207,12 +207,12 @@ Lifx.prototype.sendToOne = function(command, bulb) { // Turn lights on Lifx.prototype.lightsOn = function(bulb) { - this._sendToOneOrAll(packet.setPowerState({onoff:0xff, protocol: 0x1400}), bulb); + this._sendToOneOrAll(packet.setPowerState({onoff:0xffff}), bulb); }; // Turn lights off Lifx.prototype.lightsOff = function(bulb) { - this._sendToOneOrAll(packet.setPowerState({onoff:0, protocol: 0x1400}), bulb); + this._sendToOneOrAll(packet.setPowerState({onoff:0}), bulb); }; // Set bulbs to a particular colour