Capturing Hue Tap taps

Posted on
Thu Feb 05, 2015 11:44 pm
cconrad offline
Posts: 37
Joined: Apr 07, 2013
Location: Madison, WI

Capturing Hue Tap taps

I've come up with a (sort of funny) way to see Hue Tap button presses in Indigo:

  • Go buy a $15 GE Link bulb, and screw it into an ugly lamp that should've been thrown away years ago
  • Pair the GE Link bulb with your Hue Hub, and name the bulb something like: 'Hue Tap Receiver'
  • Create a scene in the Hue iOS app that contains only the 'Hue Tap Receiver' bulb, and name it something like: 'Hue Tap Button 3'
  • Again using the Hue iOS app, assign button three of your Hue Tap to the 'Hue Tap Button 3' scene
  • Create a trigger in Indigo:
    • Type: Device State Changed
    • Device: Hue Tap Receiver, On/Off State, Becomes On
    • Condition: Always
    • Actions:
      • Turn off 'Hue Tap Receiver'
      • Execute action group of your choice for button 3
  • Hide the ugly lamp somewhere out of sight where you can keep it plugged in
  • To capture more buttons on the Hue Tap, you can create multiple scenes for your 'Hue Tap Receiver' bulb that set the brightness to different levels, like 25%, 50%, 75%, then create a trigger for each button with a condition that look for ranges of brightness, like 20-30% for button 1, 45-55% for button 2, 70-80% for button 3, etc. You can see the values of each 'button' brightness in the Event Log. I've noticed sometimes they can vary sightly, that's why it's a good idea to look for a range, rather than an exact value.

So, the biggest issue I've found with this solution is that it can take anywhere from 2 to 20 seconds for the button press to be recognized by Indigo. I know very little about the Hue Lights plugin code but I tried decreasing the sleep times in the Concurrent Thread and it may have helped a little. I imagine the maximum delay depends partly on the number of Hue bulbs you have installed?

Is it also the case that the Hub doesn't update status more than a few times per minute, or is that how the plugin is currently designed? Hoping it's the latter.

Could the plugin be modified to poll the status of a bulb that has been designated as a 'Hue Tap Receiver' at a much shorter interval, like once per second?

Yes, this is not the most elegant solution (or trick), but it allows Indigo to see the Hue Tap, it's inexpensive , and relatively easy to implement.

If you're feeling like the unpredictably slow response of this trick is a show stopper, this can still be of use where time isn't of the essence. For example, I have a Hue Tap near my back door and I used this method to set button 3 to turn off all the lights in my house and change my house mode to Away. When it's time to leave, I press button 3, and walk out the door. It doesn't matter that it may take 20 seconds for the actions to execute. When I come home, the door sensor turns my lights back on, and changes my house mode back to Home.

Anyways, hope you find this useful! Maybe this method can be improved or incorporated into the Hue plugin in some way.

-chris

Posted on
Sat Feb 14, 2015 1:00 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Capturing Hue Tap taps

Hi Chris.

Thanks for the helpful tips!

Unfortunately, the Hue Tap only sends signals to the Hue hub and the Hue hub doesn't have any kind of API interface (that I'm aware of) to allow 3rd party applications (like the Hue Lights plugin) know when a Hue Tap is used. So your solution could come in very handy, as you said, as long as time isn't of high importance.

Yes, the amount of time between Concurrent Thread loops is increased with greater numbers of Hue devices and groups associated with the hub.

I don't know exactly how often the Hue hub updates the status of each device internally, but it seems to be much more frequently than once per minute. However, it does seem to be less frequently than once per second. I suspect it's based somewhat on how many devices you have paired with the hub and on how often you request a status update from the hub. Using the Hue iOS app is a good way to gage the hub's update speed I think. You'll notice that there's at least a 2 or 3 second delay between when you change a light state using Indigo and when the Hue iOS app updates the status. Some of that might be the frequency of the iOS app updates, but I suspect Philips' setting of that interval is based on some unpublished knowledge of how frequently the hub actually gathers light status info.

Could the Hue Lights plugin be modified to designate one or more devices as "Receiver" devices? Yes, it is possible. I'm not sure it's the best design choice to make, so I can't yet commit to making that change myself. But the plugin is freely available on GitHub should anyone wish to contribute code to do that.

Thanks again for posting the helpful tip for everyone!

Posted on
Sun Jun 21, 2015 10:19 am
jkmonroe offline
Posts: 3
Joined: Dec 15, 2013

Re: Capturing Hue Tap taps

If you are polling the Hue bridge, you can get the last button press information from each unique Tap. That would be a cheap and dirty way to get Tap presses inside of Indigo on which we could trigger actions.

I am demo'ing Indigo and this is primary functionality that is missing from my current HA controller.

Posted on
Sun Jun 21, 2015 10:34 am
cconrad offline
Posts: 37
Joined: Apr 07, 2013
Location: Madison, WI

Re: Capturing Hue Tap taps

Can you please explain your polling method and how you are seeing the last button press?

Posted on
Sun Jun 21, 2015 10:56 am
jkmonroe offline
Posts: 3
Joined: Dec 15, 2013

Re: Capturing Hue Tap taps

Well, I am using a commercial HA product, so I didn't write the backend or have any idea how it works beyond configuration. What I do know, is that if you browse to http://<ip of bridge>/api/<dev name>/sensors, you can see all of the information that is coming from your Taps. You can find more information on how to set a developer name here: http://www.developers.meethue.com/documentation/getting-started. You probably need to register for access, though.

I have replaced all of the lights in my home with bulbs connected to the Hue bridge, and my light switches have been replaced with Hue Taps. This works great because each switch location now has a 4 button controller that can interact with all other devices in my home. Think press Tap button 4 to trigger all lights off AND put the Tivo into standby and lock the front door.

Image

Posted on
Wed Mar 27, 2019 3:58 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Capturing Hue Tap taps

Version 1.7.0 Posted

  • Added support for the Hue Tap and Hue Dimmer Switches.
  • Changed all references to the "Hue hub" to "Hue bridge".

Version 1.7.1 Posted

  • Added support for the Run Less Wire switch.
  • Fixed a bug that would prevent Hue Tap switches from appearing in the device selection list.

Version 1.7.2 Posted

  • Fixed a bug with Run Less Wire switch support that would not allow you to select a Run Less Wire switch device in the device selection dialog.
  • Fixed a bug with Run Less Wire switch support that returned numerous errors when the plugin attempted to update the online state of the switch which has no online state.
  • Fixed a bug with Run Less Wire switch support that would not update switch states during initial plugin load.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests