diff --git a/dist/index.d.ts b/dist/index.d.ts index 744e421..a5cca05 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -4,3 +4,5 @@ export * from "./lib/movie.js"; export * from "./lib/light.js"; export * from "./lib/interfaces.js"; export * from "./lib/discovery.js"; +export * from "./lib/fetchwrapper.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map new file mode 100644 index 0000000..2436abd --- /dev/null +++ b/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAA"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 880d85a..df667b5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5,3 +5,4 @@ export * from "./lib/movie.js"; export * from "./lib/light.js"; export * from "./lib/interfaces.js"; export * from "./lib/discovery.js"; +export * from "./lib/fetchwrapper.js"; diff --git a/dist/lib/discovery.d.ts b/dist/lib/discovery.d.ts index 166314c..7c1b814 100644 --- a/dist/lib/discovery.d.ts +++ b/dist/lib/discovery.d.ts @@ -22,3 +22,4 @@ export declare function discoverTwinklyDevices(timeout?: number): Promise; +//# sourceMappingURL=discovery.d.ts.map \ No newline at end of file diff --git a/dist/lib/discovery.d.ts.map b/dist/lib/discovery.d.ts.map new file mode 100644 index 0000000..89169a0 --- /dev/null +++ b/dist/lib/discovery.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/lib/discovery.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,SAAmB,GACzB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAsCrC;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,kBAY5C"} \ No newline at end of file diff --git a/dist/lib/fetchwrapper.d.ts b/dist/lib/fetchwrapper.d.ts index 6b176fe..389915c 100644 --- a/dist/lib/fetchwrapper.d.ts +++ b/dist/lib/fetchwrapper.d.ts @@ -1,4 +1,4 @@ -export default class FetchWrapper { +export declare class FetchWrapper { private baseURL; private timeout; defaults: FetchDefaults; @@ -20,3 +20,5 @@ export interface FetchDefaults { export interface FetchResponse extends Response { data?: any; } +export default FetchWrapper; +//# sourceMappingURL=fetchwrapper.d.ts.map \ No newline at end of file diff --git a/dist/lib/fetchwrapper.d.ts.map b/dist/lib/fetchwrapper.d.ts.map new file mode 100644 index 0000000..0db2eed --- /dev/null +++ b/dist/lib/fetchwrapper.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fetchwrapper.d.ts","sourceRoot":"","sources":["../../src/lib/fetchwrapper.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACjB,QAAQ,EAAE,aAAa,CAE5B;gBAEU,OAAO,SAAK,EAAE,OAAO,SAAO;IAKjC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIvC,OAAO,CAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,aAAa,CAAC;IAsBZ,GAAG,CACd,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,QAAQ,CAAC;IAIP,IAAI,CACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,EACT,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,aAAa,CAAC;IAKZ,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;IAOtD,GAAG,CACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,EACT,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,aAAa,CAAC;IASzB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,mBAAmB;CAK5B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/lib/fetchwrapper.js b/dist/lib/fetchwrapper.js index 1931bc8..39d4bb1 100644 --- a/dist/lib/fetchwrapper.js +++ b/dist/lib/fetchwrapper.js @@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -export default class FetchWrapper { +export class FetchWrapper { constructor(baseURL = "", timeout = 5000) { this.defaults = { headers: {}, @@ -88,3 +88,4 @@ export default class FetchWrapper { } } } +export default FetchWrapper; diff --git a/dist/lib/frame.d.ts b/dist/lib/frame.d.ts index 3c98007..4914bd0 100644 --- a/dist/lib/frame.d.ts +++ b/dist/lib/frame.d.ts @@ -1,4 +1,4 @@ -import { Led } from "./led.js"; +import type { Led } from "./led"; /** * A frame of LEDs, used when you wish to set color pixel by pixel * @@ -28,3 +28,4 @@ export declare class Frame { */ getNLeds(): number; } +//# sourceMappingURL=frame.d.ts.map \ No newline at end of file diff --git a/dist/lib/frame.d.ts.map b/dist/lib/frame.d.ts.map new file mode 100644 index 0000000..35572c3 --- /dev/null +++ b/dist/lib/frame.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/lib/frame.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;;;;;GAMG;AACH,qBAAa,KAAK;IAChB,IAAI,EAAE,GAAG,EAAE,CAAC;IAEZ;;;;;OAKG;gBACS,IAAI,EAAE,GAAG,EAAE;IAIvB;;;;OAIG;IACH,OAAO,IAAI,UAAU;IAYrB;;;;OAIG;IACH,QAAQ,IAAI,MAAM;CAGnB"} \ No newline at end of file diff --git a/dist/lib/frame.js b/dist/lib/frame.js index 26b5d40..7817e8d 100644 --- a/dist/lib/frame.js +++ b/dist/lib/frame.js @@ -21,12 +21,13 @@ export class Frame { * @returns {Uint8Array} */ toOctet() { - let buffer = new ArrayBuffer(this.leds.length * 3); - let output = new Uint8Array(buffer); + const channels = this.leds[0].type.length || 3; + const buffer = new ArrayBuffer(this.leds.length * channels); + const output = new Uint8Array(buffer); let offset = 0; this.leds.forEach((led) => { output.set(led.toOctet(), offset); - offset += 3; + offset += channels; }); return output; } diff --git a/dist/lib/interfaces.d.ts b/dist/lib/interfaces.d.ts index 021ee24..6619371 100644 --- a/dist/lib/interfaces.d.ts +++ b/dist/lib/interfaces.d.ts @@ -52,3 +52,4 @@ export interface layout { coordinates: coordinate[]; code: applicationResponseCode; } +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/dist/lib/interfaces.d.ts.map b/dist/lib/interfaces.d.ts.map new file mode 100644 index 0000000..67574ad --- /dev/null +++ b/dist/lib/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/lib/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,iBAAiB;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,QAAQ;IACvB,iBAAiB;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AACD,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,EAAE,OAAO;CACV;AACD,oBAAY,uBAAuB;IACjC,EAAE,OAAO;IACT,KAAK,OAAO;IACZ,oBAAoB,OAAO;IAC3B,YAAY,OAAO;IACnB,aAAa,OAAO;IACpB,kBAAkB,OAAO;IACzB,2BAA2B,OAAO;CACnC;AAED,MAAM,WAAW,KAAK;IACpB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,IAAI,EAAE,uBAAuB,CAAC;CAC/B"} \ No newline at end of file diff --git a/dist/lib/led.d.ts b/dist/lib/led.d.ts index 54e804d..5a762d6 100644 --- a/dist/lib/led.d.ts +++ b/dist/lib/led.d.ts @@ -9,6 +9,8 @@ export declare class Led { red: number; green: number; blue: number; + white?: number; + private _type; /** * Creates an instance of the Led class. * @@ -16,7 +18,25 @@ export declare class Led { * @param {number} green - Green value (0-255). * @param {number} blue - Blue value (0-255). */ - constructor(red: number, green: number, blue: number); + constructor(red: number, green: number, blue: number, white?: number); + /** + * Gets the LED type. + * @returns {'rgb'|'rgbw'} The LED type. + */ + get type(): 'rgb' | 'rgbw'; + /** + * Converts the LED to RGBW. + * + * @returns {Led} The updated Led instance. + */ + toRgbw(): this; + /** + * Converts the LED to RGB. + * + * @param {boolean} [preserveWhite] - If true, the white value will be preserved. + * @returns {Led} The updated Led instance. + */ + toRgb(preserveWhite?: boolean): this; /** * Converts the RGB values to a Uint8Array. * @@ -43,7 +63,7 @@ export declare class Led { * @param {number} blue - New blue value. * @returns {Led} The updated Led instance. */ - setColor(red: number, green: number, blue: number): this; + setColor(red: number, green: number, blue: number, white?: number): this; /** * Inverts the RGB values. * @@ -85,3 +105,4 @@ export declare class Led { */ desaturate(factor: number): this; } +//# sourceMappingURL=led.d.ts.map \ No newline at end of file diff --git a/dist/lib/led.d.ts.map b/dist/lib/led.d.ts.map new file mode 100644 index 0000000..c6d89c8 --- /dev/null +++ b/dist/lib/led.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"led.d.ts","sourceRoot":"","sources":["../../src/lib/led.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,qBAAa,GAAG;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,KAAK,CAAe;IAE5B;;;;;;OAMG;gBACS,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAQpE;;;OAGG;IACH,IAAI,IAAI,IAAI,KAAK,GAAG,MAAM,CAEzB;IAED;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAOd;;;;;OAKG;IACH,KAAK,CAAC,aAAa,UAAQ,GAAG,IAAI;IAalC;;;;OAIG;IACH,OAAO,IAAI,UAAU;IAQrB;;;;OAIG;IACH,IAAI,IAAI,OAAO;IAIf;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAQf;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAWxE;;;;OAIG;IACH,WAAW,IAAI,IAAI;IAQnB;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ9B;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQzB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAqB9B;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAQjC"} \ No newline at end of file diff --git a/dist/lib/led.js b/dist/lib/led.js index 764c9f6..f688177 100644 --- a/dist/lib/led.js +++ b/dist/lib/led.js @@ -13,10 +13,48 @@ export class Led { * @param {number} green - Green value (0-255). * @param {number} blue - Blue value (0-255). */ - constructor(red, green, blue) { + constructor(red, green, blue, white) { this.red = red; this.green = green; this.blue = blue; + this.white = white; + this._type = typeof white === 'number' ? 'rgbw' : 'rgb'; + } + /** + * Gets the LED type. + * @returns {'rgb'|'rgbw'} The LED type. + */ + get type() { + return this._type; + } + /** + * Converts the LED to RGBW. + * + * @returns {Led} The updated Led instance. + */ + toRgbw() { + if (this._type === 'rgbw') + return this; + this.white = 0; + this._type = 'rgbw'; + return this; + } + /** + * Converts the LED to RGB. + * + * @param {boolean} [preserveWhite] - If true, the white value will be preserved. + * @returns {Led} The updated Led instance. + */ + toRgb(preserveWhite = false) { + const white = this.white; + if (this._type === 'rgb') + return this; + this.white = undefined; + this._type = 'rgb'; + if (white && preserveWhite) { + this.brighten(white / 255); + } + return this; } /** * Converts the RGB values to a Uint8Array. @@ -24,7 +62,9 @@ export class Led { * @returns {Uint8Array} The RGB values in a Uint8Array format. */ toOctet() { - return new Uint8Array([this.red, this.green, this.blue]); + return new Uint8Array(this._type === 'rgbw' + ? [this.white, this.red, this.green, this.blue] + : [this.red, this.green, this.blue]); } /** * Checks if the LED color is turned on (non-zero). @@ -32,7 +72,7 @@ export class Led { * @returns {boolean} True if the LED is on, false otherwise. */ isOn() { - return this.red > 0 || this.green > 0 || this.blue > 0; + return this.red > 0 || this.green > 0 || this.blue > 0 || this.white > 0; } /** * Sets all RGB values to 0, turning the LED off. @@ -43,6 +83,7 @@ export class Led { this.red = 0; this.green = 0; this.blue = 0; + this._type === 'rgbw' && (this.white = 0); return this; } /** @@ -53,10 +94,14 @@ export class Led { * @param {number} blue - New blue value. * @returns {Led} The updated Led instance. */ - setColor(red, green, blue) { + setColor(red, green, blue, white) { this.red = red; this.green = green; this.blue = blue; + if (typeof white === 'number') { + this.white = white; + this._type = 'rgbw'; + } return this; } /** @@ -68,6 +113,7 @@ export class Led { this.red = 255 - this.red; this.green = 255 - this.green; this.blue = 255 - this.blue; + typeof this.white === 'number' && (this.white = 255 - this.white); return this; } /** @@ -76,7 +122,7 @@ export class Led { * @returns {string} String in the format 'rgb(r, g, b)'. */ toString() { - return `rgb(${this.red}, ${this.green}, ${this.blue})`; + return `${this._type}(${this.red}, ${this.green}, ${this.blue}, ${this.white})`; } /** * Brightens the LED color by a specified factor. @@ -88,6 +134,7 @@ export class Led { this.red = Math.min(255, Math.round(this.red * factor)); this.green = Math.min(255, Math.round(this.green * factor)); this.blue = Math.min(255, Math.round(this.blue * factor)); + this._type === 'rgbw' && (this.white = Math.min(255, Math.round((this.white || 0) * factor))); return this; } /** @@ -100,6 +147,7 @@ export class Led { this.red = Math.max(0, Math.round(this.red * factor)); this.green = Math.max(0, Math.round(this.green * factor)); this.blue = Math.max(0, Math.round(this.blue * factor)); + this._type === 'rgbw' && (this.white = Math.max(0, Math.round((this.white || 0) * factor))); return this; } /** @@ -113,6 +161,7 @@ export class Led { this.red = Math.min(255, Math.max(0, average + factor * (this.red - average))); this.green = Math.min(255, Math.max(0, average + factor * (this.green - average))); this.blue = Math.min(255, Math.max(0, average + factor * (this.blue - average))); + this._type === 'rgbw' && (this.white = Math.min(255, Math.max(0, average + factor * ((this.white || 0) - average)))); return this; } /** @@ -126,6 +175,7 @@ export class Led { this.red = this.red + factor * (average - this.red); this.green = this.green + factor * (average - this.green); this.blue = this.blue + factor * (average - this.blue); + this._type === 'rgbw' && (this.white = (this.white || 0) + factor * (average - (this.white || 0))); return this; } } diff --git a/dist/lib/light.d.ts b/dist/lib/light.d.ts index d69196c..b638fde 100644 --- a/dist/lib/light.d.ts +++ b/dist/lib/light.d.ts @@ -1,9 +1,9 @@ /// import { AxiosInstance, AxiosResponse } from "axios"; -import FetchWrapper, { FetchResponse } from "./fetchwrapper.js"; -import { Frame } from "./frame.js"; -import { Movie } from "./movie.js"; -import { rgbColor, hsvColor, deviceMode, timer, coordinate, layout } from "./interfaces.js"; +import { FetchWrapper, FetchResponse } from "./fetchwrapper"; +import { Frame } from "./frame"; +import { Movie } from "./movie"; +import { rgbColor, hsvColor, deviceMode, timer, coordinate, layout } from "./interfaces"; /** * Represents a Twinkly device * @public @@ -16,6 +16,7 @@ export declare class Light { token: AuthenticationToken | undefined; activeLoginCall: boolean; nleds: number | undefined; + name: string | undefined; udpClient: any; /** * Creates an instance of Light. @@ -354,3 +355,4 @@ export declare class OneColorFrame extends Frame { */ constructor(rgb: rgbColor, nleds: number); } +//# sourceMappingURL=light.d.ts.map \ No newline at end of file diff --git a/dist/lib/light.d.ts.map b/dist/lib/light.d.ts.map new file mode 100644 index 0000000..090482f --- /dev/null +++ b/dist/lib/light.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/lib/light.ts"],"names":[],"mappings":";AAEA,OAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EAEV,KAAK,EACL,UAAU,EACV,MAAM,EACP,MAAM,cAAc,CAAC;AAKtB;;;;GAIG;AACH,qBAAa,KAAK;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,aAAa,GAAG,YAAY,CAAC;IAClC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACvC,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,EAAE,GAAG,CAAC;IACf;;;;;OAKG;gBAED,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAc,EACvB,QAAQ,GAAE,OAAe;IAiC3B;;;;;OAKG;IACG,eAAe,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,GAAQ,EACd,WAAW,GAAE,MAA2B,GACvC,OAAO,CAAC,GAAG,CAAC;IAkBf;;;;;OAKG;IACG,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAc7D;;;;;OAKG;IACG,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,aAAa,GAAE,OAAc,GAC5B,OAAO,CAAC,GAAG,CAAC;IAcf;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B5B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAG7B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOvC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAc7B;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAerC;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAMzC;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAG7B;;;;OAIG;IACG,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAOhC;;;;;OAKG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1C;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC;IAIhC;;;;OAIG;IACG,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAG3C;;;;;;;OAOG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAkB,EACxB,IAAI,GAAE,MAAY,GACjB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAKtC;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAKtC;;;;;;OAMG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAkB,EACxB,IAAI,GAAE,MAAY,GACjB,OAAO,CAAC,IAAI,CAAC;IAQhB;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IAUtC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IAMtC;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzD;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjD;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAKpC;;;;OAIG;IACG,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAG9C;;;;;OAKG;IACG,eAAe,CAAC,KAAK,EAAE,KAAK;IAkBlC;;;;OAIG;IACG,cAAc;IAIpB;;;;;OAKG;IACG,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAQpC;;;;;OAKG;IACG,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAQpC;;;;;OAKG;IACG,oBAAoB,CAAC,KAAK,EAAE,KAAK;IAyBvC;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAOzC;;;;;OAKG;IACG,QAAQ,CAAC,KAAK,EAAE,KAAK;IAS3B;;;OAGG;IACG,YAAY;IAIlB;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAIlC;;;;;;;;;OASG;IACG,YAAY,CAChB,WAAW,EAAE,UAAU,EAAE,EACzB,MAAM,GAAE,MAAa,EACrB,WAAW,GAAE,OAAe,EAC5B,QAAQ,GAAE,MAAU,EACpB,QAAQ,GAAE,MAAU;IAWtB;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAOjC;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAItC;;;;;OAKG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIpD;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAIpC;;;;;OAKG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIvD;;;;OAIG;IACG,UAAU;IAIhB;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IAIxC;;;;;OAKG;IACG,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMlD;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;;;OAKG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAIxD;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;gBACS,GAAG,EAAE,aAAa,GAAG,aAAa;IAO9C;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,eAAe;IAIf;;;OAGG;IACH,oBAAoB,IAAI,MAAM;CAG/B;AAED;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC;;;;;;OAMG;gBACS,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;CAIzC"} \ No newline at end of file diff --git a/dist/lib/light.js b/dist/lib/light.js index ca1b6ef..6e155da 100644 --- a/dist/lib/light.js +++ b/dist/lib/light.js @@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; import { generateRandomHex } from "./utils.js"; import axios from "axios"; -import FetchWrapper from "./fetchwrapper.js"; +import { FetchWrapper } from "./fetchwrapper"; import delay from "delay"; // dynamically import udp for compatibility with browser // import * as udp from "node:dgram"; -import { Led } from "./led.js"; -import { Frame } from "./frame.js"; -import { Movie } from "./movie.js"; -import { deviceMode, applicationResponseCode, } from "./interfaces.js"; +import { Led } from "./led"; +import { Frame } from "./frame"; +import { Movie } from "./movie"; +import { deviceMode, applicationResponseCode, } from "./interfaces"; // create error let errNoToken = Error("No valid token"); /** @@ -239,8 +239,11 @@ export class Light { * @returns {Promise} Results vary, see https://xled-docs.readthedocs.io/en/latest/rest_api.html#device-details */ getDeviceDetails() { + var _a, _b; return __awaiter(this, void 0, void 0, function* () { let data = yield this.sendGetRequest("/gestalt", undefined, false); + (_a = this.nleds) !== null && _a !== void 0 ? _a : (this.nleds = data.number_of_led); + (_b = this.name) !== null && _b !== void 0 ? _b : (this.name = data.device_name); return data; }); } @@ -271,6 +274,8 @@ export class Light { */ getName() { return __awaiter(this, void 0, void 0, function* () { + if (this.name) + return this.name; let data = yield this.sendGetRequest("/device_name"); let res = data.name; return res; diff --git a/dist/lib/movie.d.ts b/dist/lib/movie.d.ts index dde310b..8242426 100644 --- a/dist/lib/movie.d.ts +++ b/dist/lib/movie.d.ts @@ -1,4 +1,4 @@ -import { Frame } from "./frame.js"; +import type { Frame } from "./frame"; export declare class Movie { id: number; name: string; @@ -9,7 +9,8 @@ export declare class Movie { frames_number: number; fps: number; frameData: Frame[]; - constructor(data: any); + private _channels; + constructor(data: Record); export(): { name: string; unique_id: string; @@ -22,3 +23,4 @@ export declare class Movie { toOctet(): Uint8Array; size(isCompressed?: boolean): number; } +//# sourceMappingURL=movie.d.ts.map \ No newline at end of file diff --git a/dist/lib/movie.d.ts.map b/dist/lib/movie.d.ts.map new file mode 100644 index 0000000..ea22acb --- /dev/null +++ b/dist/lib/movie.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"movie.d.ts","sourceRoot":"","sources":["../../src/lib/movie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,qBAAa,KAAK;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,KAAK,EAAE,CAAC;IAEnB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA4BrC,MAAM;;;;;;;;;IAYN,OAAO,IAAI,UAAU;IAsBrB,IAAI,CAAC,YAAY,GAAE,OAAe;CAenC"} \ No newline at end of file diff --git a/dist/lib/movie.js b/dist/lib/movie.js index e078b2f..c28e844 100644 --- a/dist/lib/movie.js +++ b/dist/lib/movie.js @@ -18,6 +18,7 @@ export class Movie { this.leds_per_frame = data.leds_per_frame || this.frameData[0].getNLeds(); this.frames_number = data.frames_number || this.frameData.length; this.fps = data.fps || 0; + this._channels = this.descriptor_type.startsWith("rgbw") ? 4 : 3; // Not used yet this.id = data.id || 0; this.loop_type = data.loop_type || 0; @@ -38,7 +39,7 @@ export class Movie { const frames = this.frameData; this.frames_number = frames.length; this.leds_per_frame = frames[0].getNLeds(); - const buffer = new ArrayBuffer(this.frames_number * this.leds_per_frame * 3); + const buffer = new ArrayBuffer(this.frames_number * this.leds_per_frame * this._channels); const output = new Uint8Array(buffer); frames.forEach((frame, index) => { if (frame.getNLeds() != this.leds_per_frame) @@ -46,7 +47,7 @@ export class Movie { // convert to octet let octet = frame.toOctet(); // add octet to output - let offset = index * this.leds_per_frame * 3; + let offset = index * this.leds_per_frame * this._channels; output.set(octet, offset); }); // this.frameData = output; @@ -58,12 +59,10 @@ export class Movie { this.frameData.forEach((frame) => { let leds = frame.leds; if (isCompressed) { - leds = frame.leds.filter((led) => { - return led.red != 0 && led.green != 0 && led.blue != 0; - }); + leds = frame.leds.filter((led) => led.red || led.green || led.blue || led.white); } let numNonBlackLeds = leds.length; - nBytes += numNonBlackLeds * 3; + nBytes += numNonBlackLeds * this._channels; }); return nBytes; } diff --git a/dist/lib/utils.d.ts b/dist/lib/utils.d.ts index e08cf27..09a10c4 100644 --- a/dist/lib/utils.d.ts +++ b/dist/lib/utils.d.ts @@ -1,2 +1,3 @@ declare let generateRandomHex: (bytes: any) => any; export { generateRandomHex }; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/dist/lib/utils.d.ts.map b/dist/lib/utils.d.ts.map new file mode 100644 index 0000000..d77d54e --- /dev/null +++ b/dist/lib/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,iBAAiB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAiC3C,OAAO,EAAE,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js index 4bd47a2..4c8fa61 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,7 +1,7 @@ "use strict"; "use strict";(()=>{var Se=Object.create;var re=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Te(e))!Qe.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=we(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?Se(ke(t)):{},Ie(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Pe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. `,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let r;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(r),r=setTimeout(()=>{e.classList.remove("visible"),r=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ce(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Oe(t,n,r,s)}function Oe(t,e,r,n){r.addEventListener("input",ie(()=>{Re(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Fe(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function _e(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function Re(t,e,r,n){if(_e(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Fe(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Me={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Me[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,De=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(De=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});})(); +`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});document.querySelectorAll("summary a").forEach(t=>{t.addEventListener("click",()=>{location.assign(t.href)})});})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/search.js b/docs/assets/search.js index b58a017..df95c12 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"rows\":[{\"kind\":128,\"name\":\"Led\",\"url\":\"classes/Led.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Led.html#constructor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"red\",\"url\":\"classes/Led.html#red\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"green\",\"url\":\"classes/Led.html#green\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"blue\",\"url\":\"classes/Led.html#blue\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Led.html#toOctet\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"isOn\",\"url\":\"classes/Led.html#isOn\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"turnOff\",\"url\":\"classes/Led.html#turnOff\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"setColor\",\"url\":\"classes/Led.html#setColor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"invertColor\",\"url\":\"classes/Led.html#invertColor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toString\",\"url\":\"classes/Led.html#toString\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"brighten\",\"url\":\"classes/Led.html#brighten\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"dim\",\"url\":\"classes/Led.html#dim\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"saturate\",\"url\":\"classes/Led.html#saturate\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"desaturate\",\"url\":\"classes/Led.html#desaturate\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":128,\"name\":\"Frame\",\"url\":\"classes/Frame.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Frame.html#constructor\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":1024,\"name\":\"leds\",\"url\":\"classes/Frame.html#leds\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Frame.html#toOctet\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/Frame.html#getNLeds\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":128,\"name\":\"Movie\",\"url\":\"classes/Movie.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Movie.html#constructor\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"classes/Movie.html#id\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"classes/Movie.html#name\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"unique_id\",\"url\":\"classes/Movie.html#unique_id\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"descriptor_type\",\"url\":\"classes/Movie.html#descriptor_type\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"loop_type\",\"url\":\"classes/Movie.html#loop_type\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"leds_per_frame\",\"url\":\"classes/Movie.html#leds_per_frame\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"frames_number\",\"url\":\"classes/Movie.html#frames_number\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"fps\",\"url\":\"classes/Movie.html#fps\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"frameData\",\"url\":\"classes/Movie.html#frameData\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":2048,\"name\":\"export\",\"url\":\"classes/Movie.html#export\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Movie.html#export.export-1.__type\",\"classes\":\"\",\"parent\":\"Movie.export.export\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"classes/Movie.html#export.export-1.__type.name-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"unique_id\",\"url\":\"classes/Movie.html#export.export-1.__type.unique_id-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"descriptor_type\",\"url\":\"classes/Movie.html#export.export-1.__type.descriptor_type-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"leds_per_frame\",\"url\":\"classes/Movie.html#export.export-1.__type.leds_per_frame-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"loop_type\",\"url\":\"classes/Movie.html#export.export-1.__type.loop_type-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"frames_number\",\"url\":\"classes/Movie.html#export.export-1.__type.frames_number-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"fps\",\"url\":\"classes/Movie.html#export.export-1.__type.fps-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Movie.html#toOctet\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":2048,\"name\":\"size\",\"url\":\"classes/Movie.html#size\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":128,\"name\":\"Light\",\"url\":\"classes/Light.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Light.html#constructor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"ipaddr\",\"url\":\"classes/Light.html#ipaddr\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"challenge\",\"url\":\"classes/Light.html#challenge\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"net\",\"url\":\"classes/Light.html#net\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"classes/Light.html#token\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"activeLoginCall\",\"url\":\"classes/Light.html#activeLoginCall\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"nleds\",\"url\":\"classes/Light.html#nleds\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"udpClient\",\"url\":\"classes/Light.html#udpClient\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"autoEndLoginCall\",\"url\":\"classes/Light.html#autoEndLoginCall\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"login\",\"url\":\"classes/Light.html#login\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"logout\",\"url\":\"classes/Light.html#logout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"verify\",\"url\":\"classes/Light.html#verify\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"ensureLoggedIn\",\"url\":\"classes/Light.html#ensureLoggedIn\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getDeviceDetails\",\"url\":\"classes/Light.html#getDeviceDetails\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setOff\",\"url\":\"classes/Light.html#setOff\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setState\",\"url\":\"classes/Light.html#setState\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getName\",\"url\":\"classes/Light.html#getName\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setName\",\"url\":\"classes/Light.html#setName\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getTimer\",\"url\":\"classes/Light.html#getTimer\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setTimer\",\"url\":\"classes/Light.html#setTimer\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setBrightness\",\"url\":\"classes/Light.html#setBrightness\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getBrightness\",\"url\":\"classes/Light.html#getBrightness\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getSaturation\",\"url\":\"classes/Light.html#getSaturation\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setSaturation\",\"url\":\"classes/Light.html#setSaturation\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getHSVColor\",\"url\":\"classes/Light.html#getHSVColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getRGBColor\",\"url\":\"classes/Light.html#getRGBColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setRGBColor\",\"url\":\"classes/Light.html#setRGBColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setRGBColorRealTime\",\"url\":\"classes/Light.html#setRGBColorRealTime\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setHSVColor\",\"url\":\"classes/Light.html#setHSVColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMode\",\"url\":\"classes/Light.html#getMode\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setMode\",\"url\":\"classes/Light.html#setMode\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendPostRequest\",\"url\":\"classes/Light.html#sendPostRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendDeleteRequest\",\"url\":\"classes/Light.html#sendDeleteRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendGetRequest\",\"url\":\"classes/Light.html#sendGetRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendMovieConfig\",\"url\":\"classes/Light.html#sendMovieConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMovieConfig\",\"url\":\"classes/Light.html#getMovieConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendMovieToDevice\",\"url\":\"classes/Light.html#sendMovieToDevice\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendRealTimeFrame\",\"url\":\"classes/Light.html#sendRealTimeFrame\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendRealTimeFrameUDP\",\"url\":\"classes/Light.html#sendRealTimeFrameUDP\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getListOfMovies\",\"url\":\"classes/Light.html#getListOfMovies\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"addMovie\",\"url\":\"classes/Light.html#addMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"deleteMovies\",\"url\":\"classes/Light.html#deleteMovies\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getLayout\",\"url\":\"classes/Light.html#getLayout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"uploadLayout\",\"url\":\"classes/Light.html#uploadLayout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/Light.html#getNLeds\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMqttConfig\",\"url\":\"classes/Light.html#getMqttConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setMqttConfig\",\"url\":\"classes/Light.html#setMqttConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getPlaylist\",\"url\":\"classes/Light.html#getPlaylist\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"createPlaylist\",\"url\":\"classes/Light.html#createPlaylist\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getSummary\",\"url\":\"classes/Light.html#getSummary\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getCurrentMovie\",\"url\":\"classes/Light.html#getCurrentMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setCurrentMovie\",\"url\":\"classes/Light.html#setCurrentMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getNetworkStatus\",\"url\":\"classes/Light.html#getNetworkStatus\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setNetworkStatus\",\"url\":\"classes/Light.html#setNetworkStatus\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":128,\"name\":\"AuthenticationToken\",\"url\":\"classes/AuthenticationToken.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AuthenticationToken.html#constructor\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"classes/AuthenticationToken.html#token\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"expiry\",\"url\":\"classes/AuthenticationToken.html#expiry\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"challengeResponse\",\"url\":\"classes/AuthenticationToken.html#challengeResponse\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getToken\",\"url\":\"classes/AuthenticationToken.html#getToken\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getTokenDecoded\",\"url\":\"classes/AuthenticationToken.html#getTokenDecoded\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getChallengeResponse\",\"url\":\"classes/AuthenticationToken.html#getChallengeResponse\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":128,\"name\":\"OneColorFrame\",\"url\":\"classes/OneColorFrame.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/OneColorFrame.html#constructor\",\"classes\":\"\",\"parent\":\"OneColorFrame\"},{\"kind\":1024,\"name\":\"leds\",\"url\":\"classes/OneColorFrame.html#leds\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/OneColorFrame.html#toOctet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/OneColorFrame.html#getNLeds\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":256,\"name\":\"rgbColor\",\"url\":\"interfaces/rgbColor.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"red\",\"url\":\"interfaces/rgbColor.html#red\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":1024,\"name\":\"green\",\"url\":\"interfaces/rgbColor.html#green\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":1024,\"name\":\"blue\",\"url\":\"interfaces/rgbColor.html#blue\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":256,\"name\":\"hsvColor\",\"url\":\"interfaces/hsvColor.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"hue\",\"url\":\"interfaces/hsvColor.html#hue\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":1024,\"name\":\"saturation\",\"url\":\"interfaces/hsvColor.html#saturation\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":1024,\"name\":\"value\",\"url\":\"interfaces/hsvColor.html#value\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":8,\"name\":\"deviceMode\",\"url\":\"enums/deviceMode.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"demo\",\"url\":\"enums/deviceMode.html#demo\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"color\",\"url\":\"enums/deviceMode.html#color\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"off\",\"url\":\"enums/deviceMode.html#off\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"effect\",\"url\":\"enums/deviceMode.html#effect\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"movie\",\"url\":\"enums/deviceMode.html#movie\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"playlist\",\"url\":\"enums/deviceMode.html#playlist\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"rt\",\"url\":\"enums/deviceMode.html#rt\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":8,\"name\":\"applicationResponseCode\",\"url\":\"enums/applicationResponseCode.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Ok\",\"url\":\"enums/applicationResponseCode.html#Ok\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"error\",\"url\":\"enums/applicationResponseCode.html#error\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"invalidArgumentValue\",\"url\":\"enums/applicationResponseCode.html#invalidArgumentValue\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"valueTooLong\",\"url\":\"enums/applicationResponseCode.html#valueTooLong\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"malformedJSON\",\"url\":\"enums/applicationResponseCode.html#malformedJSON\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"invalidArgumentKey\",\"url\":\"enums/applicationResponseCode.html#invalidArgumentKey\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"firmwareUpgradeSHA1SUMerror\",\"url\":\"enums/applicationResponseCode.html#firmwareUpgradeSHA1SUMerror\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":256,\"name\":\"timer\",\"url\":\"interfaces/timer.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"time_now\",\"url\":\"interfaces/timer.html#time_now\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":1024,\"name\":\"time_on\",\"url\":\"interfaces/timer.html#time_on\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":1024,\"name\":\"time_off\",\"url\":\"interfaces/timer.html#time_off\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":256,\"name\":\"coordinate\",\"url\":\"interfaces/coordinate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"x\",\"url\":\"interfaces/coordinate.html#x\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":1024,\"name\":\"y\",\"url\":\"interfaces/coordinate.html#y\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":1024,\"name\":\"z\",\"url\":\"interfaces/coordinate.html#z\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":256,\"name\":\"layout\",\"url\":\"interfaces/layout.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"source\",\"url\":\"interfaces/layout.html#source\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"synthesized\",\"url\":\"interfaces/layout.html#synthesized\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"uuid\",\"url\":\"interfaces/layout.html#uuid\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"coordinates\",\"url\":\"interfaces/layout.html#coordinates\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"code\",\"url\":\"interfaces/layout.html#code\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":64,\"name\":\"discoverTwinklyDevices\",\"url\":\"functions/discoverTwinklyDevices.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"handleDiscoveredDevices\",\"url\":\"functions/handleDiscoveredDevices.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"TwinklyDevice\",\"url\":\"interfaces/TwinklyDevice.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"ip\",\"url\":\"interfaces/TwinklyDevice.html#ip\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"},{\"kind\":1024,\"name\":\"deviceId\",\"url\":\"interfaces/TwinklyDevice.html#deviceId\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"},{\"kind\":1024,\"name\":\"code\",\"url\":\"interfaces/TwinklyDevice.html#code\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,46.38]],[\"comment/0\",[]],[\"name/1\",[1,31.716]],[\"comment/1\",[]],[\"name/2\",[2,41.271]],[\"comment/2\",[]],[\"name/3\",[3,41.271]],[\"comment/3\",[]],[\"name/4\",[4,41.271]],[\"comment/4\",[]],[\"name/5\",[5,35.393]],[\"comment/5\",[]],[\"name/6\",[6,46.38]],[\"comment/6\",[]],[\"name/7\",[7,46.38]],[\"comment/7\",[]],[\"name/8\",[8,46.38]],[\"comment/8\",[]],[\"name/9\",[9,46.38]],[\"comment/9\",[]],[\"name/10\",[10,46.38]],[\"comment/10\",[]],[\"name/11\",[11,46.38]],[\"comment/11\",[]],[\"name/12\",[12,46.38]],[\"comment/12\",[]],[\"name/13\",[13,46.38]],[\"comment/13\",[]],[\"name/14\",[14,46.38]],[\"comment/14\",[]],[\"name/15\",[15,46.38]],[\"comment/15\",[]],[\"name/16\",[1,31.716]],[\"comment/16\",[]],[\"name/17\",[16,41.271]],[\"comment/17\",[]],[\"name/18\",[5,35.393]],[\"comment/18\",[]],[\"name/19\",[17,37.907]],[\"comment/19\",[]],[\"name/20\",[18,41.271]],[\"comment/20\",[]],[\"name/21\",[1,31.716]],[\"comment/21\",[]],[\"name/22\",[19,46.38]],[\"comment/22\",[]],[\"name/23\",[20,41.271]],[\"comment/23\",[]],[\"name/24\",[21,41.271]],[\"comment/24\",[]],[\"name/25\",[22,41.271]],[\"comment/25\",[]],[\"name/26\",[23,41.271]],[\"comment/26\",[]],[\"name/27\",[24,41.271]],[\"comment/27\",[]],[\"name/28\",[25,41.271]],[\"comment/28\",[]],[\"name/29\",[26,41.271]],[\"comment/29\",[]],[\"name/30\",[27,46.38]],[\"comment/30\",[]],[\"name/31\",[28,46.38]],[\"comment/31\",[]],[\"name/32\",[29,46.38]],[\"comment/32\",[]],[\"name/33\",[20,41.271]],[\"comment/33\",[]],[\"name/34\",[21,41.271]],[\"comment/34\",[]],[\"name/35\",[22,41.271]],[\"comment/35\",[]],[\"name/36\",[24,41.271]],[\"comment/36\",[]],[\"name/37\",[23,41.271]],[\"comment/37\",[]],[\"name/38\",[25,41.271]],[\"comment/38\",[]],[\"name/39\",[26,41.271]],[\"comment/39\",[]],[\"name/40\",[5,35.393]],[\"comment/40\",[]],[\"name/41\",[30,46.38]],[\"comment/41\",[]],[\"name/42\",[31,46.38]],[\"comment/42\",[]],[\"name/43\",[1,31.716]],[\"comment/43\",[]],[\"name/44\",[32,46.38]],[\"comment/44\",[]],[\"name/45\",[33,46.38]],[\"comment/45\",[]],[\"name/46\",[34,46.38]],[\"comment/46\",[]],[\"name/47\",[35,41.271]],[\"comment/47\",[]],[\"name/48\",[36,46.38]],[\"comment/48\",[]],[\"name/49\",[37,46.38]],[\"comment/49\",[]],[\"name/50\",[38,46.38]],[\"comment/50\",[]],[\"name/51\",[39,46.38]],[\"comment/51\",[]],[\"name/52\",[40,46.38]],[\"comment/52\",[]],[\"name/53\",[41,46.38]],[\"comment/53\",[]],[\"name/54\",[42,46.38]],[\"comment/54\",[]],[\"name/55\",[43,46.38]],[\"comment/55\",[]],[\"name/56\",[44,46.38]],[\"comment/56\",[]],[\"name/57\",[45,46.38]],[\"comment/57\",[]],[\"name/58\",[46,46.38]],[\"comment/58\",[]],[\"name/59\",[47,46.38]],[\"comment/59\",[]],[\"name/60\",[48,46.38]],[\"comment/60\",[]],[\"name/61\",[49,46.38]],[\"comment/61\",[]],[\"name/62\",[50,46.38]],[\"comment/62\",[]],[\"name/63\",[51,46.38]],[\"comment/63\",[]],[\"name/64\",[52,46.38]],[\"comment/64\",[]],[\"name/65\",[53,46.38]],[\"comment/65\",[]],[\"name/66\",[54,46.38]],[\"comment/66\",[]],[\"name/67\",[55,46.38]],[\"comment/67\",[]],[\"name/68\",[56,46.38]],[\"comment/68\",[]],[\"name/69\",[57,46.38]],[\"comment/69\",[]],[\"name/70\",[58,46.38]],[\"comment/70\",[]],[\"name/71\",[59,46.38]],[\"comment/71\",[]],[\"name/72\",[60,46.38]],[\"comment/72\",[]],[\"name/73\",[61,46.38]],[\"comment/73\",[]],[\"name/74\",[62,46.38]],[\"comment/74\",[]],[\"name/75\",[63,46.38]],[\"comment/75\",[]],[\"name/76\",[64,46.38]],[\"comment/76\",[]],[\"name/77\",[65,46.38]],[\"comment/77\",[]],[\"name/78\",[66,46.38]],[\"comment/78\",[]],[\"name/79\",[67,46.38]],[\"comment/79\",[]],[\"name/80\",[68,46.38]],[\"comment/80\",[]],[\"name/81\",[69,46.38]],[\"comment/81\",[]],[\"name/82\",[70,46.38]],[\"comment/82\",[]],[\"name/83\",[71,46.38]],[\"comment/83\",[]],[\"name/84\",[72,46.38]],[\"comment/84\",[]],[\"name/85\",[73,46.38]],[\"comment/85\",[]],[\"name/86\",[74,46.38]],[\"comment/86\",[]],[\"name/87\",[17,37.907]],[\"comment/87\",[]],[\"name/88\",[75,46.38]],[\"comment/88\",[]],[\"name/89\",[76,46.38]],[\"comment/89\",[]],[\"name/90\",[77,46.38]],[\"comment/90\",[]],[\"name/91\",[78,46.38]],[\"comment/91\",[]],[\"name/92\",[79,46.38]],[\"comment/92\",[]],[\"name/93\",[80,46.38]],[\"comment/93\",[]],[\"name/94\",[81,46.38]],[\"comment/94\",[]],[\"name/95\",[82,46.38]],[\"comment/95\",[]],[\"name/96\",[83,46.38]],[\"comment/96\",[]],[\"name/97\",[84,46.38]],[\"comment/97\",[]],[\"name/98\",[1,31.716]],[\"comment/98\",[]],[\"name/99\",[35,41.271]],[\"comment/99\",[]],[\"name/100\",[85,46.38]],[\"comment/100\",[]],[\"name/101\",[86,46.38]],[\"comment/101\",[]],[\"name/102\",[87,46.38]],[\"comment/102\",[]],[\"name/103\",[88,46.38]],[\"comment/103\",[]],[\"name/104\",[89,46.38]],[\"comment/104\",[]],[\"name/105\",[90,46.38]],[\"comment/105\",[]],[\"name/106\",[1,31.716]],[\"comment/106\",[]],[\"name/107\",[16,41.271]],[\"comment/107\",[]],[\"name/108\",[5,35.393]],[\"comment/108\",[]],[\"name/109\",[17,37.907]],[\"comment/109\",[]],[\"name/110\",[91,46.38]],[\"comment/110\",[]],[\"name/111\",[2,41.271]],[\"comment/111\",[]],[\"name/112\",[3,41.271]],[\"comment/112\",[]],[\"name/113\",[4,41.271]],[\"comment/113\",[]],[\"name/114\",[92,46.38]],[\"comment/114\",[]],[\"name/115\",[93,46.38]],[\"comment/115\",[]],[\"name/116\",[94,46.38]],[\"comment/116\",[]],[\"name/117\",[95,46.38]],[\"comment/117\",[]],[\"name/118\",[96,46.38]],[\"comment/118\",[]],[\"name/119\",[97,46.38]],[\"comment/119\",[]],[\"name/120\",[98,46.38]],[\"comment/120\",[]],[\"name/121\",[99,46.38]],[\"comment/121\",[]],[\"name/122\",[100,46.38]],[\"comment/122\",[]],[\"name/123\",[18,41.271]],[\"comment/123\",[]],[\"name/124\",[101,46.38]],[\"comment/124\",[]],[\"name/125\",[102,46.38]],[\"comment/125\",[]],[\"name/126\",[103,46.38]],[\"comment/126\",[]],[\"name/127\",[104,46.38]],[\"comment/127\",[]],[\"name/128\",[105,46.38]],[\"comment/128\",[]],[\"name/129\",[106,46.38]],[\"comment/129\",[]],[\"name/130\",[107,46.38]],[\"comment/130\",[]],[\"name/131\",[108,46.38]],[\"comment/131\",[]],[\"name/132\",[109,46.38]],[\"comment/132\",[]],[\"name/133\",[110,46.38]],[\"comment/133\",[]],[\"name/134\",[111,46.38]],[\"comment/134\",[]],[\"name/135\",[112,46.38]],[\"comment/135\",[]],[\"name/136\",[113,46.38]],[\"comment/136\",[]],[\"name/137\",[114,46.38]],[\"comment/137\",[]],[\"name/138\",[115,46.38]],[\"comment/138\",[]],[\"name/139\",[116,46.38]],[\"comment/139\",[]],[\"name/140\",[117,46.38]],[\"comment/140\",[]],[\"name/141\",[118,46.38]],[\"comment/141\",[]],[\"name/142\",[119,46.38]],[\"comment/142\",[]],[\"name/143\",[120,46.38]],[\"comment/143\",[]],[\"name/144\",[121,46.38]],[\"comment/144\",[]],[\"name/145\",[122,46.38]],[\"comment/145\",[]],[\"name/146\",[123,46.38]],[\"comment/146\",[]],[\"name/147\",[124,41.271]],[\"comment/147\",[]],[\"name/148\",[125,46.38]],[\"comment/148\",[]],[\"name/149\",[126,46.38]],[\"comment/149\",[]],[\"name/150\",[127,46.38]],[\"comment/150\",[]],[\"name/151\",[128,46.38]],[\"comment/151\",[]],[\"name/152\",[129,46.38]],[\"comment/152\",[]],[\"name/153\",[124,41.271]],[\"comment/153\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":29,\"name\":{\"32\":{}},\"comment\":{}}],[\"activelogincall\",{\"_index\":36,\"name\":{\"48\":{}},\"comment\":{}}],[\"addmovie\",{\"_index\":71,\"name\":{\"83\":{}},\"comment\":{}}],[\"applicationresponsecode\",{\"_index\":103,\"name\":{\"126\":{}},\"comment\":{}}],[\"authenticationtoken\",{\"_index\":84,\"name\":{\"97\":{}},\"comment\":{}}],[\"autoendlogincall\",{\"_index\":39,\"name\":{\"51\":{}},\"comment\":{}}],[\"blue\",{\"_index\":4,\"name\":{\"4\":{},\"113\":{}},\"comment\":{}}],[\"brighten\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"challenge\",{\"_index\":33,\"name\":{\"45\":{}},\"comment\":{}}],[\"challengeresponse\",{\"_index\":86,\"name\":{\"101\":{}},\"comment\":{}}],[\"code\",{\"_index\":124,\"name\":{\"147\":{},\"153\":{}},\"comment\":{}}],[\"color\",{\"_index\":98,\"name\":{\"120\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":1,\"name\":{\"1\":{},\"16\":{},\"21\":{},\"43\":{},\"98\":{},\"106\":{}},\"comment\":{}}],[\"coordinate\",{\"_index\":115,\"name\":{\"138\":{}},\"comment\":{}}],[\"coordinates\",{\"_index\":123,\"name\":{\"146\":{}},\"comment\":{}}],[\"createplaylist\",{\"_index\":78,\"name\":{\"91\":{}},\"comment\":{}}],[\"deletemovies\",{\"_index\":72,\"name\":{\"84\":{}},\"comment\":{}}],[\"demo\",{\"_index\":97,\"name\":{\"119\":{}},\"comment\":{}}],[\"desaturate\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"descriptor_type\",{\"_index\":22,\"name\":{\"25\":{},\"35\":{}},\"comment\":{}}],[\"deviceid\",{\"_index\":129,\"name\":{\"152\":{}},\"comment\":{}}],[\"devicemode\",{\"_index\":96,\"name\":{\"118\":{}},\"comment\":{}}],[\"dim\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"discovertwinklydevices\",{\"_index\":125,\"name\":{\"148\":{}},\"comment\":{}}],[\"effect\",{\"_index\":100,\"name\":{\"122\":{}},\"comment\":{}}],[\"ensureloggedin\",{\"_index\":43,\"name\":{\"55\":{}},\"comment\":{}}],[\"error\",{\"_index\":105,\"name\":{\"128\":{}},\"comment\":{}}],[\"expiry\",{\"_index\":85,\"name\":{\"100\":{}},\"comment\":{}}],[\"export\",{\"_index\":28,\"name\":{\"31\":{}},\"comment\":{}}],[\"firmwareupgradesha1sumerror\",{\"_index\":110,\"name\":{\"133\":{}},\"comment\":{}}],[\"fps\",{\"_index\":26,\"name\":{\"29\":{},\"39\":{}},\"comment\":{}}],[\"frame\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"framedata\",{\"_index\":27,\"name\":{\"30\":{}},\"comment\":{}}],[\"frames_number\",{\"_index\":25,\"name\":{\"28\":{},\"38\":{}},\"comment\":{}}],[\"getbrightness\",{\"_index\":52,\"name\":{\"64\":{}},\"comment\":{}}],[\"getchallengeresponse\",{\"_index\":89,\"name\":{\"104\":{}},\"comment\":{}}],[\"getcurrentmovie\",{\"_index\":80,\"name\":{\"93\":{}},\"comment\":{}}],[\"getdevicedetails\",{\"_index\":44,\"name\":{\"56\":{}},\"comment\":{}}],[\"gethsvcolor\",{\"_index\":55,\"name\":{\"67\":{}},\"comment\":{}}],[\"getlayout\",{\"_index\":73,\"name\":{\"85\":{}},\"comment\":{}}],[\"getlistofmovies\",{\"_index\":70,\"name\":{\"82\":{}},\"comment\":{}}],[\"getmode\",{\"_index\":60,\"name\":{\"72\":{}},\"comment\":{}}],[\"getmovieconfig\",{\"_index\":66,\"name\":{\"78\":{}},\"comment\":{}}],[\"getmqttconfig\",{\"_index\":75,\"name\":{\"88\":{}},\"comment\":{}}],[\"getname\",{\"_index\":47,\"name\":{\"59\":{}},\"comment\":{}}],[\"getnetworkstatus\",{\"_index\":82,\"name\":{\"95\":{}},\"comment\":{}}],[\"getnleds\",{\"_index\":17,\"name\":{\"19\":{},\"87\":{},\"109\":{}},\"comment\":{}}],[\"getplaylist\",{\"_index\":77,\"name\":{\"90\":{}},\"comment\":{}}],[\"getrgbcolor\",{\"_index\":56,\"name\":{\"68\":{}},\"comment\":{}}],[\"getsaturation\",{\"_index\":53,\"name\":{\"65\":{}},\"comment\":{}}],[\"getsummary\",{\"_index\":79,\"name\":{\"92\":{}},\"comment\":{}}],[\"gettimer\",{\"_index\":49,\"name\":{\"61\":{}},\"comment\":{}}],[\"gettoken\",{\"_index\":87,\"name\":{\"102\":{}},\"comment\":{}}],[\"gettokendecoded\",{\"_index\":88,\"name\":{\"103\":{}},\"comment\":{}}],[\"green\",{\"_index\":3,\"name\":{\"3\":{},\"112\":{}},\"comment\":{}}],[\"handlediscovereddevices\",{\"_index\":126,\"name\":{\"149\":{}},\"comment\":{}}],[\"hsvcolor\",{\"_index\":92,\"name\":{\"114\":{}},\"comment\":{}}],[\"hue\",{\"_index\":93,\"name\":{\"115\":{}},\"comment\":{}}],[\"id\",{\"_index\":19,\"name\":{\"22\":{}},\"comment\":{}}],[\"invalidargumentkey\",{\"_index\":109,\"name\":{\"132\":{}},\"comment\":{}}],[\"invalidargumentvalue\",{\"_index\":106,\"name\":{\"129\":{}},\"comment\":{}}],[\"invertcolor\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"ip\",{\"_index\":128,\"name\":{\"151\":{}},\"comment\":{}}],[\"ipaddr\",{\"_index\":32,\"name\":{\"44\":{}},\"comment\":{}}],[\"ison\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"layout\",{\"_index\":119,\"name\":{\"142\":{}},\"comment\":{}}],[\"led\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"leds\",{\"_index\":16,\"name\":{\"17\":{},\"107\":{}},\"comment\":{}}],[\"leds_per_frame\",{\"_index\":24,\"name\":{\"27\":{},\"36\":{}},\"comment\":{}}],[\"light\",{\"_index\":31,\"name\":{\"42\":{}},\"comment\":{}}],[\"login\",{\"_index\":40,\"name\":{\"52\":{}},\"comment\":{}}],[\"logout\",{\"_index\":41,\"name\":{\"53\":{}},\"comment\":{}}],[\"loop_type\",{\"_index\":23,\"name\":{\"26\":{},\"37\":{}},\"comment\":{}}],[\"malformedjson\",{\"_index\":108,\"name\":{\"131\":{}},\"comment\":{}}],[\"movie\",{\"_index\":18,\"name\":{\"20\":{},\"123\":{}},\"comment\":{}}],[\"name\",{\"_index\":20,\"name\":{\"23\":{},\"33\":{}},\"comment\":{}}],[\"net\",{\"_index\":34,\"name\":{\"46\":{}},\"comment\":{}}],[\"nleds\",{\"_index\":37,\"name\":{\"49\":{}},\"comment\":{}}],[\"off\",{\"_index\":99,\"name\":{\"121\":{}},\"comment\":{}}],[\"ok\",{\"_index\":104,\"name\":{\"127\":{}},\"comment\":{}}],[\"onecolorframe\",{\"_index\":90,\"name\":{\"105\":{}},\"comment\":{}}],[\"playlist\",{\"_index\":101,\"name\":{\"124\":{}},\"comment\":{}}],[\"red\",{\"_index\":2,\"name\":{\"2\":{},\"111\":{}},\"comment\":{}}],[\"rgbcolor\",{\"_index\":91,\"name\":{\"110\":{}},\"comment\":{}}],[\"rt\",{\"_index\":102,\"name\":{\"125\":{}},\"comment\":{}}],[\"saturate\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"saturation\",{\"_index\":94,\"name\":{\"116\":{}},\"comment\":{}}],[\"senddeleterequest\",{\"_index\":63,\"name\":{\"75\":{}},\"comment\":{}}],[\"sendgetrequest\",{\"_index\":64,\"name\":{\"76\":{}},\"comment\":{}}],[\"sendmovieconfig\",{\"_index\":65,\"name\":{\"77\":{}},\"comment\":{}}],[\"sendmovietodevice\",{\"_index\":67,\"name\":{\"79\":{}},\"comment\":{}}],[\"sendpostrequest\",{\"_index\":62,\"name\":{\"74\":{}},\"comment\":{}}],[\"sendrealtimeframe\",{\"_index\":68,\"name\":{\"80\":{}},\"comment\":{}}],[\"sendrealtimeframeudp\",{\"_index\":69,\"name\":{\"81\":{}},\"comment\":{}}],[\"setbrightness\",{\"_index\":51,\"name\":{\"63\":{}},\"comment\":{}}],[\"setcolor\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"setcurrentmovie\",{\"_index\":81,\"name\":{\"94\":{}},\"comment\":{}}],[\"sethsvcolor\",{\"_index\":59,\"name\":{\"71\":{}},\"comment\":{}}],[\"setmode\",{\"_index\":61,\"name\":{\"73\":{}},\"comment\":{}}],[\"setmqttconfig\",{\"_index\":76,\"name\":{\"89\":{}},\"comment\":{}}],[\"setname\",{\"_index\":48,\"name\":{\"60\":{}},\"comment\":{}}],[\"setnetworkstatus\",{\"_index\":83,\"name\":{\"96\":{}},\"comment\":{}}],[\"setoff\",{\"_index\":45,\"name\":{\"57\":{}},\"comment\":{}}],[\"setrgbcolor\",{\"_index\":57,\"name\":{\"69\":{}},\"comment\":{}}],[\"setrgbcolorrealtime\",{\"_index\":58,\"name\":{\"70\":{}},\"comment\":{}}],[\"setsaturation\",{\"_index\":54,\"name\":{\"66\":{}},\"comment\":{}}],[\"setstate\",{\"_index\":46,\"name\":{\"58\":{}},\"comment\":{}}],[\"settimer\",{\"_index\":50,\"name\":{\"62\":{}},\"comment\":{}}],[\"size\",{\"_index\":30,\"name\":{\"41\":{}},\"comment\":{}}],[\"source\",{\"_index\":120,\"name\":{\"143\":{}},\"comment\":{}}],[\"synthesized\",{\"_index\":121,\"name\":{\"144\":{}},\"comment\":{}}],[\"time_now\",{\"_index\":112,\"name\":{\"135\":{}},\"comment\":{}}],[\"time_off\",{\"_index\":114,\"name\":{\"137\":{}},\"comment\":{}}],[\"time_on\",{\"_index\":113,\"name\":{\"136\":{}},\"comment\":{}}],[\"timer\",{\"_index\":111,\"name\":{\"134\":{}},\"comment\":{}}],[\"token\",{\"_index\":35,\"name\":{\"47\":{},\"99\":{}},\"comment\":{}}],[\"tooctet\",{\"_index\":5,\"name\":{\"5\":{},\"18\":{},\"40\":{},\"108\":{}},\"comment\":{}}],[\"tostring\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"turnoff\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"twinklydevice\",{\"_index\":127,\"name\":{\"150\":{}},\"comment\":{}}],[\"udpclient\",{\"_index\":38,\"name\":{\"50\":{}},\"comment\":{}}],[\"unique_id\",{\"_index\":21,\"name\":{\"24\":{},\"34\":{}},\"comment\":{}}],[\"uploadlayout\",{\"_index\":74,\"name\":{\"86\":{}},\"comment\":{}}],[\"uuid\",{\"_index\":122,\"name\":{\"145\":{}},\"comment\":{}}],[\"value\",{\"_index\":95,\"name\":{\"117\":{}},\"comment\":{}}],[\"valuetoolong\",{\"_index\":107,\"name\":{\"130\":{}},\"comment\":{}}],[\"verify\",{\"_index\":42,\"name\":{\"54\":{}},\"comment\":{}}],[\"x\",{\"_index\":116,\"name\":{\"139\":{}},\"comment\":{}}],[\"y\",{\"_index\":117,\"name\":{\"140\":{}},\"comment\":{}}],[\"z\",{\"_index\":118,\"name\":{\"141\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"rows\":[{\"kind\":128,\"name\":\"Led\",\"url\":\"classes/Led.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Led.html#constructor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"red\",\"url\":\"classes/Led.html#red\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"green\",\"url\":\"classes/Led.html#green\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"blue\",\"url\":\"classes/Led.html#blue\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"white\",\"url\":\"classes/Led.html#white\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":1024,\"name\":\"_type\",\"url\":\"classes/Led.html#_type\",\"classes\":\"tsd-is-private\",\"parent\":\"Led\"},{\"kind\":262144,\"name\":\"type\",\"url\":\"classes/Led.html#type\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toRgbw\",\"url\":\"classes/Led.html#toRgbw\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toRgb\",\"url\":\"classes/Led.html#toRgb\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Led.html#toOctet\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"isOn\",\"url\":\"classes/Led.html#isOn\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"turnOff\",\"url\":\"classes/Led.html#turnOff\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"setColor\",\"url\":\"classes/Led.html#setColor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"invertColor\",\"url\":\"classes/Led.html#invertColor\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"toString\",\"url\":\"classes/Led.html#toString\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"brighten\",\"url\":\"classes/Led.html#brighten\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"dim\",\"url\":\"classes/Led.html#dim\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"saturate\",\"url\":\"classes/Led.html#saturate\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":2048,\"name\":\"desaturate\",\"url\":\"classes/Led.html#desaturate\",\"classes\":\"\",\"parent\":\"Led\"},{\"kind\":128,\"name\":\"Frame\",\"url\":\"classes/Frame.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Frame.html#constructor\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":1024,\"name\":\"leds\",\"url\":\"classes/Frame.html#leds\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Frame.html#toOctet\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/Frame.html#getNLeds\",\"classes\":\"\",\"parent\":\"Frame\"},{\"kind\":128,\"name\":\"Movie\",\"url\":\"classes/Movie.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Movie.html#constructor\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"classes/Movie.html#id\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"classes/Movie.html#name\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"unique_id\",\"url\":\"classes/Movie.html#unique_id\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"descriptor_type\",\"url\":\"classes/Movie.html#descriptor_type\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"loop_type\",\"url\":\"classes/Movie.html#loop_type\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"leds_per_frame\",\"url\":\"classes/Movie.html#leds_per_frame\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"frames_number\",\"url\":\"classes/Movie.html#frames_number\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"fps\",\"url\":\"classes/Movie.html#fps\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"frameData\",\"url\":\"classes/Movie.html#frameData\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":1024,\"name\":\"_channels\",\"url\":\"classes/Movie.html#_channels\",\"classes\":\"tsd-is-private\",\"parent\":\"Movie\"},{\"kind\":2048,\"name\":\"export\",\"url\":\"classes/Movie.html#export\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Movie.html#export.export-1.__type\",\"classes\":\"\",\"parent\":\"Movie.export.export\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"classes/Movie.html#export.export-1.__type.name-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"unique_id\",\"url\":\"classes/Movie.html#export.export-1.__type.unique_id-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"descriptor_type\",\"url\":\"classes/Movie.html#export.export-1.__type.descriptor_type-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"leds_per_frame\",\"url\":\"classes/Movie.html#export.export-1.__type.leds_per_frame-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"loop_type\",\"url\":\"classes/Movie.html#export.export-1.__type.loop_type-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"frames_number\",\"url\":\"classes/Movie.html#export.export-1.__type.frames_number-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":1024,\"name\":\"fps\",\"url\":\"classes/Movie.html#export.export-1.__type.fps-1\",\"classes\":\"\",\"parent\":\"Movie.export.export.__type\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/Movie.html#toOctet\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":2048,\"name\":\"size\",\"url\":\"classes/Movie.html#size\",\"classes\":\"\",\"parent\":\"Movie\"},{\"kind\":128,\"name\":\"Light\",\"url\":\"classes/Light.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Light.html#constructor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"ipaddr\",\"url\":\"classes/Light.html#ipaddr\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"challenge\",\"url\":\"classes/Light.html#challenge\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"net\",\"url\":\"classes/Light.html#net\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"classes/Light.html#token\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"activeLoginCall\",\"url\":\"classes/Light.html#activeLoginCall\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"nleds\",\"url\":\"classes/Light.html#nleds\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"classes/Light.html#name\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":1024,\"name\":\"udpClient\",\"url\":\"classes/Light.html#udpClient\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendPostRequest\",\"url\":\"classes/Light.html#sendPostRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendDeleteRequest\",\"url\":\"classes/Light.html#sendDeleteRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendGetRequest\",\"url\":\"classes/Light.html#sendGetRequest\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"login\",\"url\":\"classes/Light.html#login\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"logout\",\"url\":\"classes/Light.html#logout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"autoEndLoginCall\",\"url\":\"classes/Light.html#autoEndLoginCall\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"verify\",\"url\":\"classes/Light.html#verify\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"ensureLoggedIn\",\"url\":\"classes/Light.html#ensureLoggedIn\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getDeviceDetails\",\"url\":\"classes/Light.html#getDeviceDetails\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setOff\",\"url\":\"classes/Light.html#setOff\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setState\",\"url\":\"classes/Light.html#setState\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getName\",\"url\":\"classes/Light.html#getName\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setName\",\"url\":\"classes/Light.html#setName\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getTimer\",\"url\":\"classes/Light.html#getTimer\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setTimer\",\"url\":\"classes/Light.html#setTimer\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setBrightness\",\"url\":\"classes/Light.html#setBrightness\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getBrightness\",\"url\":\"classes/Light.html#getBrightness\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getSaturation\",\"url\":\"classes/Light.html#getSaturation\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setSaturation\",\"url\":\"classes/Light.html#setSaturation\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getHSVColor\",\"url\":\"classes/Light.html#getHSVColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getRGBColor\",\"url\":\"classes/Light.html#getRGBColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setRGBColor\",\"url\":\"classes/Light.html#setRGBColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setRGBColorRealTime\",\"url\":\"classes/Light.html#setRGBColorRealTime\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setHSVColor\",\"url\":\"classes/Light.html#setHSVColor\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMode\",\"url\":\"classes/Light.html#getMode\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setMode\",\"url\":\"classes/Light.html#setMode\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendMovieConfig\",\"url\":\"classes/Light.html#sendMovieConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMovieConfig\",\"url\":\"classes/Light.html#getMovieConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendMovieToDevice\",\"url\":\"classes/Light.html#sendMovieToDevice\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendRealTimeFrame\",\"url\":\"classes/Light.html#sendRealTimeFrame\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"sendRealTimeFrameUDP\",\"url\":\"classes/Light.html#sendRealTimeFrameUDP\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getListOfMovies\",\"url\":\"classes/Light.html#getListOfMovies\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"addMovie\",\"url\":\"classes/Light.html#addMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"deleteMovies\",\"url\":\"classes/Light.html#deleteMovies\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getLayout\",\"url\":\"classes/Light.html#getLayout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"uploadLayout\",\"url\":\"classes/Light.html#uploadLayout\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/Light.html#getNLeds\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getMqttConfig\",\"url\":\"classes/Light.html#getMqttConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setMqttConfig\",\"url\":\"classes/Light.html#setMqttConfig\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getPlaylist\",\"url\":\"classes/Light.html#getPlaylist\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"createPlaylist\",\"url\":\"classes/Light.html#createPlaylist\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getSummary\",\"url\":\"classes/Light.html#getSummary\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getCurrentMovie\",\"url\":\"classes/Light.html#getCurrentMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setCurrentMovie\",\"url\":\"classes/Light.html#setCurrentMovie\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"getNetworkStatus\",\"url\":\"classes/Light.html#getNetworkStatus\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":2048,\"name\":\"setNetworkStatus\",\"url\":\"classes/Light.html#setNetworkStatus\",\"classes\":\"\",\"parent\":\"Light\"},{\"kind\":128,\"name\":\"AuthenticationToken\",\"url\":\"classes/AuthenticationToken.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AuthenticationToken.html#constructor\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"classes/AuthenticationToken.html#token\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"expiry\",\"url\":\"classes/AuthenticationToken.html#expiry\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":1024,\"name\":\"challengeResponse\",\"url\":\"classes/AuthenticationToken.html#challengeResponse\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getToken\",\"url\":\"classes/AuthenticationToken.html#getToken\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getTokenDecoded\",\"url\":\"classes/AuthenticationToken.html#getTokenDecoded\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":2048,\"name\":\"getChallengeResponse\",\"url\":\"classes/AuthenticationToken.html#getChallengeResponse\",\"classes\":\"\",\"parent\":\"AuthenticationToken\"},{\"kind\":128,\"name\":\"OneColorFrame\",\"url\":\"classes/OneColorFrame.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/OneColorFrame.html#constructor\",\"classes\":\"\",\"parent\":\"OneColorFrame\"},{\"kind\":1024,\"name\":\"leds\",\"url\":\"classes/OneColorFrame.html#leds\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":2048,\"name\":\"toOctet\",\"url\":\"classes/OneColorFrame.html#toOctet\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":2048,\"name\":\"getNLeds\",\"url\":\"classes/OneColorFrame.html#getNLeds\",\"classes\":\"tsd-is-inherited\",\"parent\":\"OneColorFrame\"},{\"kind\":256,\"name\":\"rgbColor\",\"url\":\"interfaces/rgbColor.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"red\",\"url\":\"interfaces/rgbColor.html#red\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":1024,\"name\":\"green\",\"url\":\"interfaces/rgbColor.html#green\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":1024,\"name\":\"blue\",\"url\":\"interfaces/rgbColor.html#blue\",\"classes\":\"\",\"parent\":\"rgbColor\"},{\"kind\":256,\"name\":\"hsvColor\",\"url\":\"interfaces/hsvColor.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"hue\",\"url\":\"interfaces/hsvColor.html#hue\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":1024,\"name\":\"saturation\",\"url\":\"interfaces/hsvColor.html#saturation\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":1024,\"name\":\"value\",\"url\":\"interfaces/hsvColor.html#value\",\"classes\":\"\",\"parent\":\"hsvColor\"},{\"kind\":8,\"name\":\"deviceMode\",\"url\":\"enums/deviceMode.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"demo\",\"url\":\"enums/deviceMode.html#demo\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"color\",\"url\":\"enums/deviceMode.html#color\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"off\",\"url\":\"enums/deviceMode.html#off\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"effect\",\"url\":\"enums/deviceMode.html#effect\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"movie\",\"url\":\"enums/deviceMode.html#movie\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"playlist\",\"url\":\"enums/deviceMode.html#playlist\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":16,\"name\":\"rt\",\"url\":\"enums/deviceMode.html#rt\",\"classes\":\"\",\"parent\":\"deviceMode\"},{\"kind\":8,\"name\":\"applicationResponseCode\",\"url\":\"enums/applicationResponseCode.html\",\"classes\":\"\"},{\"kind\":16,\"name\":\"Ok\",\"url\":\"enums/applicationResponseCode.html#Ok\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"error\",\"url\":\"enums/applicationResponseCode.html#error\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"invalidArgumentValue\",\"url\":\"enums/applicationResponseCode.html#invalidArgumentValue\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"valueTooLong\",\"url\":\"enums/applicationResponseCode.html#valueTooLong\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"malformedJSON\",\"url\":\"enums/applicationResponseCode.html#malformedJSON\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"invalidArgumentKey\",\"url\":\"enums/applicationResponseCode.html#invalidArgumentKey\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":16,\"name\":\"firmwareUpgradeSHA1SUMerror\",\"url\":\"enums/applicationResponseCode.html#firmwareUpgradeSHA1SUMerror\",\"classes\":\"\",\"parent\":\"applicationResponseCode\"},{\"kind\":256,\"name\":\"timer\",\"url\":\"interfaces/timer.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"time_now\",\"url\":\"interfaces/timer.html#time_now\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":1024,\"name\":\"time_on\",\"url\":\"interfaces/timer.html#time_on\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":1024,\"name\":\"time_off\",\"url\":\"interfaces/timer.html#time_off\",\"classes\":\"\",\"parent\":\"timer\"},{\"kind\":256,\"name\":\"coordinate\",\"url\":\"interfaces/coordinate.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"x\",\"url\":\"interfaces/coordinate.html#x\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":1024,\"name\":\"y\",\"url\":\"interfaces/coordinate.html#y\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":1024,\"name\":\"z\",\"url\":\"interfaces/coordinate.html#z\",\"classes\":\"\",\"parent\":\"coordinate\"},{\"kind\":256,\"name\":\"layout\",\"url\":\"interfaces/layout.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"source\",\"url\":\"interfaces/layout.html#source\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"synthesized\",\"url\":\"interfaces/layout.html#synthesized\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"uuid\",\"url\":\"interfaces/layout.html#uuid\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"coordinates\",\"url\":\"interfaces/layout.html#coordinates\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":1024,\"name\":\"code\",\"url\":\"interfaces/layout.html#code\",\"classes\":\"\",\"parent\":\"layout\"},{\"kind\":64,\"name\":\"discoverTwinklyDevices\",\"url\":\"functions/discoverTwinklyDevices.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"handleDiscoveredDevices\",\"url\":\"functions/handleDiscoveredDevices.html\",\"classes\":\"\"},{\"kind\":256,\"name\":\"TwinklyDevice\",\"url\":\"interfaces/TwinklyDevice.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"ip\",\"url\":\"interfaces/TwinklyDevice.html#ip\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"},{\"kind\":1024,\"name\":\"deviceId\",\"url\":\"interfaces/TwinklyDevice.html#deviceId\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"},{\"kind\":1024,\"name\":\"code\",\"url\":\"interfaces/TwinklyDevice.html#code\",\"classes\":\"\",\"parent\":\"TwinklyDevice\"},{\"kind\":128,\"name\":\"FetchWrapper\",\"url\":\"classes/FetchWrapper.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/FetchWrapper.html#constructor\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":1024,\"name\":\"baseURL\",\"url\":\"classes/FetchWrapper.html#baseURL\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":1024,\"name\":\"timeout\",\"url\":\"classes/FetchWrapper.html#timeout\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":1024,\"name\":\"defaults\",\"url\":\"classes/FetchWrapper.html#defaults\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"addHeaders\",\"url\":\"classes/FetchWrapper.html#addHeaders\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"request\",\"url\":\"classes/FetchWrapper.html#request\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/FetchWrapper.html#get\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"post\",\"url\":\"classes/FetchWrapper.html#post\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"delete\",\"url\":\"classes/FetchWrapper.html#delete\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"put\",\"url\":\"classes/FetchWrapper.html#put\",\"classes\":\"\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"stringifyBodyIfJson\",\"url\":\"classes/FetchWrapper.html#stringifyBodyIfJson\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"createTimeoutPromise\",\"url\":\"classes/FetchWrapper.html#createTimeoutPromise\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"setHeaderIfJson\",\"url\":\"classes/FetchWrapper.html#setHeaderIfJson\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":2048,\"name\":\"handleResponseError\",\"url\":\"classes/FetchWrapper.html#handleResponseError\",\"classes\":\"tsd-is-private\",\"parent\":\"FetchWrapper\"},{\"kind\":256,\"name\":\"FetchDefaults\",\"url\":\"interfaces/FetchDefaults.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"interfaces/FetchDefaults.html#headers\",\"classes\":\"\",\"parent\":\"FetchDefaults\"},{\"kind\":256,\"name\":\"FetchResponse\",\"url\":\"interfaces/FetchResponse.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"interfaces/FetchResponse.html#data\",\"classes\":\"\",\"parent\":\"FetchResponse\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,47.93]],[\"comment/0\",[]],[\"name/1\",[1,31.836]],[\"comment/1\",[]],[\"name/2\",[2,42.822]],[\"comment/2\",[]],[\"name/3\",[3,42.822]],[\"comment/3\",[]],[\"name/4\",[4,42.822]],[\"comment/4\",[]],[\"name/5\",[5,47.93]],[\"comment/5\",[]],[\"name/6\",[6,47.93]],[\"comment/6\",[]],[\"name/7\",[7,47.93]],[\"comment/7\",[]],[\"name/8\",[8,47.93]],[\"comment/8\",[]],[\"name/9\",[9,47.93]],[\"comment/9\",[]],[\"name/10\",[10,36.944]],[\"comment/10\",[]],[\"name/11\",[11,47.93]],[\"comment/11\",[]],[\"name/12\",[12,47.93]],[\"comment/12\",[]],[\"name/13\",[13,47.93]],[\"comment/13\",[]],[\"name/14\",[14,47.93]],[\"comment/14\",[]],[\"name/15\",[15,47.93]],[\"comment/15\",[]],[\"name/16\",[16,47.93]],[\"comment/16\",[]],[\"name/17\",[17,47.93]],[\"comment/17\",[]],[\"name/18\",[18,47.93]],[\"comment/18\",[]],[\"name/19\",[19,47.93]],[\"comment/19\",[]],[\"name/20\",[20,47.93]],[\"comment/20\",[]],[\"name/21\",[1,31.836]],[\"comment/21\",[]],[\"name/22\",[21,42.822]],[\"comment/22\",[]],[\"name/23\",[10,36.944]],[\"comment/23\",[]],[\"name/24\",[22,39.457]],[\"comment/24\",[]],[\"name/25\",[23,42.822]],[\"comment/25\",[]],[\"name/26\",[1,31.836]],[\"comment/26\",[]],[\"name/27\",[24,47.93]],[\"comment/27\",[]],[\"name/28\",[25,39.457]],[\"comment/28\",[]],[\"name/29\",[26,42.822]],[\"comment/29\",[]],[\"name/30\",[27,42.822]],[\"comment/30\",[]],[\"name/31\",[28,42.822]],[\"comment/31\",[]],[\"name/32\",[29,42.822]],[\"comment/32\",[]],[\"name/33\",[30,42.822]],[\"comment/33\",[]],[\"name/34\",[31,42.822]],[\"comment/34\",[]],[\"name/35\",[32,47.93]],[\"comment/35\",[]],[\"name/36\",[33,47.93]],[\"comment/36\",[]],[\"name/37\",[34,47.93]],[\"comment/37\",[]],[\"name/38\",[35,47.93]],[\"comment/38\",[]],[\"name/39\",[25,39.457]],[\"comment/39\",[]],[\"name/40\",[26,42.822]],[\"comment/40\",[]],[\"name/41\",[27,42.822]],[\"comment/41\",[]],[\"name/42\",[29,42.822]],[\"comment/42\",[]],[\"name/43\",[28,42.822]],[\"comment/43\",[]],[\"name/44\",[30,42.822]],[\"comment/44\",[]],[\"name/45\",[31,42.822]],[\"comment/45\",[]],[\"name/46\",[10,36.944]],[\"comment/46\",[]],[\"name/47\",[36,47.93]],[\"comment/47\",[]],[\"name/48\",[37,47.93]],[\"comment/48\",[]],[\"name/49\",[1,31.836]],[\"comment/49\",[]],[\"name/50\",[38,47.93]],[\"comment/50\",[]],[\"name/51\",[39,47.93]],[\"comment/51\",[]],[\"name/52\",[40,47.93]],[\"comment/52\",[]],[\"name/53\",[41,42.822]],[\"comment/53\",[]],[\"name/54\",[42,47.93]],[\"comment/54\",[]],[\"name/55\",[43,47.93]],[\"comment/55\",[]],[\"name/56\",[25,39.457]],[\"comment/56\",[]],[\"name/57\",[44,47.93]],[\"comment/57\",[]],[\"name/58\",[45,47.93]],[\"comment/58\",[]],[\"name/59\",[46,47.93]],[\"comment/59\",[]],[\"name/60\",[47,47.93]],[\"comment/60\",[]],[\"name/61\",[48,47.93]],[\"comment/61\",[]],[\"name/62\",[49,47.93]],[\"comment/62\",[]],[\"name/63\",[50,47.93]],[\"comment/63\",[]],[\"name/64\",[51,47.93]],[\"comment/64\",[]],[\"name/65\",[52,47.93]],[\"comment/65\",[]],[\"name/66\",[53,47.93]],[\"comment/66\",[]],[\"name/67\",[54,47.93]],[\"comment/67\",[]],[\"name/68\",[55,47.93]],[\"comment/68\",[]],[\"name/69\",[56,47.93]],[\"comment/69\",[]],[\"name/70\",[57,47.93]],[\"comment/70\",[]],[\"name/71\",[58,47.93]],[\"comment/71\",[]],[\"name/72\",[59,47.93]],[\"comment/72\",[]],[\"name/73\",[60,47.93]],[\"comment/73\",[]],[\"name/74\",[61,47.93]],[\"comment/74\",[]],[\"name/75\",[62,47.93]],[\"comment/75\",[]],[\"name/76\",[63,47.93]],[\"comment/76\",[]],[\"name/77\",[64,47.93]],[\"comment/77\",[]],[\"name/78\",[65,47.93]],[\"comment/78\",[]],[\"name/79\",[66,47.93]],[\"comment/79\",[]],[\"name/80\",[67,47.93]],[\"comment/80\",[]],[\"name/81\",[68,47.93]],[\"comment/81\",[]],[\"name/82\",[69,47.93]],[\"comment/82\",[]],[\"name/83\",[70,47.93]],[\"comment/83\",[]],[\"name/84\",[71,47.93]],[\"comment/84\",[]],[\"name/85\",[72,47.93]],[\"comment/85\",[]],[\"name/86\",[73,47.93]],[\"comment/86\",[]],[\"name/87\",[74,47.93]],[\"comment/87\",[]],[\"name/88\",[75,47.93]],[\"comment/88\",[]],[\"name/89\",[76,47.93]],[\"comment/89\",[]],[\"name/90\",[77,47.93]],[\"comment/90\",[]],[\"name/91\",[78,47.93]],[\"comment/91\",[]],[\"name/92\",[79,47.93]],[\"comment/92\",[]],[\"name/93\",[80,47.93]],[\"comment/93\",[]],[\"name/94\",[22,39.457]],[\"comment/94\",[]],[\"name/95\",[81,47.93]],[\"comment/95\",[]],[\"name/96\",[82,47.93]],[\"comment/96\",[]],[\"name/97\",[83,47.93]],[\"comment/97\",[]],[\"name/98\",[84,47.93]],[\"comment/98\",[]],[\"name/99\",[85,47.93]],[\"comment/99\",[]],[\"name/100\",[86,47.93]],[\"comment/100\",[]],[\"name/101\",[87,47.93]],[\"comment/101\",[]],[\"name/102\",[88,47.93]],[\"comment/102\",[]],[\"name/103\",[89,47.93]],[\"comment/103\",[]],[\"name/104\",[90,47.93]],[\"comment/104\",[]],[\"name/105\",[1,31.836]],[\"comment/105\",[]],[\"name/106\",[41,42.822]],[\"comment/106\",[]],[\"name/107\",[91,47.93]],[\"comment/107\",[]],[\"name/108\",[92,47.93]],[\"comment/108\",[]],[\"name/109\",[93,47.93]],[\"comment/109\",[]],[\"name/110\",[94,47.93]],[\"comment/110\",[]],[\"name/111\",[95,47.93]],[\"comment/111\",[]],[\"name/112\",[96,47.93]],[\"comment/112\",[]],[\"name/113\",[1,31.836]],[\"comment/113\",[]],[\"name/114\",[21,42.822]],[\"comment/114\",[]],[\"name/115\",[10,36.944]],[\"comment/115\",[]],[\"name/116\",[22,39.457]],[\"comment/116\",[]],[\"name/117\",[97,47.93]],[\"comment/117\",[]],[\"name/118\",[2,42.822]],[\"comment/118\",[]],[\"name/119\",[3,42.822]],[\"comment/119\",[]],[\"name/120\",[4,42.822]],[\"comment/120\",[]],[\"name/121\",[98,47.93]],[\"comment/121\",[]],[\"name/122\",[99,47.93]],[\"comment/122\",[]],[\"name/123\",[100,47.93]],[\"comment/123\",[]],[\"name/124\",[101,47.93]],[\"comment/124\",[]],[\"name/125\",[102,47.93]],[\"comment/125\",[]],[\"name/126\",[103,47.93]],[\"comment/126\",[]],[\"name/127\",[104,47.93]],[\"comment/127\",[]],[\"name/128\",[105,47.93]],[\"comment/128\",[]],[\"name/129\",[106,47.93]],[\"comment/129\",[]],[\"name/130\",[23,42.822]],[\"comment/130\",[]],[\"name/131\",[107,47.93]],[\"comment/131\",[]],[\"name/132\",[108,47.93]],[\"comment/132\",[]],[\"name/133\",[109,47.93]],[\"comment/133\",[]],[\"name/134\",[110,47.93]],[\"comment/134\",[]],[\"name/135\",[111,47.93]],[\"comment/135\",[]],[\"name/136\",[112,47.93]],[\"comment/136\",[]],[\"name/137\",[113,47.93]],[\"comment/137\",[]],[\"name/138\",[114,47.93]],[\"comment/138\",[]],[\"name/139\",[115,47.93]],[\"comment/139\",[]],[\"name/140\",[116,47.93]],[\"comment/140\",[]],[\"name/141\",[117,47.93]],[\"comment/141\",[]],[\"name/142\",[118,47.93]],[\"comment/142\",[]],[\"name/143\",[119,47.93]],[\"comment/143\",[]],[\"name/144\",[120,47.93]],[\"comment/144\",[]],[\"name/145\",[121,47.93]],[\"comment/145\",[]],[\"name/146\",[122,47.93]],[\"comment/146\",[]],[\"name/147\",[123,47.93]],[\"comment/147\",[]],[\"name/148\",[124,47.93]],[\"comment/148\",[]],[\"name/149\",[125,47.93]],[\"comment/149\",[]],[\"name/150\",[126,47.93]],[\"comment/150\",[]],[\"name/151\",[127,47.93]],[\"comment/151\",[]],[\"name/152\",[128,47.93]],[\"comment/152\",[]],[\"name/153\",[129,47.93]],[\"comment/153\",[]],[\"name/154\",[130,42.822]],[\"comment/154\",[]],[\"name/155\",[131,47.93]],[\"comment/155\",[]],[\"name/156\",[132,47.93]],[\"comment/156\",[]],[\"name/157\",[133,47.93]],[\"comment/157\",[]],[\"name/158\",[134,47.93]],[\"comment/158\",[]],[\"name/159\",[135,47.93]],[\"comment/159\",[]],[\"name/160\",[130,42.822]],[\"comment/160\",[]],[\"name/161\",[136,47.93]],[\"comment/161\",[]],[\"name/162\",[1,31.836]],[\"comment/162\",[]],[\"name/163\",[137,47.93]],[\"comment/163\",[]],[\"name/164\",[138,47.93]],[\"comment/164\",[]],[\"name/165\",[139,47.93]],[\"comment/165\",[]],[\"name/166\",[140,47.93]],[\"comment/166\",[]],[\"name/167\",[141,47.93]],[\"comment/167\",[]],[\"name/168\",[142,47.93]],[\"comment/168\",[]],[\"name/169\",[143,47.93]],[\"comment/169\",[]],[\"name/170\",[144,47.93]],[\"comment/170\",[]],[\"name/171\",[145,47.93]],[\"comment/171\",[]],[\"name/172\",[146,47.93]],[\"comment/172\",[]],[\"name/173\",[147,47.93]],[\"comment/173\",[]],[\"name/174\",[148,47.93]],[\"comment/174\",[]],[\"name/175\",[149,47.93]],[\"comment/175\",[]],[\"name/176\",[150,47.93]],[\"comment/176\",[]],[\"name/177\",[151,47.93]],[\"comment/177\",[]],[\"name/178\",[152,47.93]],[\"comment/178\",[]],[\"name/179\",[153,47.93]],[\"comment/179\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":35,\"name\":{\"38\":{}},\"comment\":{}}],[\"_channels\",{\"_index\":33,\"name\":{\"36\":{}},\"comment\":{}}],[\"_type\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"activelogincall\",{\"_index\":42,\"name\":{\"54\":{}},\"comment\":{}}],[\"addheaders\",{\"_index\":140,\"name\":{\"166\":{}},\"comment\":{}}],[\"addmovie\",{\"_index\":77,\"name\":{\"90\":{}},\"comment\":{}}],[\"applicationresponsecode\",{\"_index\":109,\"name\":{\"133\":{}},\"comment\":{}}],[\"authenticationtoken\",{\"_index\":90,\"name\":{\"104\":{}},\"comment\":{}}],[\"autoendlogincall\",{\"_index\":50,\"name\":{\"63\":{}},\"comment\":{}}],[\"baseurl\",{\"_index\":137,\"name\":{\"163\":{}},\"comment\":{}}],[\"blue\",{\"_index\":4,\"name\":{\"4\":{},\"120\":{}},\"comment\":{}}],[\"brighten\",{\"_index\":16,\"name\":{\"16\":{}},\"comment\":{}}],[\"challenge\",{\"_index\":39,\"name\":{\"51\":{}},\"comment\":{}}],[\"challengeresponse\",{\"_index\":92,\"name\":{\"108\":{}},\"comment\":{}}],[\"code\",{\"_index\":130,\"name\":{\"154\":{},\"160\":{}},\"comment\":{}}],[\"color\",{\"_index\":104,\"name\":{\"127\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":1,\"name\":{\"1\":{},\"21\":{},\"26\":{},\"49\":{},\"105\":{},\"113\":{},\"162\":{}},\"comment\":{}}],[\"coordinate\",{\"_index\":121,\"name\":{\"145\":{}},\"comment\":{}}],[\"coordinates\",{\"_index\":129,\"name\":{\"153\":{}},\"comment\":{}}],[\"createplaylist\",{\"_index\":84,\"name\":{\"98\":{}},\"comment\":{}}],[\"createtimeoutpromise\",{\"_index\":147,\"name\":{\"173\":{}},\"comment\":{}}],[\"data\",{\"_index\":153,\"name\":{\"179\":{}},\"comment\":{}}],[\"defaults\",{\"_index\":139,\"name\":{\"165\":{}},\"comment\":{}}],[\"delete\",{\"_index\":144,\"name\":{\"170\":{}},\"comment\":{}}],[\"deletemovies\",{\"_index\":78,\"name\":{\"91\":{}},\"comment\":{}}],[\"demo\",{\"_index\":103,\"name\":{\"126\":{}},\"comment\":{}}],[\"desaturate\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"descriptor_type\",{\"_index\":27,\"name\":{\"30\":{},\"41\":{}},\"comment\":{}}],[\"deviceid\",{\"_index\":135,\"name\":{\"159\":{}},\"comment\":{}}],[\"devicemode\",{\"_index\":102,\"name\":{\"125\":{}},\"comment\":{}}],[\"dim\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"discovertwinklydevices\",{\"_index\":131,\"name\":{\"155\":{}},\"comment\":{}}],[\"effect\",{\"_index\":106,\"name\":{\"129\":{}},\"comment\":{}}],[\"ensureloggedin\",{\"_index\":52,\"name\":{\"65\":{}},\"comment\":{}}],[\"error\",{\"_index\":111,\"name\":{\"135\":{}},\"comment\":{}}],[\"expiry\",{\"_index\":91,\"name\":{\"107\":{}},\"comment\":{}}],[\"export\",{\"_index\":34,\"name\":{\"37\":{}},\"comment\":{}}],[\"fetchdefaults\",{\"_index\":150,\"name\":{\"176\":{}},\"comment\":{}}],[\"fetchresponse\",{\"_index\":152,\"name\":{\"178\":{}},\"comment\":{}}],[\"fetchwrapper\",{\"_index\":136,\"name\":{\"161\":{}},\"comment\":{}}],[\"firmwareupgradesha1sumerror\",{\"_index\":116,\"name\":{\"140\":{}},\"comment\":{}}],[\"fps\",{\"_index\":31,\"name\":{\"34\":{},\"45\":{}},\"comment\":{}}],[\"frame\",{\"_index\":20,\"name\":{\"20\":{}},\"comment\":{}}],[\"framedata\",{\"_index\":32,\"name\":{\"35\":{}},\"comment\":{}}],[\"frames_number\",{\"_index\":30,\"name\":{\"33\":{},\"44\":{}},\"comment\":{}}],[\"get\",{\"_index\":142,\"name\":{\"168\":{}},\"comment\":{}}],[\"getbrightness\",{\"_index\":61,\"name\":{\"74\":{}},\"comment\":{}}],[\"getchallengeresponse\",{\"_index\":95,\"name\":{\"111\":{}},\"comment\":{}}],[\"getcurrentmovie\",{\"_index\":86,\"name\":{\"100\":{}},\"comment\":{}}],[\"getdevicedetails\",{\"_index\":53,\"name\":{\"66\":{}},\"comment\":{}}],[\"gethsvcolor\",{\"_index\":64,\"name\":{\"77\":{}},\"comment\":{}}],[\"getlayout\",{\"_index\":79,\"name\":{\"92\":{}},\"comment\":{}}],[\"getlistofmovies\",{\"_index\":76,\"name\":{\"89\":{}},\"comment\":{}}],[\"getmode\",{\"_index\":69,\"name\":{\"82\":{}},\"comment\":{}}],[\"getmovieconfig\",{\"_index\":72,\"name\":{\"85\":{}},\"comment\":{}}],[\"getmqttconfig\",{\"_index\":81,\"name\":{\"95\":{}},\"comment\":{}}],[\"getname\",{\"_index\":56,\"name\":{\"69\":{}},\"comment\":{}}],[\"getnetworkstatus\",{\"_index\":88,\"name\":{\"102\":{}},\"comment\":{}}],[\"getnleds\",{\"_index\":22,\"name\":{\"24\":{},\"94\":{},\"116\":{}},\"comment\":{}}],[\"getplaylist\",{\"_index\":83,\"name\":{\"97\":{}},\"comment\":{}}],[\"getrgbcolor\",{\"_index\":65,\"name\":{\"78\":{}},\"comment\":{}}],[\"getsaturation\",{\"_index\":62,\"name\":{\"75\":{}},\"comment\":{}}],[\"getsummary\",{\"_index\":85,\"name\":{\"99\":{}},\"comment\":{}}],[\"gettimer\",{\"_index\":58,\"name\":{\"71\":{}},\"comment\":{}}],[\"gettoken\",{\"_index\":93,\"name\":{\"109\":{}},\"comment\":{}}],[\"gettokendecoded\",{\"_index\":94,\"name\":{\"110\":{}},\"comment\":{}}],[\"green\",{\"_index\":3,\"name\":{\"3\":{},\"119\":{}},\"comment\":{}}],[\"handlediscovereddevices\",{\"_index\":132,\"name\":{\"156\":{}},\"comment\":{}}],[\"handleresponseerror\",{\"_index\":149,\"name\":{\"175\":{}},\"comment\":{}}],[\"headers\",{\"_index\":151,\"name\":{\"177\":{}},\"comment\":{}}],[\"hsvcolor\",{\"_index\":98,\"name\":{\"121\":{}},\"comment\":{}}],[\"hue\",{\"_index\":99,\"name\":{\"122\":{}},\"comment\":{}}],[\"id\",{\"_index\":24,\"name\":{\"27\":{}},\"comment\":{}}],[\"invalidargumentkey\",{\"_index\":115,\"name\":{\"139\":{}},\"comment\":{}}],[\"invalidargumentvalue\",{\"_index\":112,\"name\":{\"136\":{}},\"comment\":{}}],[\"invertcolor\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"ip\",{\"_index\":134,\"name\":{\"158\":{}},\"comment\":{}}],[\"ipaddr\",{\"_index\":38,\"name\":{\"50\":{}},\"comment\":{}}],[\"ison\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"layout\",{\"_index\":125,\"name\":{\"149\":{}},\"comment\":{}}],[\"led\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"leds\",{\"_index\":21,\"name\":{\"22\":{},\"114\":{}},\"comment\":{}}],[\"leds_per_frame\",{\"_index\":29,\"name\":{\"32\":{},\"42\":{}},\"comment\":{}}],[\"light\",{\"_index\":37,\"name\":{\"48\":{}},\"comment\":{}}],[\"login\",{\"_index\":48,\"name\":{\"61\":{}},\"comment\":{}}],[\"logout\",{\"_index\":49,\"name\":{\"62\":{}},\"comment\":{}}],[\"loop_type\",{\"_index\":28,\"name\":{\"31\":{},\"43\":{}},\"comment\":{}}],[\"malformedjson\",{\"_index\":114,\"name\":{\"138\":{}},\"comment\":{}}],[\"movie\",{\"_index\":23,\"name\":{\"25\":{},\"130\":{}},\"comment\":{}}],[\"name\",{\"_index\":25,\"name\":{\"28\":{},\"39\":{},\"56\":{}},\"comment\":{}}],[\"net\",{\"_index\":40,\"name\":{\"52\":{}},\"comment\":{}}],[\"nleds\",{\"_index\":43,\"name\":{\"55\":{}},\"comment\":{}}],[\"off\",{\"_index\":105,\"name\":{\"128\":{}},\"comment\":{}}],[\"ok\",{\"_index\":110,\"name\":{\"134\":{}},\"comment\":{}}],[\"onecolorframe\",{\"_index\":96,\"name\":{\"112\":{}},\"comment\":{}}],[\"playlist\",{\"_index\":107,\"name\":{\"131\":{}},\"comment\":{}}],[\"post\",{\"_index\":143,\"name\":{\"169\":{}},\"comment\":{}}],[\"put\",{\"_index\":145,\"name\":{\"171\":{}},\"comment\":{}}],[\"red\",{\"_index\":2,\"name\":{\"2\":{},\"118\":{}},\"comment\":{}}],[\"request\",{\"_index\":141,\"name\":{\"167\":{}},\"comment\":{}}],[\"rgbcolor\",{\"_index\":97,\"name\":{\"117\":{}},\"comment\":{}}],[\"rt\",{\"_index\":108,\"name\":{\"132\":{}},\"comment\":{}}],[\"saturate\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"saturation\",{\"_index\":100,\"name\":{\"123\":{}},\"comment\":{}}],[\"senddeleterequest\",{\"_index\":46,\"name\":{\"59\":{}},\"comment\":{}}],[\"sendgetrequest\",{\"_index\":47,\"name\":{\"60\":{}},\"comment\":{}}],[\"sendmovieconfig\",{\"_index\":71,\"name\":{\"84\":{}},\"comment\":{}}],[\"sendmovietodevice\",{\"_index\":73,\"name\":{\"86\":{}},\"comment\":{}}],[\"sendpostrequest\",{\"_index\":45,\"name\":{\"58\":{}},\"comment\":{}}],[\"sendrealtimeframe\",{\"_index\":74,\"name\":{\"87\":{}},\"comment\":{}}],[\"sendrealtimeframeudp\",{\"_index\":75,\"name\":{\"88\":{}},\"comment\":{}}],[\"setbrightness\",{\"_index\":60,\"name\":{\"73\":{}},\"comment\":{}}],[\"setcolor\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"setcurrentmovie\",{\"_index\":87,\"name\":{\"101\":{}},\"comment\":{}}],[\"setheaderifjson\",{\"_index\":148,\"name\":{\"174\":{}},\"comment\":{}}],[\"sethsvcolor\",{\"_index\":68,\"name\":{\"81\":{}},\"comment\":{}}],[\"setmode\",{\"_index\":70,\"name\":{\"83\":{}},\"comment\":{}}],[\"setmqttconfig\",{\"_index\":82,\"name\":{\"96\":{}},\"comment\":{}}],[\"setname\",{\"_index\":57,\"name\":{\"70\":{}},\"comment\":{}}],[\"setnetworkstatus\",{\"_index\":89,\"name\":{\"103\":{}},\"comment\":{}}],[\"setoff\",{\"_index\":54,\"name\":{\"67\":{}},\"comment\":{}}],[\"setrgbcolor\",{\"_index\":66,\"name\":{\"79\":{}},\"comment\":{}}],[\"setrgbcolorrealtime\",{\"_index\":67,\"name\":{\"80\":{}},\"comment\":{}}],[\"setsaturation\",{\"_index\":63,\"name\":{\"76\":{}},\"comment\":{}}],[\"setstate\",{\"_index\":55,\"name\":{\"68\":{}},\"comment\":{}}],[\"settimer\",{\"_index\":59,\"name\":{\"72\":{}},\"comment\":{}}],[\"size\",{\"_index\":36,\"name\":{\"47\":{}},\"comment\":{}}],[\"source\",{\"_index\":126,\"name\":{\"150\":{}},\"comment\":{}}],[\"stringifybodyifjson\",{\"_index\":146,\"name\":{\"172\":{}},\"comment\":{}}],[\"synthesized\",{\"_index\":127,\"name\":{\"151\":{}},\"comment\":{}}],[\"time_now\",{\"_index\":118,\"name\":{\"142\":{}},\"comment\":{}}],[\"time_off\",{\"_index\":120,\"name\":{\"144\":{}},\"comment\":{}}],[\"time_on\",{\"_index\":119,\"name\":{\"143\":{}},\"comment\":{}}],[\"timeout\",{\"_index\":138,\"name\":{\"164\":{}},\"comment\":{}}],[\"timer\",{\"_index\":117,\"name\":{\"141\":{}},\"comment\":{}}],[\"token\",{\"_index\":41,\"name\":{\"53\":{},\"106\":{}},\"comment\":{}}],[\"tooctet\",{\"_index\":10,\"name\":{\"10\":{},\"23\":{},\"46\":{},\"115\":{}},\"comment\":{}}],[\"torgb\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"torgbw\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"tostring\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"turnoff\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"twinklydevice\",{\"_index\":133,\"name\":{\"157\":{}},\"comment\":{}}],[\"type\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"udpclient\",{\"_index\":44,\"name\":{\"57\":{}},\"comment\":{}}],[\"unique_id\",{\"_index\":26,\"name\":{\"29\":{},\"40\":{}},\"comment\":{}}],[\"uploadlayout\",{\"_index\":80,\"name\":{\"93\":{}},\"comment\":{}}],[\"uuid\",{\"_index\":128,\"name\":{\"152\":{}},\"comment\":{}}],[\"value\",{\"_index\":101,\"name\":{\"124\":{}},\"comment\":{}}],[\"valuetoolong\",{\"_index\":113,\"name\":{\"137\":{}},\"comment\":{}}],[\"verify\",{\"_index\":51,\"name\":{\"64\":{}},\"comment\":{}}],[\"white\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"x\",{\"_index\":122,\"name\":{\"146\":{}},\"comment\":{}}],[\"y\",{\"_index\":123,\"name\":{\"147\":{}},\"comment\":{}}],[\"z\",{\"_index\":124,\"name\":{\"148\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 5b96717..18b4f8f 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -770,9 +770,11 @@ a.tsd-index-link { color: var(--color-text); } .tsd-accordion-summary { - list-style-type: none; - display: flex; - align-items: center; + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ } .tsd-accordion-summary, .tsd-accordion-summary a { @@ -784,7 +786,7 @@ a.tsd-index-link { cursor: pointer; } .tsd-accordion-summary a { - flex-grow: 1; + width: calc(100% - 1.5rem); } .tsd-accordion-summary > * { margin-top: 0; diff --git a/docs/classes/AuthenticationToken.html b/docs/classes/AuthenticationToken.html index 80f9b94..bb229cb 100644 --- a/docs/classes/AuthenticationToken.html +++ b/docs/classes/AuthenticationToken.html @@ -17,13 +17,14 @@

