Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Integrating Hue lights with web projects

Friday, April 24th, 2015 by Servage

hueIntelligent homes are spreading across the globe, and many people start getting smart appliances without even knowing it. Examples are WiFi connected televisions, alarms, sensors, heating controls and lighting. Specifically for lighting there are a few LED systems available with good quality of light, both with warm and cold white light, and also color light. One of those systems is Philips Hue, which offers a range of bulbs, lamps and stripes powered by LED. They are connected via a controller, which in turn is connected to your home network. This facilitates that you can control your light system via apps. However, it does not stop there. Philips has made the Hue system open to developers via an API, and there are already many apps available for Android, iOS, Mac OS and other systems. The Hue developer pages offer a good overview over the available software development kits, and you are likely to find something useful no matter which language you program in.

Web-based Hue integration

It is specifically interesting for web developers that there are SDKs available for web technologies such as PHP and Javascript. Thereby you can integrate Hue lights into your own applications, and trigger lighting based on your own web programming.

There are multiple libraries available for PHP and Javascript integration with Hue. Listed below you will find some of the best ones which are still maintained. This is judged by the quality and documentation of code in the libraries, and how recent changes have been made to the code repositories. You can find a full list on the Hue developer pages.

Javascript SDK

JsHue provides a good object interface to the Hue API – and the code on Github seems well documented and recently updated.

AngularJS is a Hue service provider for the popular Angular Javascript framework – and may be a good choice if you already use Angular.

PHP SDK

There are multiple PHP Hue integration projects available, but 3 appear very interesting. They all seem fairly extensive and somewhat recently updated. You will need to see which one suits your needs the best, as they may not have the exact same functionality integrated.

Usage examples

There are many interesting scenarios in which you could use a web-based Hue integration. Below are listed a few ideas which you can use as inspiration for your own solutions.

  • Lamp color indicates traffic load on website. Few visitors gives a bright white light, where more visitors make the light warmer, going into yellow, orange, and finally red, if there are many visitors.
  • Light flashes to indicate new order. Depending on your volume, the light could flash until you process the order. Alternatively for high volume systems, you could simply flash the light once for every new order.
  • Light on/off depending on a given status. This could be used for many examples to indicate pending work. For example a lamp is off or green when there is no pending support questions, whereas it could be yellow, orange or red if there are some or many pending tickets open.

Enjoy making your own light solutions that work together with your web project.

 

Integrating Hue lights with web projects, 3.6 out of 5 based on 5 ratings
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.