@daanv2/hue
TypeScript icon, indicating that this package has built-in type declarations

1.0.20 • Public • Published

DaanV2.Hue

A typescript library for controlling Philips Hue lights.

Usage

//Get bridges on network
const bridges = await Discovery.getBridgesOnNetwork();

//Setup bridge connection
const bridge = new Bridge(bridgeId, bridgeIp);
const app = await ApplicationConnection.setupApplication(bridge, appKey);

First time setup between bridge and application

The bridge needs to authorize the application before it can be used. This is done by pressing the button on the bridge and then calling the following function.

//Setup bridge connection
const bridge = new Bridge(bridgeId, bridgeIp);
const appKey = bridge.registerDeveloper("<APP ID>#<Device Id>");

//Then setup the application connection
const app = await ApplicationConnection.setupApplication(bridge, appKey);

Readme

Keywords

Package Sidebar

Install

npm i @daanv2/hue

Weekly Downloads

1

Version

1.0.20

License

MIT

Unpacked Size

70.3 kB

Total Files

85

Last publish

Collaborators

  • daanv2