Class AuthenticationTokenInternal

Represents an authentication token used to login to an xled instance

-
+ +

Hierarchy

  • AuthenticationToken
+
  • Defined in src/lib/light.ts:703
  • @@ -31,26 +32,26 @@

    Constructors

    - + +

    Returns AuthenticationToken

    +
    +
  • Defined in src/lib/light.ts:714
  • Properties

    - +
    challengeResponse: string
    +
  • Defined in src/lib/light.ts:706
  • - +
    expiry: Date
    +
  • Defined in src/lib/light.ts:705
  • - +
    token: string
    +
  • Defined in src/lib/light.ts:704
  • Methods

    - +
      - +
    • -

      Returns string

      Challenge response generated by the XLED instance

      -
    +
  • Defined in src/lib/light.ts:741
  • - +
      - +
    • -

      Returns string

      Token as string

      -
    +
  • Defined in src/lib/light.ts:725
  • - +
      - +
    • -

      Returns Buffer

      Token as buffer, for UDP use

      -
    +
  • Defined in src/lib/light.ts:733
  • +
  • constructor
  • +
  • challengeResponse
  • +
  • expiry
  • +
  • token
  • +
  • getChallengeResponse
  • +
  • getToken
  • +
  • getTokenDecoded
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/FetchWrapper.html b/docs/classes/FetchWrapper.html new file mode 100644 index 0000000..b91e61a --- /dev/null +++ b/docs/classes/FetchWrapper.html @@ -0,0 +1,286 @@ +FetchWrapper | xled-js
    +
    + +
    +
    +
    +
    + +

    Class FetchWrapper

    +
    +

    Hierarchy

    +
      +
    • FetchWrapper
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    + +
    +
    +

    Properties

    +
    + +
    baseURL: string
    +
    + +
    defaults: FetchDefaults = ...
    +
    + +
    timeout: number
    +
    +

    Methods

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        newHeaders: Record<string, string>
      +

      Returns void

    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        endpoint: string
      • +
      • +
        data: any
      +

      Returns Promise<Response>

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        endpoint: string
      • +
      • +
        options: RequestInit = {}
      +

      Returns Promise<Response>

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/Frame.html b/docs/classes/Frame.html index 2aaa573..4813ba5 100644 --- a/docs/classes/Frame.html +++ b/docs/classes/Frame.html @@ -17,8 +17,9 @@

    Class Frame

    A frame of LEDs, used when you wish to set color pixel by pixel

    - -

    Export

    + +
    +

    Export

    Hierarchy

    +
  • Defined in src/lib/frame.ts:10
  • @@ -34,23 +35,23 @@

    Constructors

    - +
      - +
    • Creates an instance of Frame.

      @@ -60,44 +61,48 @@

      Parameters

    • leds: Led[]

      Array of Led, of same length as nleds

      -
    -

    Returns Frame

    +
  • Defined in src/lib/frame.ts:19
  • Properties

    - +
    leds: Led[]
    +
  • Defined in src/lib/frame.ts:11
  • Methods

    - +
      - +
    • Get the number of LEDs in this frame

      -

      Returns number

    +
  • Defined in src/lib/frame.ts:45
  • - +
      - +
    • Output the frame as a Uint8Array of bytes

      -

      Returns Uint8Array

    +
  • Defined in src/lib/frame.ts:28
  • +
  • constructor
  • +
  • leds
  • +
  • getNLeds
  • +
  • toOctet
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/Led.html b/docs/classes/Led.html index 7d15d46..409d06f 100644 --- a/docs/classes/Led.html +++ b/docs/classes/Led.html @@ -17,14 +17,15 @@

    Class Led

    A RGB led

    - -

    Export

    + +
    +

    Export

    Hierarchy

    • Led
    +
  • Defined in src/lib/led.ts:10
  • @@ -32,33 +33,41 @@

    Constructors

    - +
      - +
    • Creates an instance of the Led class.

      @@ -68,41 +77,71 @@

      Parameters

    • red: number

      Red value (0-255).

      -
    • + +
    • green: number

      Green value (0-255).

      -
    • + +
    • blue: number

      Blue value (0-255).

      -
    -

    Returns Led

    +
  • Defined in src/lib/led.ts:25
  • Properties

    +
    + +
    _type: "rgb" | "rgbw"
    - +
    blue: number
    +
  • Defined in src/lib/led.ts:13
  • - +
    green: number
    +
  • Defined in src/lib/led.ts:12
  • - +
    red: number
    +
  • Defined in src/lib/led.ts:11
  • +
    + +
    white?: number
    +
    +

    Accessors

    +
    + +
      +
    • get type(): "rgb" | "rgbw"
    • +
    • +

      Gets the LED type.

      +
      +

      Returns "rgb" | "rgbw"

      The LED type.

      + +

    Methods

    - +
      - +
    • Brightens the LED color by a specified factor.

      @@ -112,15 +151,17 @@

      Parameters

    • factor: number

      Brightness factor (e.g., 1.2 is 20% brighter).

      -
    + +

    Returns Led

    The updated Led instance.

    -
    +
  • Defined in src/lib/led.ts:154
  • - +
      - +
    • Desaturates the LED color by a specified factor.

      @@ -130,15 +171,17 @@

      Parameters

    • factor: number

      Desaturation factor (1 for full grayscale, 0 for no change).

      -
    + +

    Returns Led

    The updated Led instance.

    -
    +
  • Defined in src/lib/led.ts:209
  • - +
      - +
    • Dims the LED color by a specified factor.

      @@ -148,37 +191,41 @@

      Parameters

    • factor: number

      Dim factor (e.g., 0.8 is 20% dimmer).

      -
    + +

    Returns Led

    The updated Led instance.

    -
    +
  • Defined in src/lib/led.ts:168
  • - +
      - +
    • Inverts the RGB values.

      Returns Led

      The updated Led instance.

      -
    +
  • Defined in src/lib/led.ts:131
  • - +
      - +
    • Checks if the LED color is turned on (non-zero).

      Returns boolean

      True if the LED is on, false otherwise.

      -
    +
  • Defined in src/lib/led.ts:90
  • - +
      - +
    • Saturates the LED color by a specified factor.

      @@ -188,15 +235,17 @@

      Parameters

    • factor: number

      Saturation factor (greater than 1 to saturate, between 0 and 1 to desaturate).

      -
    + +

    Returns Led

    The updated Led instance.

    -
    +
  • Defined in src/lib/led.ts:182
  • - +
      - +
    • Sets the RGB values to the specified values.

      @@ -206,57 +255,98 @@

      Parameters

    • red: number

      New red value.

      -
    • + +
    • green: number

      New green value.

      -
    • + +
    • blue: number

      New blue value.

      -
    + +
    +
  • +
    Optional white: number
  • Returns Led

    The updated Led instance.

    -
    +
  • Defined in src/lib/led.ts:115
  • - +
      - +
    • Converts the RGB values to a Uint8Array.

      Returns Uint8Array

      The RGB values in a Uint8Array format.

      -
    +
  • Defined in src/lib/led.ts:77
  • +
    + +
      + +
    • +

      Converts the LED to RGB.

      +
      +
      +

      Parameters

      +
        +
      • +
        Optional preserveWhite: boolean = false
        +

        If true, the white value will be preserved.

        +
        +
      +

      Returns Led

      The updated Led instance.

      + +
    +
    + +
      + +
    • +

      Converts the LED to RGBW.

      +
      +

      Returns Led

      The updated Led instance.

      + +
    - +
      - +
    • Returns a string representation of the RGB values.

      Returns string

      String in the format 'rgb(r, g, b)'.

      -
    +
  • Defined in src/lib/led.ts:144
  • - +
      - +
    • Sets all RGB values to 0, turning the LED off.

      Returns Led

      The updated Led instance.

      -
    +
  • Defined in src/lib/led.ts:99
  • +
  • constructor
  • +
  • _type
  • +
  • blue
  • +
  • green
  • +
  • red
  • +
  • white
  • +
  • type
  • +
  • brighten
  • +
  • desaturate
  • +
  • dim
  • +
  • invertColor
  • +
  • isOn
  • +
  • saturate
  • +
  • setColor
  • +
  • toOctet
  • +
  • toRgb
  • +
  • toRgbw
  • +
  • toString
  • +
  • turnOff
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/Light.html b/docs/classes/Light.html index 7b72758..20557ae 100644 --- a/docs/classes/Light.html +++ b/docs/classes/Light.html @@ -17,13 +17,14 @@

    Class Light

    Represents a Twinkly device

    -
    + +

    Hierarchy

    • Light
    +
  • Defined in src/lib/light.ts:31
  • @@ -31,73 +32,74 @@

    Constructors

    - +
      - +
    • Creates an instance of Light.

      @@ -107,55 +109,64 @@

      Parameters

    • ipaddr: string

      IP Address of the Twinkly device

      -
    • + +
      +
    • +
      timeout: number = 20000
    • -
      timeout: number = 20000
    -

    Returns Light

    +
  • Defined in src/lib/light.ts:46
  • Properties

    - +
    activeLoginCall: boolean
    +
  • Defined in src/lib/light.ts:36
  • - +
    challenge: string
    +
  • Defined in src/lib/light.ts:33
  • - +
    ipaddr: string
    +
  • Defined in src/lib/light.ts:32
  • +
    + +
    name: undefined | string
    - -
    net: AxiosInstance
    +
  • Defined in src/lib/light.ts:34
  • - +
    nleds: undefined | number
    +
  • Defined in src/lib/light.ts:37
  • - +
    token: undefined | AuthenticationToken
    +
  • Defined in src/lib/light.ts:35
  • - +
    udpClient: any
    +
  • Defined in src/lib/light.ts:39
  • Methods

    - +
      - +
    • Add a movie to the device

      @@ -163,23 +174,28 @@ +
      movie: Movie
      +

    Returns Promise<any>

    response from device

    -
    +
  • Defined in src/lib/light.ts:546
  • - +
      - +
    • -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:194
  • - +

    Returns Promise<object>

    response from device

    -
    +
  • Defined in src/lib/light.ts:644
  • - +
      - +
    • -

      Returns Promise<any>

      response from device

      -
    +
  • Defined in src/lib/light.ts:559
  • - +
      - +
    • Ensure that we are logged into to the device, and if not initiate a login request

      -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:221
  • - +
      - +
    • Gets the current brightness level

      Returns Promise<number>

      Current brightness in range 0..100

      -
    +
  • Defined in src/lib/light.ts:333
  • - +
      - +
    • Get the current movie

      Returns Promise<object>

      response from device

      -
    +
  • Defined in src/lib/light.ts:662
  • - +
    +
  • Defined in src/lib/light.ts:241
  • - +
    +
  • Defined in src/lib/light.ts:369
  • - +
    +
  • Defined in src/lib/light.ts:568
  • - +
    +
  • Defined in src/lib/light.ts:533
  • - +
    +
  • Defined in src/lib/light.ts:423
  • - +
      - +
    • Get the movie config from the device

      Returns Promise<any>

      response from device

      -
    +
  • Defined in src/lib/light.ts:465
  • - +
      - +
    • Get the current MQTT config

      Returns Promise<object>

      MQTT config

      -
    +
  • Defined in src/lib/light.ts:615
  • - +
      - +
    • Get the number of LEDs in the device

      Returns Promise<number>

      number of LEDs in the device

      -
    +
  • Defined in src/lib/light.ts:603
  • - +
      - +
    • Get the name of the device

      Returns Promise<string>

      Name of device

      -
    +
  • Defined in src/lib/light.ts:269
  • - +
      - +
    • Get network status

      Returns Promise<object>

      response from device

      -
    +
  • Defined in src/lib/light.ts:683
  • - +
      - +
    • Get the current playlist

      Returns Promise<object>

      response from device

      -
    +
  • Defined in src/lib/light.ts:634
  • - +
    +
  • Defined in src/lib/light.ts:382
  • - +
      - +
    • -

      Returns Promise<number>

      Current saturation in range 0..100

      -
    +
  • Defined in src/lib/light.ts:342
  • - +
      - +
    • Get device summary

      Returns Promise<any>

      response from device

      -
    +
  • Defined in src/lib/light.ts:653
  • - +
    +
  • Defined in src/lib/light.ts:296
  • - +
      - +
    • Sends a login request

      -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:159
  • - +
      - +
    • Sends a logout request

      -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:188
  • - +
      - +
    • +

      Sends a DELETE request to the device, appending the required tokens

      +

      Parameters

      • -
        url: string
      • +
        url: string
        +
      • -
        data: any
      -

      Returns Promise<any>

    +

    Returns Promise<any>

    +
    +
  • Defined in src/lib/light.ts:116
  • - +
    +
  • Defined in src/lib/light.ts:136
  • - +
      - +
    • Send a movie config to the device

      @@ -459,14 +504,16 @@ -

      Returns Promise<any>

    +

    Returns Promise<any>

    +
    +
  • Defined in src/lib/light.ts:442
  • - +
      - +
    • Send a movie to the device

      @@ -474,14 +521,16 @@ -

      Returns Promise<any>

    +

    Returns Promise<any>

    +
    +
  • Defined in src/lib/light.ts:475
  • - +
    +
  • Defined in src/lib/light.ts:88
  • - +
      - +
    • Send a realtime frame to device

      @@ -508,14 +559,16 @@ -

      Returns Promise<any>

    +

    Returns Promise<any>

    +
    +
  • Defined in src/lib/light.ts:489
  • - +
      - +
    • Send a realtime frame to device via UDP WARNING: This only works with nodejs

      @@ -524,14 +577,16 @@

      Parameters

      -

      Returns Promise<void>

    +

    Returns Promise<void>

    +
    +
  • Defined in src/lib/light.ts:503
  • - + +

    Returns Promise<void>

    +
    +
  • Defined in src/lib/light.ts:316
  • - +

    Returns Promise<object>

    response from device

    -
    +
  • Defined in src/lib/light.ts:672
  • - +
      - +
    • Sets the color in HSV when in color mode

      @@ -576,14 +637,16 @@

      Parameters

    • color: hsvColor

      A HSV color

      -
    -

    Returns Promise<void>

    +
  • Defined in src/lib/light.ts:410
  • - + +

    Returns Promise<void>

    +
    +
  • Defined in src/lib/light.ts:433
  • - +

    Returns Promise<object>

    response from device

    -
    +
  • Defined in src/lib/light.ts:625
  • - +
      - +
    • Sets the name of the device

      @@ -624,14 +691,16 @@

      Parameters

    • name: string

      Desired device name, max 32 charachters

      -
    -

    Returns Promise<void>

    +
  • Defined in src/lib/light.ts:282
  • - + +

    Returns Promise<object>

    +
    +
  • Defined in src/lib/light.ts:693
  • - +
      - +
    • Turns the device off

      -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:252
  • - +
      - +
    • Sets the color in RGB when in color mode

      @@ -666,14 +738,16 @@

      Parameters

    • color: rgbColor

      A RGB color

      -
    -

    Returns Promise<void>

    +
  • Defined in src/lib/light.ts:393
  • - +
      - +
    • Parameters

      @@ -682,11 +756,11 @@

      Parameters

      color: rgbColor

    Returns Promise<void>

    +
  • Defined in src/lib/light.ts:400
  • - + +

    Returns Promise<void>

    +
    +
  • Defined in src/lib/light.ts:354
  • - +
      - +
    • Experimental

      Sets the state

      @@ -715,14 +793,16 @@

      Parameters

    • state: boolean

      Set on/off

      -
    -

    Returns Promise<void>

    +
  • Defined in src/lib/light.ts:260
  • - +
      - +
    • Sets the time when lights will turn on and off

      @@ -730,14 +810,16 @@ -

      Returns Promise<void>

    +

    Returns Promise<void>

    +
    +
  • Defined in src/lib/light.ts:305
  • - +
      - +
    • Upload a layout of LEDs to the device

      @@ -745,33 +827,40 @@
      • -
        coordinates: coordinate[]
      • +
        coordinates: coordinate[]
        +
      • -
        source: string = "3D"
      • +
        source: string = "3D"
        +
      • -
        synthesized: boolean = false
      • +
        synthesized: boolean = false
        +
      • -
        aspectXY: number = 0
      • +
        aspectXY: number = 0
        +
      • -
        aspectXZ: number = 0
      -

      Returns Promise<any>

    +

    Returns Promise<any>

    +
    +
  • Defined in src/lib/light.ts:582
  • - +
      - +
    • Check that we are logged in to the device

      -

      Returns Promise<void>

    +
  • Defined in src/lib/light.ts:204
  • +
  • constructor
  • +
  • activeLoginCall
  • +
  • challenge
  • +
  • ipaddr
  • +
  • name
  • +
  • net
  • +
  • nleds
  • +
  • token
  • +
  • udpClient
  • +
  • addMovie
  • +
  • autoEndLoginCall
  • +
  • createPlaylist
  • +
  • deleteMovies
  • +
  • ensureLoggedIn
  • +
  • getBrightness
  • +
  • getCurrentMovie
  • +
  • getDeviceDetails
  • +
  • getHSVColor
  • +
  • getLayout
  • +
  • getListOfMovies
  • +
  • getMode
  • +
  • getMovieConfig
  • +
  • getMqttConfig
  • +
  • getNLeds
  • +
  • getName
  • +
  • getNetworkStatus
  • +
  • getPlaylist
  • +
  • getRGBColor
  • +
  • getSaturation
  • +
  • getSummary
  • +
  • getTimer
  • +
  • login
  • +
  • logout
  • +
  • sendDeleteRequest
  • +
  • sendGetRequest
  • +
  • sendMovieConfig
  • +
  • sendMovieToDevice
  • +
  • sendPostRequest
  • +
  • sendRealTimeFrame
  • +
  • sendRealTimeFrameUDP
  • +
  • setBrightness
  • +
  • setCurrentMovie
  • +
  • setHSVColor
  • +
  • setMode
  • +
  • setMqttConfig
  • +
  • setName
  • +
  • setNetworkStatus
  • +
  • setOff
  • +
  • setRGBColor
  • +
  • setRGBColorRealTime
  • +
  • setSaturation
  • +
  • setState
  • +
  • setTimer
  • +
  • uploadLayout
  • +
  • verify
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/Movie.html b/docs/classes/Movie.html index 2c6b0f2..f8551ee 100644 --- a/docs/classes/Movie.html +++ b/docs/classes/Movie.html @@ -20,7 +20,7 @@

    Hierarchy

    • Movie
    +
  • Defined in src/lib/movie.ts:3
  • @@ -28,94 +28,100 @@

    Constructors

    - +
      - +
    • Parameters

      • -
        data: any
      +
      data: Record<string, any>

    Returns Movie

    +
  • Defined in src/lib/movie.ts:16
  • Properties

    +
    + +
    _channels: number
    - +
    descriptor_type: string
    +
  • Defined in src/lib/movie.ts:7
  • - +
    fps: number
    +
  • Defined in src/lib/movie.ts:11
  • - +
    frameData: Frame[]
    +
  • Defined in src/lib/movie.ts:12
  • - +
    frames_number: number
    +
  • Defined in src/lib/movie.ts:10
  • - +
    id: number
    +
  • Defined in src/lib/movie.ts:4
  • - +
    leds_per_frame: number
    +
  • Defined in src/lib/movie.ts:9
  • - +
    loop_type: number
    +
  • Defined in src/lib/movie.ts:8
  • - +
    name: string
    +
  • Defined in src/lib/movie.ts:5
  • - +
    unique_id: string
    +
  • Defined in src/lib/movie.ts:6
  • Methods

    - +
      - +
    • Returns {
          descriptor_type: string;
          fps: number;
          frames_number: number;
          leds_per_frame: number;
          loop_type: number;
          name: string;
          unique_id: string;
      }

        @@ -134,11 +140,11 @@
        name
        unique_id: string
    +
  • Defined in src/lib/movie.ts:44
  • - +
      - +
    • Parameters

      @@ -147,20 +153,20 @@

      Parameters

      isCompressed: boolean = false

    Returns number

    +
  • Defined in src/lib/movie.ts:78
  • - +
      - +
    • Returns Uint8Array

    +
  • Defined in src/lib/movie.ts:56
  • +
  • constructor
  • +
  • _channels
  • +
  • descriptor_type
  • +
  • fps
  • +
  • frameData
  • +
  • frames_number
  • +
  • id
  • +
  • leds_per_frame
  • +
  • loop_type
  • +
  • name
  • +
  • unique_id
  • +
  • export
  • +
  • size
  • +
  • toOctet
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/OneColorFrame.html b/docs/classes/OneColorFrame.html index b30e80b..046baa4 100644 --- a/docs/classes/OneColorFrame.html +++ b/docs/classes/OneColorFrame.html @@ -17,8 +17,9 @@

    Class OneColorFrame

    Easy way to create an entire frame of one color

    - -

    Export

    + +
    +

    Export

    Hierarchy

      @@ -26,7 +27,7 @@

      Hierarchy

      • OneColorFrame
    +
  • Defined in src/lib/light.ts:754
  • @@ -34,23 +35,23 @@

    Constructors

    - + +

    Returns OneColorFrame

    +
    +
  • Defined in src/lib/light.ts:762
  • Properties

    - +
    leds: Led[]
    +
  • Defined in src/lib/frame.ts:11
  • Methods

    - +
      - +
    • Get the number of LEDs in this frame

      -

      Returns number

    +
  • Defined in src/lib/frame.ts:45
  • - +
      - +
    • Output the frame as a Uint8Array of bytes

      -

      Returns Uint8Array

    +
  • Defined in src/lib/frame.ts:28
  • +
  • constructor
  • +
  • leds
  • +
  • getNLeds
  • +
  • toOctet
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/enums/applicationResponseCode.html b/docs/enums/applicationResponseCode.html index 355900a..9cfe1d3 100644 --- a/docs/enums/applicationResponseCode.html +++ b/docs/enums/applicationResponseCode.html @@ -16,7 +16,7 @@
  • applicationResponseCode
  • Enumeration applicationResponseCode

    +
  • Defined in src/lib/interfaces.ts:26
  • @@ -24,56 +24,56 @@

    Enumeration Members

    - +
    Ok: 1000
    +
  • Defined in src/lib/interfaces.ts:27
  • - +
    error: 1001
    +
  • Defined in src/lib/interfaces.ts:28
  • - +
    firmwareUpgradeSHA1SUMerror: 1205
    +
  • Defined in src/lib/interfaces.ts:33
  • - +
    invalidArgumentKey: 1105
    +
  • Defined in src/lib/interfaces.ts:32
  • - +
    invalidArgumentValue: 1101
    +
  • Defined in src/lib/interfaces.ts:29
  • - +
    malformedJSON: 1104
    +
  • Defined in src/lib/interfaces.ts:31
  • - +
    valueTooLong: 1102
    +
  • Defined in src/lib/interfaces.ts:30
  • +
  • Ok
  • +
  • error
  • +
  • firmwareUpgradeSHA1SUMerror
  • +
  • invalidArgumentKey
  • +
  • invalidArgumentValue
  • +
  • malformedJSON
  • +
  • valueTooLong
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/enums/deviceMode.html b/docs/enums/deviceMode.html index 6502d74..05ad8ed 100644 --- a/docs/enums/deviceMode.html +++ b/docs/enums/deviceMode.html @@ -16,7 +16,7 @@
  • deviceMode
  • Enumeration deviceMode

    +
  • Defined in src/lib/interfaces.ts:17
  • @@ -24,56 +24,56 @@

    Enumeration Members

    - +
    color: "color"
    +
  • Defined in src/lib/interfaces.ts:19
  • - +
    demo: "demo"
    +
  • Defined in src/lib/interfaces.ts:18
  • - +
    effect: "effect"
    +
  • Defined in src/lib/interfaces.ts:21
  • - +
    movie: "movie"
    +
  • Defined in src/lib/interfaces.ts:22
  • - +
    off: "off"
    +
  • Defined in src/lib/interfaces.ts:20
  • - +
    playlist: "playlist"
    +
  • Defined in src/lib/interfaces.ts:23
  • - +
    rt: "rt"
    +
  • Defined in src/lib/interfaces.ts:24
  • +
  • color
  • +
  • demo
  • +
  • effect
  • +
  • movie
  • +
  • off
  • +
  • playlist
  • +
  • rt
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/discoverTwinklyDevices.html b/docs/functions/discoverTwinklyDevices.html index 6cb0706..be15a01 100644 --- a/docs/functions/discoverTwinklyDevices.html +++ b/docs/functions/discoverTwinklyDevices.html @@ -17,7 +17,7 @@

    Function discoverTwinklyDevices

      - +
    • Discovers Twinkly devices on the network and returns a Promise with the discovered devices.

      This function sends a UDP broadcast message to discover Twinkly devices. @@ -29,18 +29,20 @@

      Parameters

    • timeout: number = TIMEOUT_DURATION

      The duration for the discovery process (in milliseconds).

      -
    + +

    Returns Promise<Map<string, TwinklyDevice>>

    • A Promise that resolves with a map of discovered devices.
    -
    +
  • Defined in src/lib/discovery.ts:23
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/handleDiscoveredDevices.html b/docs/functions/handleDiscoveredDevices.html index 9e68f65..dd638a0 100644 --- a/docs/functions/handleDiscoveredDevices.html +++ b/docs/functions/handleDiscoveredDevices.html @@ -17,18 +17,19 @@

    Function handleDiscoveredDevices

      - +
    • Example to handle a set of discovered Twinkly devices

      -

      Returns Promise<void>

    +
  • Defined in src/lib/discovery.ts:70
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index c85a782..39b5a95 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,7 +41,7 @@

    xled-js

    +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/FetchDefaults.html b/docs/interfaces/FetchDefaults.html new file mode 100644 index 0000000..f75c28e --- /dev/null +++ b/docs/interfaces/FetchDefaults.html @@ -0,0 +1,84 @@ +FetchDefaults | xled-js
    +
    + +
    +
    +
    +
    + +

    Interface FetchDefaults

    +
    +

    Hierarchy

    +
      +
    • FetchDefaults
    +
    +
    +
    + +
    +
    +

    Properties

    +
    +
    +

    Properties

    +
    + +
    headers: Record<string, string>
    +
    + +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/interfaces/FetchResponse.html b/docs/interfaces/FetchResponse.html new file mode 100644 index 0000000..81a5fe7 --- /dev/null +++ b/docs/interfaces/FetchResponse.html @@ -0,0 +1,274 @@ +FetchResponse | xled-js
    +
    + +
    +
    +
    +
    + +

    Interface FetchResponse

    +
    +

    Hierarchy

    +
      +
    • Response +
        +
      • FetchResponse
    +
    +
    +
    + +
    +
    +

    Properties

    +
    + +
    body: null | ReadableStream<Uint8Array>
    + +
    +
    + +
    bodyUsed: boolean
    + +
    +
    + +
    data?: any
    +
    + +
    headers: Headers
    + +
    +
    + +
    ok: boolean
    + +
    +
    + +
    redirected: boolean
    + +
    +
    + +
    status: number
    + +
    +
    + +
    statusText: string
    + +
    +
    + +
    type: ResponseType
    + +
    +
    + +
    url: string
    + +
    +
    +

    Methods

    +
    + +
      + +
    • + +

      Returns Promise<ArrayBuffer>

      +
    +
    + +
      + +
    • + +

      Returns Promise<Blob>

      +
    +
    + +
      + +
    • + +

      Returns Response

      +
    +
    + +
      + +
    • + +

      Returns Promise<FormData>

      +
    +
    + +
      + +
    • + +

      Returns Promise<any>

      +
    +
    + +
      + +
    • + +

      Returns Promise<string>

      +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/interfaces/TwinklyDevice.html b/docs/interfaces/TwinklyDevice.html index 682538b..4f85025 100644 --- a/docs/interfaces/TwinklyDevice.html +++ b/docs/interfaces/TwinklyDevice.html @@ -17,13 +17,14 @@

    Interface TwinklyDevice

    Represents the details of a discovered Twinkly device.

    -
    + +

    Hierarchy

    • TwinklyDevice
    +
  • Defined in src/lib/discovery.ts:8
  • @@ -31,32 +32,32 @@

    Properties

    - +
    code: string
    +
  • Defined in src/lib/discovery.ts:11
  • - +
    deviceId: string
    +
  • Defined in src/lib/discovery.ts:10
  • - +
    ip: string
    +
  • Defined in src/lib/discovery.ts:9
  • +
  • code
  • +
  • deviceId
  • +
  • ip
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/coordinate.html b/docs/interfaces/coordinate.html index 5500daa..2f0de16 100644 --- a/docs/interfaces/coordinate.html +++ b/docs/interfaces/coordinate.html @@ -20,7 +20,7 @@

    Hierarchy

    • coordinate
    +
  • Defined in src/lib/interfaces.ts:45
  • @@ -28,32 +28,32 @@

    Properties

    - +
    x: number
    +
  • Defined in src/lib/interfaces.ts:46
  • - +
    y: number
    +
  • Defined in src/lib/interfaces.ts:47
  • - +
    z: number
    +
  • Defined in src/lib/interfaces.ts:48
  • +
  • x
  • +
  • y
  • +
  • z
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/hsvColor.html b/docs/interfaces/hsvColor.html index a033a16..6f038fb 100644 --- a/docs/interfaces/hsvColor.html +++ b/docs/interfaces/hsvColor.html @@ -20,7 +20,7 @@

    Hierarchy

    • hsvColor
    +
  • Defined in src/lib/interfaces.ts:9
  • @@ -28,38 +28,41 @@

    Properties

    - +
    hue: number

    Hue 0..359

    -
    +
  • Defined in src/lib/interfaces.ts:11
  • - +
    saturation: number

    Saturation 0..255

    -
    +
  • Defined in src/lib/interfaces.ts:13
  • - +
    value: number

    Value (brightness) 0..255

    -
    +
  • Defined in src/lib/interfaces.ts:15
  • +
  • hue
  • +
  • saturation
  • +
  • value
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/layout.html b/docs/interfaces/layout.html index 8cdaa3b..0899703 100644 --- a/docs/interfaces/layout.html +++ b/docs/interfaces/layout.html @@ -20,7 +20,7 @@

    Hierarchy

    • layout
    +
  • Defined in src/lib/interfaces.ts:51
  • @@ -28,44 +28,44 @@

    Properties

    - +
    +
  • Defined in src/lib/interfaces.ts:56
  • - +
    coordinates: coordinate[]
    +
  • Defined in src/lib/interfaces.ts:55
  • - +
    source: string
    +
  • Defined in src/lib/interfaces.ts:52
  • - +
    synthesized: boolean
    +
  • Defined in src/lib/interfaces.ts:53
  • - +
    uuid: string
    +
  • Defined in src/lib/interfaces.ts:54
  • +
  • code
  • +
  • coordinates
  • +
  • source
  • +
  • synthesized
  • +
  • uuid
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/rgbColor.html b/docs/interfaces/rgbColor.html index ccce7dd..e658748 100644 --- a/docs/interfaces/rgbColor.html +++ b/docs/interfaces/rgbColor.html @@ -20,7 +20,7 @@

    Hierarchy

    • rgbColor
    +
  • Defined in src/lib/interfaces.ts:1
  • @@ -28,38 +28,41 @@

    Properties

    - +
    blue: number

    Blue 0..255

    -
    +
  • Defined in src/lib/interfaces.ts:7
  • - +
    green: number

    Green 0..255

    -
    +
  • Defined in src/lib/interfaces.ts:5
  • - +
    red: number

    Red 0..255

    -
    +
  • Defined in src/lib/interfaces.ts:3
  • +
  • blue
  • +
  • green
  • +
  • red
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/timer.html b/docs/interfaces/timer.html index 2c8b8f7..e5d64ea 100644 --- a/docs/interfaces/timer.html +++ b/docs/interfaces/timer.html @@ -20,7 +20,7 @@

    Hierarchy

    • timer
    +
  • Defined in src/lib/interfaces.ts:36
  • @@ -28,38 +28,41 @@

    Properties

    - +
    time_now: number

    Current time according to the device, seconds after midnight

    -
    +
  • Defined in src/lib/interfaces.ts:38
  • - +
    time_off: number

    Time to switch lights off, seconds after midnight. -1 if not set.

    -
    +
  • Defined in src/lib/interfaces.ts:42
  • - +
    time_on: number

    Time to switch lights on, seconds after midnight. -1 if not set.

    -
    +
  • Defined in src/lib/interfaces.ts:40
  • +
  • time_now
  • +
  • time_off
  • +
  • time_on
  • +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index 05281cf..9bad702 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -17,37 +17,40 @@

    xled-js

    Index

    Enumerations

    -

    Classes

    -

    Interfaces

    -

    Functions

    -
    +
  • applicationResponseCode
  • +
  • deviceMode
  • +
  • AuthenticationToken
  • +
  • FetchWrapper
  • +
  • Frame
  • +
  • Led
  • +
  • Light
  • +
  • Movie
  • +
  • OneColorFrame
  • +
  • FetchDefaults
  • +
  • FetchResponse
  • +
  • TwinklyDevice
  • +
  • coordinate
  • +
  • hsvColor
  • +
  • layout
  • +
  • rgbColor
  • +
  • timer
  • +
  • discoverTwinklyDevices
  • +
  • handleDiscoveredDevices
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/examples/movie_upload.js b/examples/movie_upload.js index c4c3e26..9d71480 100644 --- a/examples/movie_upload.js +++ b/examples/movie_upload.js @@ -3,16 +3,25 @@ import { Light, Frame, Movie, Led } from "../dist/index.js"; async function run() { // instantiate the device console.log("Creating device..."); - const addresses = ["192.168.4.1", "192.168.1.164"]; - const device = new Light(addresses[1]); - - let movie = makeMovie(); + const device = new Light(addresses[0]); // must login before sending commands console.log("Logging in..."); await device.login(); + + const details = await device.getDeviceDetails(); + const nLeds = await device.getNLeds(); // get the device name console.log(`This device is called ${await device.getName()}`); + + // Create a movie + let movie = makeMovie({ + nLeds, + nFrames: nLeds + 20, + tailLength: 20, + type: details.led_profile?.toLowerCase() || 'rgb', + }); + // adjust brightness console.log("Set device to full brightness"); await device.setBrightness(100); @@ -42,16 +51,21 @@ async function run() { run(); -function makeMovie() { - const nLeds = 600; - const nFrames = 600; - const tailLength = 15; - const black = new Led(0, 0, 0); - const fps = 15; +function makeMovie({ + nLeds = 600, + nFrames = 250, + tailLength = 15, + type = "rgb", + fps = 15, +} = {}) { + const rgbw = type === "rgbw"; + const black = rgbw + ? new Led(0, 0, 0, 0) + : new Led(0, 0, 0); const frames = []; const saturationFactor = 0.5; - const nBufferFrames = 3 * fps; - const step = 3; + const step = 5; // skip frames to make movie shorter + const nBufferFrames = 3 * fps; // add some blank frames at the end for (let i = 0; i < nFrames; i += step) { // Faster way to make a frame of LEDs of single color @@ -64,11 +78,12 @@ function makeMovie() { if (j === 0) { sparkle = 1; } - if (i - j !== undefined) { - let r = 0; - let g = 0; - let b = 255; - leds[i - j] = new Led(r, g, b) + if (leds[i - j] !== undefined) { + const r = 0; + const g = 0; + const b = 255; + const w = rgbw ? 0 : undefined; + leds[i - j] = new Led(r, g, b, w) // .desaturate(1) .desaturate(desaturation) // .brighten(sparkle) @@ -84,7 +99,14 @@ function makeMovie() { frames.push(new Frame(Array(nLeds).fill(black))); } - let movie = new Movie({ frames, fps, name: "fairy_15fps" }); + const duration = Math.round(frames.length / fps); + + let movie = new Movie({ + frames, + fps, + name: `fairy_${fps}fps_${duration}s`, + descriptor_type: type + '_raw' + }); return movie; } diff --git a/src/index.ts b/src/index.ts index 880d85a..4a02d0b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,3 +5,4 @@ export * from "./lib/movie.js"; export * from "./lib/light.js"; export * from "./lib/interfaces.js"; export * from "./lib/discovery.js"; +export * from "./lib/fetchwrapper.js" diff --git a/src/lib/fetchwrapper.ts b/src/lib/fetchwrapper.ts index 883e4f5..c07bb7c 100644 --- a/src/lib/fetchwrapper.ts +++ b/src/lib/fetchwrapper.ts @@ -1,4 +1,4 @@ -export default class FetchWrapper { +export class FetchWrapper { private baseURL: string; private timeout: number; public defaults: FetchDefaults = { @@ -121,3 +121,5 @@ export interface FetchDefaults { export interface FetchResponse extends Response { data?: any; } + +export default FetchWrapper; \ No newline at end of file diff --git a/src/lib/frame.ts b/src/lib/frame.ts index 453c0c2..df76e07 100644 --- a/src/lib/frame.ts +++ b/src/lib/frame.ts @@ -1,4 +1,4 @@ -import { Led } from "./led.js"; +import type { Led } from "./led"; /** * A frame of LEDs, used when you wish to set color pixel by pixel @@ -26,12 +26,13 @@ export class Frame { * @returns {Uint8Array} */ toOctet(): Uint8Array { - let buffer = new ArrayBuffer(this.leds.length * 3); - let output = new Uint8Array(buffer); + const channels = this.leds[0].type.length || 3; + const buffer = new ArrayBuffer(this.leds.length * channels); + const output = new Uint8Array(buffer); let offset = 0; this.leds.forEach((led) => { - output.set(led.toOctet(), offset); - offset += 3; + output.set(led.toOctet(), offset); + offset += channels; }); return output; } diff --git a/src/lib/led.ts b/src/lib/led.ts index d998a63..646212c 100644 --- a/src/lib/led.ts +++ b/src/lib/led.ts @@ -11,6 +11,9 @@ export class Led { red: number; green: number; blue: number; + white?: number; + + private _type: 'rgb'|'rgbw'; /** * Creates an instance of the Led class. @@ -19,10 +22,51 @@ export class Led { * @param {number} green - Green value (0-255). * @param {number} blue - Blue value (0-255). */ - constructor(red: number, green: number, blue: number) { + constructor(red: number, green: number, blue: number, white?: number) { this.red = red; this.green = green; this.blue = blue; + this.white = white; + this._type = typeof white === 'number' ? 'rgbw' : 'rgb'; + } + + /** + * Gets the LED type. + * @returns {'rgb'|'rgbw'} The LED type. + */ + get type(): 'rgb' | 'rgbw' { + return this._type; + } + + /** + * Converts the LED to RGBW. + * + * @returns {Led} The updated Led instance. + */ + toRgbw(): this { + if (this._type === 'rgbw') return this; + this.white = 0; + this._type = 'rgbw'; + return this; + } + + /** + * Converts the LED to RGB. + * + * @param {boolean} [preserveWhite] - If true, the white value will be preserved. + * @returns {Led} The updated Led instance. + */ + toRgb(preserveWhite = false): this { + const white = this.white; + if (this._type === 'rgb') return this; + this.white = undefined; + this._type = 'rgb'; + + if (white && preserveWhite) { + this.brighten(white / 255); + } + + return this; } /** @@ -31,7 +75,11 @@ export class Led { * @returns {Uint8Array} The RGB values in a Uint8Array format. */ toOctet(): Uint8Array { - return new Uint8Array([this.red, this.green, this.blue]); + return new Uint8Array( + this._type === 'rgbw' + ? [this.white!, this.red, this.green, this.blue] + : [this.red, this.green, this.blue] + ); } /** @@ -40,7 +88,7 @@ export class Led { * @returns {boolean} True if the LED is on, false otherwise. */ isOn(): boolean { - return this.red > 0 || this.green > 0 || this.blue > 0; + return this.red > 0 || this.green > 0 || this.blue > 0 || this.white! > 0; } /** @@ -52,6 +100,7 @@ export class Led { this.red = 0; this.green = 0; this.blue = 0; + this._type === 'rgbw' && (this.white = 0); return this; } @@ -63,10 +112,14 @@ export class Led { * @param {number} blue - New blue value. * @returns {Led} The updated Led instance. */ - setColor(red: number, green: number, blue: number): this { + setColor(red: number, green: number, blue: number, white?: number): this { this.red = red; this.green = green; this.blue = blue; + if (typeof white === 'number') { + this.white = white; + this._type = 'rgbw'; + } return this; } @@ -79,6 +132,7 @@ export class Led { this.red = 255 - this.red; this.green = 255 - this.green; this.blue = 255 - this.blue; + typeof this.white === 'number' && (this.white = 255 - this.white); return this; } @@ -88,7 +142,7 @@ export class Led { * @returns {string} String in the format 'rgb(r, g, b)'. */ toString(): string { - return `rgb(${this.red}, ${this.green}, ${this.blue})`; + return `${this._type}(${this.red}, ${this.green}, ${this.blue}, ${this.white})`; } /** @@ -101,6 +155,7 @@ export class Led { this.red = Math.min(255, Math.round(this.red * factor)); this.green = Math.min(255, Math.round(this.green * factor)); this.blue = Math.min(255, Math.round(this.blue * factor)); + this._type === 'rgbw' && (this.white = Math.min(255, Math.round((this.white || 0) * factor))); return this; } @@ -114,6 +169,7 @@ export class Led { this.red = Math.max(0, Math.round(this.red * factor)); this.green = Math.max(0, Math.round(this.green * factor)); this.blue = Math.max(0, Math.round(this.blue * factor)); + this._type === 'rgbw' && (this.white = Math.max(0, Math.round((this.white || 0) * factor))); return this; } @@ -137,6 +193,10 @@ export class Led { 255, Math.max(0, average + factor * (this.blue - average)) ); + this._type === 'rgbw' && (this.white = Math.min( + 255, + Math.max(0, average + factor * ((this.white || 0) - average)) + )); return this; } @@ -151,7 +211,7 @@ export class Led { this.red = this.red + factor * (average - this.red); this.green = this.green + factor * (average - this.green); this.blue = this.blue + factor * (average - this.blue); + this._type === 'rgbw' && (this.white = (this.white || 0) + factor * (average - (this.white || 0))); return this; } } - diff --git a/src/lib/light.ts b/src/lib/light.ts index 28a7931..a9bc15b 100644 --- a/src/lib/light.ts +++ b/src/lib/light.ts @@ -1,14 +1,14 @@ import { generateRandomHex } from "./utils.js"; import axios, { AxiosInstance, AxiosResponse } from "axios"; -import FetchWrapper, { FetchResponse } from "./fetchwrapper.js"; +import { FetchWrapper, FetchResponse } from "./fetchwrapper"; import delay from "delay"; // dynamically import udp for compatibility with browser // import * as udp from "node:dgram"; -import { Led } from "./led.js"; -import { Frame } from "./frame.js"; -import { Movie } from "./movie.js"; +import { Led } from "./led"; +import { Frame } from "./frame"; +import { Movie } from "./movie"; import { rgbColor, @@ -18,7 +18,7 @@ import { timer, coordinate, layout, -} from "./interfaces.js"; +} from "./interfaces"; // create error let errNoToken = Error("No valid token"); @@ -35,6 +35,7 @@ export class Light { token: AuthenticationToken | undefined; activeLoginCall: boolean; nleds: number | undefined; + name: string | undefined; udpClient: any; //udp.Socket; /** * Creates an instance of Light. @@ -239,6 +240,8 @@ export class Light { */ async getDeviceDetails(): Promise { let data = await this.sendGetRequest("/gestalt", undefined, false); + this.nleds ??= data.number_of_led; + this.name ??= data.device_name; return data; } /** @@ -264,6 +267,7 @@ export class Light { * @returns {Promise} Name of device */ async getName(): Promise { + if (this.name) return this.name; let data = await this.sendGetRequest("/device_name"); let res: string = data.name; return res; diff --git a/src/lib/movie.ts b/src/lib/movie.ts index 2dfb0e8..a4daa52 100644 --- a/src/lib/movie.ts +++ b/src/lib/movie.ts @@ -1,4 +1,4 @@ -import { Frame } from "./frame.js"; +import type { Frame } from "./frame"; export class Movie { id: number; @@ -10,7 +10,10 @@ export class Movie { frames_number: number; fps: number; frameData: Frame[]; - constructor(data: any) { + + private _channels: number; + + constructor(data: Record) { // Required for toOctet() this.frameData = data.frames || null; @@ -32,6 +35,8 @@ export class Movie { this.frames_number = data.frames_number || this.frameData.length; this.fps = data.fps || 0; + this._channels = this.descriptor_type.startsWith("rgbw") ? 4 : 3; + // Not used yet this.id = data.id || 0; this.loop_type = data.loop_type || 0; @@ -53,7 +58,7 @@ export class Movie { this.frames_number = frames.length; this.leds_per_frame = frames[0].getNLeds(); const buffer = new ArrayBuffer( - this.frames_number * this.leds_per_frame * 3 + this.frames_number * this.leds_per_frame * this._channels ); const output = new Uint8Array(buffer); frames.forEach((frame, index) => { @@ -64,7 +69,7 @@ export class Movie { let octet = frame.toOctet(); // add octet to output - let offset = index * this.leds_per_frame * 3; + let offset = index * this.leds_per_frame * this._channels; output.set(octet, offset); }); // this.frameData = output; @@ -76,12 +81,12 @@ export class Movie { this.frameData.forEach((frame) => { let leds = frame.leds; if (isCompressed) { - leds = frame.leds.filter((led) => { - return led.red != 0 && led.green != 0 && led.blue != 0; - }); + leds = frame.leds.filter( + (led) => led.red || led.green || led.blue || led.white + ); } let numNonBlackLeds = leds.length; - nBytes += numNonBlackLeds * 3; + nBytes += numNonBlackLeds * this._channels; }); return nBytes; } diff --git a/tsconfig.json b/tsconfig.json index c755816..f04e156 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,9 +40,9 @@ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ /* Emit */ - "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "emitDeclarationOnly": false, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ "outDir": "./dist/" /* Specify an output folder for all emitted files. */,