Link hue bulbs to switch with dimming, brightening etc.?

Posted on
Mon Jun 08, 2015 7:29 pm
nanobots offline
Posts: 43
Joined: Apr 28, 2015

Link hue bulbs to switch with dimming, brightening etc.?

Sorry if this is covered somewhere, I've tried searching but haven't come up with an answer.

I'd like a button on a KPL to control a hue light (or group) similarly to how the insteon buttons can natively control other insteon devices. That is:
Press on/off: turns light on/off
Press and hold: alternately dims and brightens the light
Double press: instant on/off

I'm assuming I could do this with each light individually by setting up triggers and actions, but I wondered if there was an easier way to do this... Basically just want to connect a hue light to a switch and have it mimic the normal insteon dimmer functionality.

Thanks

Posted on
Sat Jun 13, 2015 11:38 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Link hue bulbs to switch with dimming, brightening etc.?

Hi nanobots.

Sorry for the late reply.

Yes. You can do all of that using a KPL with Hue Lights. Here are the basic steps for each.

First, make sure all your Hue connected lights and groups have corresponding Indigo devices in the Device list within the Indigo application. If not, you can create new Indigo devices that correspond to your Hue devices by creating a new Indigo device and selecting Hue Lights as the source, then selecting the Hue device from the dialog that appears.

Press on/off: turns light on/off
  1. This requires 2 Indigo triggers to be created. The first trigger responds to the KPL button ON message. The second trigger responds to the KPL button OFF message.
  2. The ON trigger will have an Action of turning on a Hue Lights device.
  3. The OFF trigger will have an Action of turning off the Hue Lights device.
Press and hold: alternately dims and brightens the light
  1. This is a bit more difficult because Indigo doesn't have the built-in ability to activate triggers when a Start Dimming, Stop Dimming, Start Brightening, or Stop Brightening INSTEON message is received (even though it does receive them). Therefore, you'll need to also install my Dimmer Extender plugin which can capture these INSTEON Dimming/Brightening Start/Stop messages and allow you to create triggers from them. You'll then need to create 4 triggers for each KPL button (yes, I know it's cumbersome). One trigger to start dimming the Hue device. One trigger to stop dimming the Hue device. One trigger to start brightening the Hue device. And one trigger to stop brightening the Hue device.
  2. The INSTEON Start Brightening trigger will have an Action of Type "Start/Stop Brightening", found in the Device Actions -> Hue Lights Controls pop-up menu.
  3. The INSTEON Stop Brightening trigger will have an Action of Type "Start/Stop Brightening".
  4. The INSTEON Start Dimming trigger will have an Action of Type "Start/Stop Dimming".
  5. The INSTEON Stop Dimming trigger will have an Action of Type "Start/Stop Dimming".
Double press: instant on/off
  1. This requires 2 Indigo triggers to be created. The first trigger responds to the KPL button Instant (Fast) ON message. The second trigger responds to the KPL button Instant (Fast) OFF message.
  2. The Instant ON trigger will have an Action of turning on a Hue Lights device with a custom Ramp Rate time of 0 seconds.
  3. The Instant OFF trigger will have an Action of turning off the Hue Lights device with a custom Ramp Rate time of 0 seconds.

Hope that helps.

Posted on
Sun Jun 14, 2015 11:11 pm
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: Link hue bulbs to switch with dimming, brightening etc.?

Have been using the Hue plugin with a KPL myself, I've been playing with the functions you just covered. I hope you don't mind me tagging another question onto this one? I don't know if this is covered elsewhere, but maybe you can give me some insight.

I want to use a single KPL to control a single Hue light (recessed light over my tub actually). It's not a HuxLux... but a normal recessed BR30 type Hue.

The way I envisioned it was a sort of normal white light dimmable LED lamp with RGB colors that can be mixed together.

Buttons 1 and 2 would control the "white" light, on/off, dimming, etc.

Buttons 3 and 4 would control RED only.... ON/OFF, dimming/brightening.

Buttons 5 ad 6 would control GREEN only... same way...

Buttons 7 and 8 would control BLUE only. Same way.

