Introduction
Before proceeding, be sure to review Interface Asset general concepts, including the video at the end of that article.
This interface asset (IA) enables you to control Philips hue lights - both the bulb and the LightStrips - over a local network using any device. It is based on the REST protocol and uses the Philips hue Web API.
- Watch this video of the Philips hue and Philips hue interface asset to see it in action.
- To try it yourself, download the Full HD and/or iPad-ready sample experiences located in the Composer and Player Experiences panel.
- Interested in building your own REST-based interface assets and want to see how we did it for the Philips hue? Browse to
C:\Users\{userName}\AppData\Local\IntuiLab\Intuiface\Composer\Resources\Interface Assets\PhilipsHueJS
- Open the file PhilipsHue.ifd file in your favorite editor then reference our article about hand-crafting an interface asset for Web APIs for insight into the use of Web services with Intuiface.
What can be done with it?
With the Philips hue interface asset, you will be able to:
- turn lights on/off
- change their color/brightness/saturation
- make them blink or enter a color loop mode
As usual, all of these actions can be called from any trigger available in Intuiface, everything from a simple button click to an inactivity timer.
Many scenarios can be created using the hue connected object and there are many ways for you to enhance your users's experience. Here are a few examples:
- When a person is detected by a motion sensor then turn on the lights
- When I enter a new space in my experience then change the color of the light bulb to fit this space's ambiance (e.g. match main color of the background image)
- When I click on a very important button then make the light bulb blink in red to warn me I'm about to do something dangerous (the "red button" syndrome)
Feel free to share with us your scenarios and ideas in a new discussion on our forum.
By the way, you could have created this interface asset yourself using API Explorer, as you could for any REST-based Web API. Because we think connected objects like these hue lights are part of a new wave in user experiences, we decided to make this an out-of-the-box example.
Finding the Philips hue IA
This interface asset comes pre-installed with Intuiface Composer. You will find it in the Interface Assets panel.
Configuring the Philips hue IA for use
In order to use the Philips hue interface asset, you need to get two things:
- the IP Address of your bridge (or its name if you use a DNS on your network). For example: 192.168.1.102 or myphilipshue
- an authorized username for use of the Philips API on your bridge.
To acquire those two values, follow the Getting Started guide on the Philips website.
Then you must register your new username with your bridge:
- Go to this URL:
http://<bridge ip address>/debug/clip.html
- Type the following
- URL:
/api
- Message body:
{"devicetype":"my_hue_app#iphone peter"}
- URL:
- Press the link button on your bridge
- Click the POST button on this webpage to send the command
The bridge IP address and the generated username are the main properties of the hue Interface Asset. With them you are able to interact with your light bulbs.
Properties, Triggers & Actions
Important Notice: Each Philips hue Interface Asset enables you to control one bulb or LightStrip. If you want to control several lights, you can either :
- instantiate as many Philips hue interface assets as you have lights.
- dynamically change the Light ID property of the Philips hue interface asset.
Light IDs will be 1, 2 and 3 for the three bulbs you get with your starter kit. See Philips documentation for guidance about how to ID your light bulbs.
Properties
- Light ID: the ID of the light you will control with this instance of the Philips hue interface asset
- User name: the username you created in the Getting Started section above
- Bridge IP address: the address of your bridge on your local network
Triggers
- Light can't be reached: raised when the light is physically switched off.
- Light is now reachable: raised when the light is physically switched on.
- Light turned off: raised when light has been turned off, by this application or another source (ex: mobile app)
- Light turned on: raised when light has been turned on.
Actions
- Light control
- Brightness
- Change brightness
- Color
- Change color (hexadecimal)
- Change color (hue / saturation)
- Change color (temperature)
- Change hue
- Change saturation
- State
- Turn light on
- Turn light off
- Brightness
- Light effects
- Change alert mode: Alert mode is a temporary change to the bulb’s brightness. This action can have one of three values:
- “None” – Alert mode stops if it is running.
- “Alert Once” – The light performs one cycle of increasing then decreasing brightness.
- “Alert Multiple” – The light performs the increase/decrease brightness cycle for 30 seconds or until the Change alert mode action is called with the None parameter - whichever occurs first.
- Change effect mode: The dynamic effect of the light. Currently “None” and “Color Loop” are supported. Setting the effect to Color Loop will cause the light to cycle through all hues using the current brightness and saturation settings.
- Change alert mode: Alert mode is a temporary change to the bulb’s brightness. This action can have one of three values:
References
To simplify use, we constrain the Hue parameter to a range of 0 to 360, representing the value in degrees on the HSL color wheel.
Here is the standard HSL color wheel for reference.
Troubleshooting
If you're having trouble establishing a connection between Intuiface and your Philips hue bulb, use the Philips hue "Getting Started" guide to attempt interaction with your bulb via a Web browser. Failure to work with a Web browser means the problems are unrelated to your use of Intuiface. If it does work in a Web browser but you continue to have problems using Intuiface, let Support know.
Comments
0 comments
Article is closed for comments.