Philips Hue

Light Up Your Room. This example shows how to make an app to control the Philips Hue lights.

Read a review of Philips Hue at Ars Technica.

Source code

You can browse the source code for this example at the Evothings GitHub repository

The file index.html contains the HTML markup and JavaScript code of the app.

Communication with the Hue Bridge is made over HTTP, using Ajax.

What you need

This example runs in Evothings Viewer on Android or iOS.

You need a set of Philips Hue lights.

How to get up and running

Follow these steps to get started with this example:

  • Turn on the Hue light bulbs (preferably having them nicely arranged for best effect ;)
  • Plug in the power to the Hue Bridge, and insert an Ethernet cable connected to the Internet (the Hue Bridge must have a connection to the Internet, otherwise it won't work).
  • Run Evothings Workbench on your desktop/laptop computer.
  • Connect to the Workbench from Evothings Viewer.
  • Run the "Hue Lights" example from the Workbench window.
  • Press the button on the Hue Bridge to make it discoverable.
  • Tap the Connect button in the app. If everything works, the app will find the IP address of the Hue Bridge (if you have multiple Hues connected, the first one detected will be used). You can also add the IP address to any Hue Bridge if you know it.
  • Use the on-screen buttons in the app to interact with the lights. In the example you interact with one light bulb at a time, select which one from the top row of buttons.
  • Now you can go into the code and modify the colors, add buttons to the app and so on. We would be delighted to hear about your experiments. If you have a blog post or video you wish to share, we are most happy to feature it on the Evothings web site!