LiFX Color/Brightness Change Over Time


(Doug) #1

Hey all, I’m relatively new to the SmartThings community and I’m looking for some advice.

I currently have 2 LiFX Color 1000 bulbs, and just ordered another 4 after having great experiences with them. I don’t mind managing most of the color changes/white temperatures through the LiFX app, but I want to set my wife up with the SmartThings app (or perhaps just an Aeon Minimote, which I just ordered as well) to do several things that I don’t seem to be able to do within the SmartThings app, and thought someone could be of assistance.

Primarily, I want to be able to press a button on the remote to trigger a color change (sometimes from one white temperature to another white temperature, sometimes from white to a color, color to white, etc.) and/or a gradual increase or decrease in brightness. I can set up timed events (schedule) in the LiFX app without any problem, and I get nice, smooth transitions between colors and brightness levels. However, most of the SmartApps I’ve seen that have claimed to do the same either require extremely long times (as they’re triggered minutely) or only work with the old LiFX API. And timed events don’t always correspond properly to my wife and I’s daily routines.

I read somewhere that the hue bulbs support a transitionTime parameter (or something similar), but I swear, for the life of me, I cannot find any sort of transition time setting for the LiFX bulbs, either by example or by documentation. I also cannot find an appropriate set of API documentation that corresponds with the SmartApp > LiFX (Connect) API.

Does anyone have any suggestions for either a SmartApp that will handle this, or can give me some direction on the coding side? I’m almost thinking I need to build a full app with OAuth permissions and bypass the standard connect API. Thanks in advance.


(Rick Pittser) #2

I use IFTTT for this exact thing. I have about 10 scenes set up. Most of the lights are LIFX, but some are not. I create a scene in LIFX, a virtual momentary switch in ST, and then create an IFTTT recipe to activate a scene when the button is turned on. It’s not elegant really, but it is very reliable for me. You can set the transition time for the scene from immediate up to 1 minute so you get have nice gradual fade ins. Then I create a rule using Rule Manager to handle the other non-LIFX lights when the same button is pushed.


(might be my fake name?) #3

I do this exact same thing. Virtual buttons linked to LIFX scenes. Activated with Ifttt. Also I have a RM rule that turns on a vs every night at 10:30pm. That vs is linked to an Ifttt recipe that sets a scene, but DOES NOT turns the bulbs on until motion is detected. See link below.


(Doug) #4

Before I saw the replies here, this is exactly what I did to make this functionality work (several virtual momentary buttons + IFTTT rules for each). The problem I have with this process is it’s a lot of steps (trigger via DO button or ST widget > wait on IFTTT to respond > wait on IFTTT to send command to LiFX > finally done), and often causes quite a bit of delay due to this (up to 10 seconds in my case).

I would really like to have an interaction that happens with a SmartApp, as something like walking in the bedroom and turning on the lights should be more or less instantaneous, and I wouldn’t have to leave the LAN, save for the LiFX endpoint. However, I guess this is the workaround I have to use at the moment, and, until I can learn how SmartApps work (I get the basics, as I’m a software developer and understand Groovy, but not familiar with the DSL that ST uses) and I can build my own, I guess that’s my best option.

That ignore: power is actually incredibly useful though. Thanks for that @eric182! The scheduling chunk in the LiFX app is a little bit unstable, especially if anything is added or changed, and using IFTTT + that chunk that may solve some of those issues where things don’t need to be instant changes or turn on anything right away.