2

Just started writing my hue apps and so far the basics look good, except that lack of javadocs for some APIs makes life a little harder. So my question is how can I make the light have a blinking effect? I tried doing something like this

//pseudo code
lightState.setOn(true);
Log.e("TAG", "State for Light 2 =" + lightState.validateState());
bridge.updateLightState(light2, lightState, listener);

// Sleep thread for sometime

lightState.setOn(false);
Log.e("TAG", "State for Light 2 =" + lightState.validateState());
bridge.updateLightState(light2, lightState, listener);

so on and so forth. Is this the best way to do it? The problem is I barely see any blink. Sometimes it happens sometimes it just get dimmed. What is a best way to blink?

Thanks

user2453055
  • 975
  • 1
  • 9
  • 19

1 Answers1

4

In the documentation at http://www.developers.meethue.com/documentation/core-concepts it states in the "Some extra fun stuff" section that you can blink by setting the light alert state:

“alert” – this resource is for temporary effects and more may come in the future. At the moment to make the light do a blink in its current color send {"alert":"select"}

So use the updateLightState API to set the "alert" value to "select".

caprica
  • 3,902
  • 4
  • 19
  • 39