Phillips Hue - Bridge


The Phillips Hue Bridge is the device that you plug into your home Wi-Fi router, in order to control up to 50 Phillips Hue Lights.

How To Connect

To connect cylon-hue to a Phillips Hue bridge, you will need to know which host IP address the bridge has on the local network. You can find this out by using your router, or logging into the "Meet Hue" website at https://www.meethue.com/en-us/user/bridge if you have linked your bridge.

You also need to either already have a user account on the bridge, or create a new account, so you can obtain the username. You can do this by using the JS file located at examples/create_user.js.

Cylon.robot({
  connections: {
    hue: { adaptor: 'hue', host: '192.168.1.101, username: 'XXX' }
  },

  devices: {
    bridge: { driver: 'hue-bridge'}
  }
});

How To Use

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    hue: { adaptor: 'hue', host: '192.168.1.101', username: 'XXX' }
  },

  devices: {
    bridge: { driver: 'hue-bridge'}
  },

  work: function(my) {
    my.bridge.getFullState(function(err, config) {
      if (err) {
        console.log(err);
      } else {
        console.log(config);
      }
    });
  }
}).start();

Commands

registeredUsers

Finds all registered users.

Params

  • callback (Function) function to be triggered when users are found

Returns

  • (undefined)

createUser

Creates a new user

Params

  • username (String) preferred username

  • description (String) description of new User

  • callback (Function) function to be triggered when user is created

Returns

  • (undefined)

deleteUser

Deletes the specified user

Params

  • username (String) username of user to delete

  • callback (Function) function to be triggered when user is deleted

Returns

  • (undefined)

locateBridges

Returns info on known Hue bridges

Params

  • callback (Function) function to be triggered with bridge info

Returns

  • (undefined)

searchForBridges

Searches for Hue bridges on the network

Params

  • timeout (Number) length of timeout delay

  • callback (Function) function to be triggered with bridge info

Returns

  • (undefined)

config

Obtains a summary of bridge configuration

Params

  • callback (Function) function to be triggered with bridge info

Returns

  • (undefined)

getFullState

Obtains the complete status of a bridge

Params

  • callback (Function) function to be triggered with bridge info

Returns

  • (undefined)

lights

Obtains all lights registered with the bridge

Params

  • callback (Function) function to be triggered with lights info

Returns

  • (undefined)

Compatibility