Custom device handler for the LIFX bulb.
On / Off Setting Color Setting Color Temperature Setting Brightness
- Open SmartThings IDE in your web browser and log into your account.
- Click on the "My Device Handlers" section in the navigation bar.
- Click on "Settings".
- At the bottom of the popup window, click "Add New Repository".
- Enter "ericvitale" as the namespace.
- Enter "ST-Better-LIFX-Bulb" as the repository.
- Ensure that the branch is set to "master", it should be this way by default.
- Hit "Save".
- Select "Update from Repo" and select "ST-Better-LIFX-Bulb".
- Select (check) "better-lifx-bulb.groovy".
- Check "Publish" and hit "Execute".
- See the "Preferences" & "How to get your API Token" sections below on how to configure.
- Open SmartThings IDE in your web browser and log into your account.
- Click on the "My Device Handlers" section in the navigation bar.
- On your this page, click on the "+ Create New Device Handler" button on the right.
- On the "New Device Type" page, Select the Tab "From Code" , Copy the "better-lifx-bulb.groovy" source code from GitHub and paste it into the IDE editor window.
- Click the blue "Create" button at the bottom of the page. An IDE editor window containing device handler template should now open.
- Click the blue "Save" button above the editor window.
- Click the "Publish" button next to it and select "For Me". You have now self-published your Device Handler.
- See the "Preferences" & "How to get your API Token" sections below on how to configure.
- API Token - [Required] You have to get this from LIFX. It is a long character string so text it to yourself and copy and paste it in.
- Bulb Name - [Required] Must match the exact bulb you want to control. Use the name you give it in the LIFX app.
- Log Level - Enter: TRACE, DEBUG, INFO, WARN, ERROR
- Update Frequency (Frequency, Between Hours) - If you have a lot of these bulbs and control them with different automation, you will often find that the DH doesn't exactly know the state of the bulb since the DH's communicate directly with LIFX. This setting allows you to setup a frequency for the DH to check the status of the bulb and update accordingly. 5 minutes should be good.
Navigate to https://cloud.lifx.com, sign in and then go to the settings section and select generate new token.