When I turn up the RED, the GREEN, or the BLUE (or the white stuff)... I don't want the other colors to change if that is possible.

An alternate method would be to use only 4 buttons... one for white and one each for R, G, and B. Saves 4 buttons for other functions, like maybe scenes.

The "Set RED/GREEN/BLUE levels" command in your plugin would be almost perfect... if I could use variables for RGB... maybe. Not sure if I could get the KPL to behave.

Any chance of something like this with the plugin? Thanks.

-Al

Posted on
Sun Jun 14, 2015 11:31 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Link hue bulbs to switch with dimming, brightening etc.?

Hi Al.

Doing something close to this should be possible, though it won't be a quick setting change. You'd still need to create triggers for each KPL button and for both ON and OFF messages. And you'd still use the Dimmer Extender plugin to detect and trigger off of the INSTEON Start/Stop Brightening/Dimming messages from the KPL buttons. Changing only the red, green, or blue values in a bulb's settings would require the use of embedded Python scripts for the trigger actions. If you're not familiar with Python, and more specifically Python with Indigo, you'll probably want to check out the examples in the online Indigo documentation. Once you've become somewhat familiar with Python in Indigo, you can use the Python code examples for controlling the Hue Lights plugin on the Hue Lights plugin page, modifying them to fit your own needs. The fading effect will be the most difficult to get I think. This will involve setting the Ramp Rate value in the Python scripts just right for the INSTEON Start Dimming and Start Brightening triggers.

Hope that helps get things started for you.

Posted on
Sun Jun 14, 2015 11:44 pm
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: Link hue bulbs to switch with dimming, brightening etc.?

Thanks for the tip. My Python isn't too bad and I remember now that you mention it that the help file has some great coding examples. I'm playing with multiple attribute controllers in the plugin this evening and notice how they interact together. Lots to chew on. Perhaps I can modify my approach on dimming individual R, G, and B levels after I become a bit more schooled on the color approximations of Hue.

-Al

Posted on
Sun Jun 14, 2015 11:49 pm
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: Link hue bulbs to switch with dimming, brightening etc.?

ImageUploadedByTapatalk1434347335.876392.jpg
ImageUploadedByTapatalk1434347335.876392.jpg (229.12 KiB) Viewed 3848 times

-Al

Posted on
Sun Jun 14, 2015 11:52 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Link hue bulbs to switch with dimming, brightening etc.?

Hey Al.

It took me a little bit to get into Python, but if you've already had some exposure to it, I'm sure you'll be able to get the color changing thing going soon.

Cool idea with the KPL button colors, by the way!

Posted on
Mon Jun 15, 2015 12:27 am
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: Link hue bulbs to switch with dimming, brightening etc.?

I plan on inserting a little semi opaque white label material soon to hide the LEDs. Just haven't done it yet but should help diffuse the light. I would buy smarthome custom etched buttons but their price is now $50 a set... Up from $20. It's not the money but nobody likes being ripped off. Thanks again. Will upload any progress if it works well for others who may be able to use it.

-Al

Posted on
Mon Jun 15, 2015 8:57 am
nanobots offline
Posts: 43
Joined: Apr 28, 2015

Re: Link hue bulbs to switch with dimming, brightening etc.?

Thanks Nate,

I kind of figured that would be the way to do it. Quick question... can you envision a way to do this any easier (through writing a plugin for example?) or is this as simple as it can get? I have quite a few Hue lights and groups and setting all of these up could take quite a while. I'm not afraid to write some python code or even a full blown plugin, I'm just not exactly sure where to start with this.

Thanks again

Posted on
Mon Jun 15, 2015 9:36 am
akimball offline
Posts: 559
Joined: Aug 07, 2013
Location: Sandy, Utah

Re: Link hue bulbs to switch with dimming, brightening etc.?

For dim/brightness triggers at least, I think using Python and an external script there should be a way to save the device and button info on a start dim or start brighten trigger info in anticipation of a stop event. Not sure. The second trigger being anticipated by the running script (with appropriate time out); then the script self terminates.

-Al

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests