Skip to content

node.js based simulator of a philips hue bridge implementing the API

License

Notifications You must be signed in to change notification settings

galactoise/hueSimulator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A node.js based simulator for the Philips Hue API

As I started development of hueJS before getting my Hue starter kit, i needed to test my code with a simulated bridge.

Install

Using npm:

sudo npm install -g hue-simulator

It should be installed globally by default, so you can start the simulator via command line, but to be sure we are adding the -g flag.

Run

Start the simulator via command line:

sudo hue-simulator

Sudo is necessary because we want to listen on port 80.

Debugger

Like a real bridge, you have a webinterface where you can enter commands. After starting the simulator, simply navigate your browser to the IP of the simulator. screenshot of webinterface In the list on the left, you have predefined commands, so you don't always have to look up the correct URL and write the whole JSON-body of the message. Click on a button, and the command-form is filled with dummy data for this kind of command.

Routes

GET /linkbutton will enable user registration for 30 seconds. By default, a user named "newdeveloper" is whitelisted. Registered users and state of the simulator will be lost when restarting. So you always have a "fresh" system.

At the moment, all routes from the hue API are available, except schedules.

About

node.js based simulator of a philips hue bridge implementing the API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 66.2%
  • JavaScript 33.8%