From 5faecb67ed3c79982d732732f66a2223d0307d6f Mon Sep 17 00:00:00 2001 From: Arnd Brugman Date: Tue, 24 Feb 2015 09:12:44 +0100 Subject: [PATCH] Updated Docs to v0.9.6 --- Docs/huepi.Lightstate.html | 48 +++--- Docs/huepi.html | 294 +++++++++++++++++++++++++++++-------- Docs/huepi.js.html | 218 +++++++++++++++++---------- Docs/index.html | 2 +- 4 files changed, 400 insertions(+), 162 deletions(-) diff --git a/Docs/huepi.Lightstate.html b/Docs/huepi.Lightstate.html index 5e2ebc4..1708aa8 100644 --- a/Docs/huepi.Lightstate.html +++ b/Docs/huepi.Lightstate.html @@ -95,7 +95,7 @@

new Lightst
Source:
@@ -191,7 +191,7 @@

AlertLSel
Source:
@@ -269,7 +269,7 @@

AlertNoneSource:
@@ -347,7 +347,7 @@

AlertSelec
Source:
@@ -425,7 +425,7 @@

Effect
Source:
@@ -503,7 +503,7 @@

EffectNone<
Source:
@@ -581,7 +581,7 @@

GetSource:
@@ -681,7 +681,7 @@

OffSource:
@@ -759,7 +759,7 @@

OnSource:
@@ -886,7 +886,7 @@
Parameters:
Source:
@@ -972,7 +972,7 @@
Parameters:
- Range [2000..65000] for the 2012 lights + Range [2000..6500] for the 2012 lights @@ -1013,7 +1013,7 @@
Parameters:
Source:
@@ -1099,7 +1099,7 @@
Parameters:
- Micro Reciprocal Degree of Colortemperature (Ct = 100000 / Colortemperature) + Micro Reciprocal Degree of Colortemperature (Ct = 1000000 / Colortemperature) @@ -1140,7 +1140,7 @@
Parameters:
Source:
@@ -1267,7 +1267,7 @@
Parameters:
Source:
@@ -1440,7 +1440,7 @@
Parameters:
Source:
@@ -1526,7 +1526,7 @@
Parameters:
- Range [0..255] + Range [0..1] @@ -1549,7 +1549,7 @@
Parameters:
- Range [0..255] + Range [0..1] @@ -1572,7 +1572,7 @@
Parameters:
- Range [0..255] + Range [0..1] @@ -1613,7 +1613,7 @@
Parameters:
Source:
@@ -1740,7 +1740,7 @@
Parameters:
Source:
@@ -1867,7 +1867,7 @@
Parameters:
Source:
@@ -2017,7 +2017,7 @@
Parameters:
Source:
@@ -2065,7 +2065,7 @@

Home

