← Back to knowledge base |
  • Web development

Philips Hue experiments

I created an app for the Anybody hotel that controls Philips Hue lights. However, before I was able to design and implement the app, I researched the possibilities of the technology from the UX and developer's point of view. In this post, I share videos that demonstrate my experiments that led to the finalized app.

Working on the Anybody hotel project has been a great experience in many aspects and I am grateful that I am part of the team. 

One of the goals of the app should have been to connect the sound and the lights. So my experiments were searching for touchpoints of those two aspects. All the experiments run in the web browser using the jsHue library. I am not going to share any code here, my goal is to get you to know what is possible to do with Philips Hue.

Using a mic to control the lights

In the first example, a microphone is listening to loud sounds and switches lights on and off.

In the second example, a speaker is playing music and a microphone is listening to the sound intensity. Based on that, the intensity of the lights gets set.

Using audio track playback to control the lights

During an audio track playback, I am able to read various values describing the current state of the sound with Web Audio API. In the following example, I set lights intensity and color based on the current state of the sound.

Pre-programmed lights

The methods mentioned above give reasonable results. However, the lights are delayed a bit as they react to the sound. Also, you may want to set the behavior of the lights exactly according to your needs. So, I tried to pre-program/script the lights to fit the music more precisely.

Using Kinect to control the lights

I wanted to push the limits a bit. I incorporated Microsoft Kinect to switch lights on and off based on hand movement.

Finalized app

In the last two videos, I demonstrate the final app. It controls audio tracks playback and the lights. Also, the app can interact with the Hue Smart plugs to be able to control other devices than the lights. (The mic is not involved in any of the app logic. We are not recording or listening to the users in any way).

The following example demonstrates the app UI and behavior.

The last example demonstrates how it feels to be in the hotel room.

About the author

Milan Lund is a Freelance Web Developer with Kentico Expertise. He specializes in building and maintaining websites in Xperience by Kentico. Milan writes articles based on his project experiences to assist both his future self and other developers.

Find out more
Milan Lund