[HELP] LIFX fade duration?


Got the Smartthings Hub just a few days ago, can’t find an option to make the LIFX bulbs fade in/out.

Both the LAN and cloud API support duration fields so it should be possible…

for example when my mostion sensor doesn’t detect motion for 2 minutes, i’d like the light to fade out over 60 seconds perioud, is it possible?

It can’t be done with the standard smartthings features like smart lighting. They’re basically stripped down to the lowest common denominator features across all brands.

You could definitely do it with IFTTT, but it might add some additional lag, so it may not fit your specific use case.

You can do a lot of things with LIFX bulbs with webcore, I just don’t know if you can do this particular thing. Webcore is essentially a scripting language for SmartThings created by the community and opens up a lot of advanced features. Set up is fairly complicated, but there are a lot of community members who will be glad to help – – they even have their own forum.

@whoismoses has done a lot with LIFX bulbs, and may be able to say more. :sunglasses:

IFTTT is too laggy.

I’ve already came across webCoRE and added it via IDE, hopefully i get some time to check it out this weekend, seems somewhat similar to coding/tasker.

I do wonder if its possible though since i found pretty much nothing about it (google/smartthings/reddit…).

@Necromancer - Your best bet is to use webCoRE for this kind of stuff. I use it for everything, just because it is easier to have all my automation in one place.

Now, webCoRE has the ability to do a fade and depending on the device handler it will be a native fade to the device or software based. Native is better. Otherwise, webCoRE has to manage the fade.

See the image below. Lines 16, 18, 19 are native commands. Meaning they will leverage the device hardware to do the fade. However, 18 & 19 only work with my device handlers and are not part of the standard LIFX DH.

I believe that if you do line 17 and the device handler supports a fade webCoRE will use the native fade but I am not 100% sure.

thats exactly the problem, i doubt the device handler has duration (fade)

this doesn’t.

and i can’t find any other (custom) device handlers.
Which as i said in the first post is weird since the lifx API has it

The method needed is…

def setLevel(percentage, duration) { ... }

You can use my Better LIFX Bulb DH or my Group of Groups DH.

1 Like

Thanks, looks good!

1 Like

I’m sorry to revive such an old thread, but this is the only place where I could find this mentioned. I installed the Better LIFX Bulb device handler, and am not seeing the custom setLevelAndTemperature custom command appear in the actions list.

I installed the device handler per the instructions in the GitHub repo README file, and it looks like it installed. The device ‘Office Lamp’ is a LIFX bulb, and it shows up in the SmartThings IDE as a ‘LIFX Color Bulb’ under My Devices.

I’ve uninstalled/reinstalled the device handler and even removed/reinstalled webCoRE to see if something got gummed up.

The only thing I’m not sure if I’m doing correctly is editing the preferences for the DH. Where is this done? I’ve seen some screenshots from the LIFX Group of Groups thread where it appears the settings are edited in the SmartThings app. However, I can’t seem to find the Better LIFX preferences anywhere in the app. If on the SmartThings IDE site, I am not certain as to where I am supposed to edit these preferences.

Maybe I’m just super confused about how this is all supposed to work :slight_smile:

Thank you!

Are you sure you are using the latest DH and that this particular bulb is using the Better LIFX Bulb handler instead of the standard ST handler? Open the device handler in the IDE and copy and paste first 30 or so lines so I can make sure you have the right one.

Hi Eric,

Thanks for the reply! At the bottom of this post is the header section of the DH that the ST IDE pulled from the GitHub repo. This matches what’s posted directly on the repo.

As for you second question, this might be where I’m messing up. How do I associate the Better LIFX Bulb handler with my bulbs in lieu of the ST handler? I’ve been clicking through the IDE and WebCoRE dashboard, but don’t see where to verify which DH is being used or how to change it.

 *  Better LIFX Bulb
 *  Copyright 2016 Eric Vitale
 *  Version 1.1.5 - Fix to support the new SmartThings app. (08/20/2018)
 *  Version 1.1.4 - Updated the "on" indicator color of the DH to the standard ST Blue (#00a0dc). (08/03/2018)
 *  Version 1.1.3 - Cleaned up a bit. (06/30/2017)
 *  Version 1.1.2 - Added the ability to use separate durations for on/off and setLevel commands. (06/26/2017)
 *  Version 1.1.1 - Added setLevelAndTemperature method to allow webCoRE set both with a single command. (06/25/2017)
 *  Version 1.1.0 - Updated to use the ST Beta Asynchronous API. (06/21/17)
 *  Version 1.0.6 - Added the transitionLevel(), apiFlash(), & runEffect() methods. (06/16/2017)
 *  Version 1.0.5 - Added saturation:0 to setColorTemperature per LIFX's recommendation. (05/22/2017)
 *  Verison 1.0.4 - Fixed an issue with setColor() introduced by an api change. (05/19/2017)
 *  Version 1.0.3 - Updated the scheduling settings (04/18/2017)
 *  Version 1.0.2 - More accuracy for setLevel (12/17/2016)
 *  Version 1.0.1 - Added additonal logging on refresh method (12/17/2016)
 *  Version 1.0.0 - Initial Release (08/08/2016)
 *  This SmartThings device handler can be found @ https://github.com/ericvitale/ST-Better-LIFX-BULB
 *  You can find my other SmartApps or Device Handlers @ https://github.com/ericvitale
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.


In addition to my reply from the other day, I noticed something interesting. Sometimes when I login to the ST IDE, I am redirected to a website with the domain “graph.api.smartthings.com”. While it shows my ‘Home’ location, it doesn’t show any devices, any of the SmartApps I have installed, any of the Device Handlers, nor my Github link.

Clicking around on the website tabs a few times I am eventually switched to a domain “graph-na04-useast2.api.smartthings.com”. Once on this domain I see all of my devices, all the LIFX bulbs, WebCoRE, and the Better LIFX device handler (which doesn’t seem to work).

Could this possibly be why the Device Handler doesn’t seem to work? How would I verify or ensure that WebCoRE is accessing the longer ST IDE URL that has all of my information? For reference, WebCoRE can see my different devices (all of my LIFX bulbs), and WebCoRE does show up in my ST app on my mobile device.

Thank you! :slight_smile:

When you log into the IDE you should first select “Location” then select your location. All you stuff will show up. I’m not sure which way is best but I deleted all of the bulbs that were installed by the LIFX integration and started over.

See that “+ New Device” button? Press that. Fill out the Name, Label, Type (Select my DH, alphabetical list except all customer DH are at the end)

Hi Eric,

Thank you. I’ve got it working now! It appears that the integration between LIFX’s cloud into the SmartThings app was interfering with WebCoRE and controlling of the light bulbs. After removing the ST/LIFX integration, it still didn’t work, but after uninstalling and reinstalling WebCoRE again, the devicehandler custom functions magically started working.

I’ve now got your Better LIFX Bulbs and Group of Groups both working to control my lights. Now that this hurdle has been crossed, the fun begins of figuring out what I want to do with this added functionality :slight_smile:

Thanks again!

1 Like