Classes

  • diff --git a/Docs/huepi.html b/Docs/huepi.html index 9ceb1a1..bccc504 100644 --- a/Docs/huepi.html +++ b/Docs/huepi.html @@ -1017,7 +1017,7 @@

    Methods

    -

    (static) HelperCTtoRGB(Temperature) → {object}

    +

    (static) HelperColortemperaturetoRGB(Temperature) → {object}

    @@ -1062,7 +1062,7 @@
    Parameters:
    -numer +number @@ -1113,7 +1113,7 @@
    Parameters:
    Source:
    @@ -1140,7 +1140,7 @@
    Returns:
    - [Red, Green, Blue] ranges [0..255] [0..255] [0..255] + [Red, Green, Blue] ranges [0..1] [0..1] [0..1]
    @@ -1312,7 +1312,7 @@
    Parameters:
    Source:
    @@ -2046,7 +2046,7 @@
    Parameters:
    Source:
    @@ -2099,6 +2099,178 @@
    Returns:
    +

    (static) HelperXYtoRGB(x, y) → {object}

    + + + + + + + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +float + + + +
    y + + +float + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    Returns:
    + + +
    + [Red, Green, Blue] - Ranges [0..1] [0..1] [0..1] +
    + + + +
    +
    + Type +
    +
    + +object + + +
    +
    + + + + + + + + + +

    BridgeCreateUser()

    @@ -2509,7 +2681,7 @@
    Parameters:
    Source:
    @@ -2659,7 +2831,7 @@
    Parameters:
    Source:
    @@ -2809,7 +2981,7 @@
    Parameters:
    Source:
    @@ -2963,7 +3135,7 @@
    Parameters:
    Source:
    @@ -3090,7 +3262,7 @@
    Parameters:
    Source:
    @@ -3240,7 +3412,7 @@
    Parameters:
    Source:
    @@ -3390,7 +3562,7 @@
    Parameters:
    Source:
    @@ -3540,7 +3712,7 @@
    Parameters:
    Source:
    @@ -3690,7 +3862,7 @@
    Parameters:
    Source:
    @@ -3867,7 +4039,7 @@
    Parameters:
    Source:
    @@ -4035,7 +4207,7 @@
    Parameters:
    Source:
    @@ -4208,7 +4380,7 @@
    Parameters:
    Source:
    @@ -4381,7 +4553,7 @@
    Parameters:
    Source:
    @@ -4604,7 +4776,7 @@
    Parameters:
    Source:
    @@ -4777,7 +4949,7 @@
    Parameters:
    Source:
    @@ -4981,7 +5153,7 @@
    Parameters:
    Source:
    @@ -5135,7 +5307,7 @@
    Parameters:
    Source:
    @@ -5285,7 +5457,7 @@
    Parameters:
    Source:
    @@ -5389,7 +5561,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -5407,7 +5579,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -5425,7 +5597,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -5489,7 +5661,7 @@
    Parameters:
    Source:
    @@ -5657,7 +5829,7 @@
    Parameters:
    Source:
    @@ -5807,7 +5979,7 @@
    Parameters:
    Source:
    @@ -6003,7 +6175,7 @@
    Parameters:
    Source:
    @@ -6081,7 +6253,7 @@

    GroupsGe
    Source:
    @@ -6231,7 +6403,7 @@

    Parameters:
    Source:
    @@ -6381,7 +6553,7 @@
    Parameters:
    Source:
    @@ -6531,7 +6703,7 @@
    Parameters:
    Source:
    @@ -6681,7 +6853,7 @@
    Parameters:
    Source:
    @@ -6831,7 +7003,7 @@
    Parameters:
    Source:
    @@ -6981,7 +7153,7 @@
    Parameters:
    Source:
    @@ -7131,7 +7303,7 @@
    Parameters:
    Source:
    @@ -7299,7 +7471,7 @@
    Parameters:
    Source:
    @@ -7472,7 +7644,7 @@
    Parameters:
    Source:
    @@ -7645,7 +7817,7 @@
    Parameters:
    Source:
    @@ -7868,7 +8040,7 @@
    Parameters:
    Source:
    @@ -8041,7 +8213,7 @@
    Parameters:
    Source:
    @@ -8245,7 +8417,7 @@
    Parameters:
    Source:
    @@ -8395,7 +8567,7 @@
    Parameters:
    Source:
    @@ -8499,7 +8671,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -8517,7 +8689,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -8535,7 +8707,7 @@
    Parameters:
    - Range [0..255] + Range [0..1] @@ -8599,7 +8771,7 @@
    Parameters:
    Source:
    @@ -8767,7 +8939,7 @@
    Parameters:
    Source:
    @@ -8917,7 +9089,7 @@
    Parameters:
    Source:
    @@ -9113,7 +9285,7 @@
    Parameters:
    Source:
    @@ -9191,7 +9363,7 @@

    LightsGe
    Source:
    @@ -9269,7 +9441,7 @@

    LightsGet
    Source:
    @@ -9347,7 +9519,7 @@

    Lig
    Source:
    @@ -9507,7 +9679,7 @@

    RulesGetD
    Source:
    @@ -9585,7 +9757,7 @@

    ScenesGe
    Source:
    @@ -9663,7 +9835,7 @@

    Sched
    Source:
    @@ -9741,7 +9913,7 @@

    Sensors
    Source:
    @@ -9789,7 +9961,7 @@

    Home

    Classes

    • diff --git a/Docs/huepi.js.html b/Docs/huepi.js.html index fb6844e..369476a 100644 --- a/Docs/huepi.js.html +++ b/Docs/huepi.js.html @@ -90,7 +90,7 @@

      Source: huepi.js

      } //////////////////////////////////////////////////////////////////////////////// -// +// // Portal Functions // // @@ -187,7 +187,7 @@

      Source: huepi.js

      * @returns {object} [Ang, Sat, Bri] - Ranges [0..360] [0..1] [0..1] */ huepi.HelperRGBtoHueAngSatBri = function(Red, Green, Blue) -{ // Range 0..1, return .Ang (360), .Sat, .Brig +{ var Ang, Sat, Bri; var Min = Math.min(Red, Green, Blue); var Max = Math.max(Red, Green, Blue); @@ -272,12 +272,8 @@

      Source: huepi.js

      * @returns {object} [x, y] - Ranges [0..1] [0..1] */ huepi.HelperRGBtoXY = function(Red, Green, Blue) -{ // Range 0..1, return .x, .y - // Adjust to Light XY CIE - // https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/commit/f41091cf671e13fe8c32fcced12604cd31cceaf3 - // for details... - // - // Gamma Correct RGB +{ // Source: https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md + // Apply gamma correction if (Red > 0.04045) Red = Math.pow((Red + 0.055) / (1.055), 2.4); else @@ -290,18 +286,10 @@

      Source: huepi.js

      Blue = Math.pow((Blue + 0.055) / (1.055), 2.4); else Blue = Blue / 12.92; - // Translate to XYZ + // Wide gamut conversion D65 var X = Red * 0.649926 + Green * 0.103455 + Blue * 0.197109; var Y = Red * 0.234327 + Green * 0.743075 + Blue * 0.022598; var Z = Red * 0.000000 + Green * 0.053077 + Blue * 1.035763; - // - // http://www.everyhue.com/vanilla/discussion/comment/635 - // - // var X = 1.076450 * Red - 0.237662 * Green + 0.161212 * Blue; - // var Y = 0.410964 * Red + 0.554342 * Green + 0.034694 * Blue; - // var Z = -0.010954 * Red - 0.013389 * Green + 1.024343 * Blue; - - // // But we don't want Capital X,Y,Z you want lowercase [x,y] (called the color point) as per: if ((X + Y + Z) === 0) return {x: 0, y: 0}; @@ -317,16 +305,19 @@

      Source: huepi.js

      * @returns {object} [x, y] - Ranges [0..1] [0..1] */ huepi.HelperGamutXYforModel = function(Px, Py, Model) -{ // return .x, .y - // Check if point is inside Triangle for correct model of light - if (Model === 'LCT001') { // For the hue bulb the corners of the triangle are: - var PRed = {x: 0.6750, y: 0.3220}; - var PGreen = {x: 0.4091, y: 0.5180}; - var PBlue = {x: 0.1670, y: 0.0400}; - } else { // For LivingColors Bloom, Aura and Iris the triangle corners are: - var PRed = {x: 0.704, y: 0.296}; - var PGreen = {x: 0.2151, y: 0.7106}; - var PBlue = {x: 0.138, y: 0.08}; +{ + if (Model.slice(0, 3) === 'LCT') { // For the hue bulb the corners of the triangle are: + var PRed = {x: 0.674, y: 0.322}; + var PGreen = {x: 0.408, y: 0.517}; + var PBlue = {x: 0.168, y: 0.041}; + } else if ((Model.slice(0, 3) === 'LLC') || (Model.slice(0, 3) === 'LST')) { // For LivingColors Bloom, Aura and Iris the triangle corners are: + var PRed = {x: 0.703, y: 0.296}; + var PGreen = {x: 0.214, y: 0.709}; + var PBlue = {x: 0.139, y: 0.081}; + } else { // Default all values + var PRed = {x: 1.0, y: 0.0}; + var PGreen = {x: 0.0, y: 1.0}; + var PBlue = {x: 0.0, y: 0.0}; } var VBR = {x: PRed.x - PBlue.x, y: PRed.y - PBlue.y}; // Blue to Red @@ -379,10 +370,82 @@

      Source: huepi.js

      }; /** - * @param {numer} Temperature ranges [1000..66000] - * @returns {object} [Red, Green, Blue] ranges [0..255] [0..255] [0..255] + * @param {float} x + * @param {float} y + * @returns {object} [Red, Green, Blue] - Ranges [0..1] [0..1] [0..1] */ -huepi.HelperCTtoRGB = function(Temperature) +huepi.HelperXYtoRGB = function(x, y) +{ // Source: https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md + var z = 1.0 - x - y; + var Y = 1.0; + var X = (Y / y) * x; + var Z = (Y / y) * z; + // sRGB D65 conversion + var Red = X * 3.2406 - Y * 1.5372 - Z * 0.4986; + var Green = -X * 0.9689 + Y * 1.8758 + Z * 0.0415; + var Blue = X * 0.0557 - Y * 0.2040 + Z * 1.0570; + // Limit RGB on [0..1] + if (Red > Blue && Red > Green && Red > 1.0) { // Red is too big + Green = Green / Red; + Blue = Blue / Red; + Red = 1.0; + } + else if (Green > Blue && Green > Red && Green > 1.0) { // Green is too big + Red = Red / Green; + Blue = Blue / Green; + Green = 1.0; + } + else if (Blue > Red && Blue > Green && Blue > 1.0) { // Blue is too big + Red = Red / Blue; + Green = Green / Blue; + Blue = 1.0; + } + // Apply gamma correction + if (Red <= 0.0031308) { + Red = Red * 12.92; + } else { + Red = 1.055 * Math.pow(Red, (1.0 / 2.4)) - 0.055; + } + if (Green <= 0.0031308) { + Green = Green * 12.92; + } else { + Green = 1.055 * Math.pow(Green, (1.0 / 2.4)) - 0.055; + } + if (Blue <= 0.0031308) { + Blue = Blue * 12.92; + } else { + Blue = 1.055 * Math.pow(Blue, (1.0 / 2.4)) - 0.055; + } + // Limit RGB on [0..1] + if (Red > Blue && Red > Green) { // Red is biggest + if (Red > 1.0) { + Green = Green / Red; + Blue = Blue / Red; + Red = 1.0; + } + } + else if (Green > Blue && Green > Red) { // Green is biggest + if (Green > 1.0) { + Red = Red / Green; + Blue = Blue / Green; + Green = 1.0; + } + } + else if (Blue > Red && Blue > Green) { // Blue is biggest + if (Blue > 1.0) { + Red = Red / Blue; + Green = Green / Blue; + Blue = 1.0; + } + } + return {Red: Red, Green: Green, Blue: Blue}; +}; + +/** + * @param {number} Temperature ranges [1000..66000] + * @returns {object} [Red, Green, Blue] ranges [0..1] [0..1] [0..1] + */ +huepi.HelperColortemperaturetoRGB = function(Temperature) { // http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ var Red, Green, Blue; @@ -391,7 +454,7 @@

      Source: huepi.js

      Red = 255; else { Red = Temperature - 60; - Red = Math.round(329.698727466 * Math.pow(Red, -0.1332047592)); + Red = 329.698727466 * Math.pow(Red, -0.1332047592); if (Red < 0) Red = 0; if (Red > 255) @@ -399,7 +462,7 @@

      Source: huepi.js

      } if (Temperature <= 66) { Green = Temperature; - Green = Math.round(99.4708025861 * Math.log(Green) - 161.1195681661); + Green = 99.4708025861 * Math.log(Green) - 161.1195681661; if (Green < 0) Green = 0; if (Green > 255) @@ -419,14 +482,14 @@

      Source: huepi.js

      Blue = 0; else { Blue = Temperature - 10; - Blue = Math.round(138.5177312231 * Math.log(Blue) - 305.0447927307); + Blue = 138.5177312231 * Math.log(Blue) - 305.0447927307; if (Blue < 0) Blue = 0; if (Blue > 255) Blue = 255; } } - return {Red: Red, Green: Green, Blue: Blue}; + return {Red: Red/255, Green: Green/255, Blue: Blue/255}; }; /** @@ -484,33 +547,33 @@

      Source: huepi.js

      * @param {float} Brightness Range [0..255] */ this.SetHSB = function(Hue, Saturation, Brightness) { // Range 65535, 255, 255 - this.hue = Hue; - this.sat = Saturation; - this.bri = Brightness; + this.hue = Math.round(Hue); + this.sat = Math.round(Saturation); + this.bri = Math.round(Brightness); return this; }; /** * @param {number} Hue Range [0..65535] */ this.SetHue = function(Hue) { - this.hue = Hue; + this.hue = Math.round(Hue); return this; }; /** * @param {float} Saturation Range [0..255] */ this.SetSaturation = function(Saturation) { - this.sat = Saturation; + this.sat = Math.round(Saturation); return this; }; /** * @param {float} Brightness Range [0..255] */ this.SetBrightness = function(Brightness) { - this.bri = Brightness; + this.bri = Math.round(Brightness); return this; }; - /** + /** * @param {float} Ang Range [0..360] * @param {float} Sat Range [0..1] * @param {float} Bri Range [0..1] @@ -520,26 +583,26 @@

      Source: huepi.js

      while (Ang < 0) Ang = Ang + 360; Ang = Ang % 360; - return this.SetHSB(Math.round(Ang / 360 * 65535), Sat * 255, Bri * 255); + return this.SetHSB(Math.round(Ang / 360 * 65535), Math.round(Sat * 255), Math.round(Bri * 255)); }; /** - * @param {number} Red Range [0..255] - * @param {number} Green Range [0..255] - * @param {number} Blue Range [0..255] + * @param {number} Red Range [0..1] + * @param {number} Green Range [0..1] + * @param {number} Blue Range [0..1] */ - this.SetRGB = function(Red, Green, Blue) {// In RGB [0..255] - var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red / 255, Green / 255, Blue / 255); + this.SetRGB = function(Red, Green, Blue) { + var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red, Green, Blue); return this.SetHueAngSatBri(HueAngSatBri.Ang, HueAngSatBri.Sat, HueAngSatBri.Bri); }; /** - * @param {number} Ct Micro Reciprocal Degree of Colortemperature (Ct = 100000 / Colortemperature) + * @param {number} Ct Micro Reciprocal Degree of Colortemperature (Ct = 1000000 / Colortemperature) */ this.SetCT = function(Ct) { - this.ct = Ct; + this.ct = Math.round(Ct); return this; }; /** - * @param {number} Colortemperature Range [2000..65000] for the 2012 lights + * @param {number} Colortemperature Range [2000..6500] for the 2012 lights */ this.SetColortemperature = function(Colortemperature) { this.ct = Math.round((1000000 / Colortemperature)); // Kelvin to micro reciprocal degree @@ -547,7 +610,7 @@

      Source: huepi.js

      }; /** * @param {float} X - * @param {float} Y + * @param {float} Y */ this.SetXY = function(X, Y) { this.xy = [X, Y]; @@ -594,7 +657,7 @@

      Source: huepi.js

      this.transitiontime = Transitiontime; return this; }; - /** + /** * @returns {string} Stringified version of the content of LightState ready to be sent to the Bridge. */ this.Get = function() { @@ -766,25 +829,25 @@

      Source: huepi.js

      */ huepi.prototype.LightSetHueAngSatBri = function(LightNr, Ang, Sat, Bri, Transitiontime) { // In: Hue in Deg, Saturation, Brightness 0.0-1.0 Transform To Philips Hue Range... - if (Ang < 0) + while (Ang < 0) Ang = Ang + 360; Ang = Ang % 360; - return this.LightSetHSB(LightNr, Math.round(Ang / 360 * 65535), Sat * 255, Bri * 255, Transitiontime); + return this.LightSetHSB(LightNr, Ang / 360 * 65535, Sat * 255, Bri * 255, Transitiontime); }; /** * @param {number} LightNr - * @param Red Range [0..255] - * @param Green Range [0..255] - * @param Blue Range [0..255] + * @param Red Range [0..1] + * @param Green Range [0..1] + * @param Blue Range [0..1] * @param {number} Transitiontime optional */ -huepi.prototype.LightSetRGB = function(LightNr, Red, Green, Blue, Transitiontime) // 0-255;FF +huepi.prototype.LightSetRGB = function(LightNr, Red, Green, Blue, Transitiontime) { - var Point = huepi.HelperRGBtoXY(Red / 255, Green / 255, Blue / 255); - var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red / 255, Green / 255, Blue / 255); + var Point = huepi.HelperRGBtoXY(Red, Green, Blue); + var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red, Green, Blue); return $.when( - this.LightSetBrightness(Math.round(HueAngSatBri.Bri * 255)), + this.LightSetBrightness(HueAngSatBri.Bri * 255), this.LightSetXY(LightNr, Point.x, Point.y, Transitiontime) ); }; @@ -798,7 +861,7 @@

      Source: huepi.js

      { var Model = this.Lights[LightNr].modelid; if (Model !== 'LCT001') { // CT->RGB->XY to ignore Brightness in RGB - var Color = huepi.HelperCTtoRGB(1000000 / CT); + var Color = huepi.HelperColortemperaturetoRGB(1000000 / CT); var Point = huepi.HelperRGBtoXY(Color.Red, Color.Green, Color.Blue); return this.LightSetXY(LightNr, Point.x, Point.y, Transitiontime); } @@ -815,7 +878,7 @@

      Source: huepi.js

      */ huepi.prototype.LightSetColortemperature = function(LightNr, Colortemperature, Transitiontime) { - return this.LightSetCT(LightNr, Math.round(1000000 / Colortemperature), Transitiontime); + return this.LightSetCT(LightNr, 1000000 / Colortemperature, Transitiontime); }; /** @@ -918,7 +981,7 @@

      Source: huepi.js

      * @param {string} Name New name of the light Range [1..32] * @param {multiple} Lights LightNr or Array of Lights to Group */ -huepi.prototype.GroupCreate = function(Name, Lights) +huepi.prototype.GroupCreate = function(Name, Lights) { // POST /api/username/groups return $.ajax({ type: 'POST', @@ -1100,22 +1163,22 @@

      Source: huepi.js

      */ huepi.prototype.GroupSetHueAngSatBri = function(GroupNr, Ang, Sat, Bri, Transitiontime) { - if (Ang < 0) + while (Ang < 0) Ang = Ang + 360; Ang = Ang % 360; - return this.GroupSetHSB(GroupNr, Math.round(Ang / 360 * 65535), Sat * 255, Bri * 255, Transitiontime); + return this.GroupSetHSB(GroupNr, Ang / 360 * 65535, Sat * 255, Bri * 255, Transitiontime); }; /** * @param {number} GroupNr - * @param Red Range [0..255] - * @param Green Range [0..255] - * @param Blue Range [0..255] + * @param Red Range [0..1] + * @param Green Range [0..1] + * @param Blue Range [0..1] * @param {number} Transitiontime optional */ -huepi.prototype.GroupSetRGB = function(GroupNr, Red, Green, Blue, Transitiontime) // 0-255;FF +huepi.prototype.GroupSetRGB = function(GroupNr, Red, Green, Blue, Transitiontime) { - var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red / 255, Green / 255, Blue / 255); + var HueAngSatBri = huepi.HelperRGBtoHueAngSatBri(Red, Green, Blue); return this.GroupSetHueAngSatBri(GroupNr, HueAngSatBri.Ang, HueAngSatBri.Sat, HueAngSatBri.Bri, Transitiontime); }; @@ -1155,7 +1218,7 @@

      Source: huepi.js

      */ huepi.prototype.GroupSetColortemperature = function(GroupNr, Colortemperature, Transitiontime) { - return this.GroupSetCT(GroupNr, Math.round(1000000 / Colortemperature), Transitiontime); + return this.GroupSetCT(GroupNr, 1000000 / Colortemperature, Transitiontime); }; /** @@ -1373,14 +1436,14 @@

      Source: huepi.js

      // 0.61 // LightSetCT = CT->RGB->XY to ignore Brightness in RGB // changed " string to ' string -// +// // 0.62 // renamed // BridgeGet to BridgeGetData // GroupGet to GroupsGetData // LightGet to LightsGetData // UsernameWhitelisted to BridgeUsernameWhitelisted -// +// // 0.9 // Added detection of NodeJS // Added WORKING JQuery NodeJS if running on NodeJS @@ -1388,8 +1451,11 @@

      Source: huepi.js

      // // 0.95 // renamed HUEPI to huepi to be more complient with modules and actual hue product name -// // +// +// Renamed HelperCTtoRGB to HelperColortemperaturetoRG +// All Red, Green & Blue arguments ranges to [0..1] + @@ -1406,7 +1472,7 @@

      Home

      Classes