Creating HomeKit Switches for LIFX Morph and Flame Effects
I know a bunch of HomeKit enthusiasts that use Homebridge even with LIFX’s native HomeKit support in their newer bulbs. After the LIFX team implemented firmware effect calls in the HTTP API, I knew it would be possible to create a HomeKit switch that would turn an effect on and off and here it is.
Requirements
- Have a working Homebridge system connected to HomeKit.
 - Install the 
homebridge-http-switchplugin. - Get a LIFX Cloud Personal Access API token from https://cloud.lifx.com/settings.
 
Before you begin
- Replace 
:selectorin the configuration with the actual selector of the multizone bulb(s) you want to target with each switch. Creative use of selectors can target multiple bulbs in a single switch. - Replace 
<api_token>with your Personal Access Token API 
If you want to trigger the Flame effect (LIFX Tile/Candle only):
- Change 
morphtoflamefor eachurlstring. - Change 
MORPHtoFLAMEin thestatusPatternstring. 
If you want to trigger the Move effect (LIFX Z and Beam only):
- Change 
morphtomovefor eachurlstring. - Change 
MORPHtoMOVEin thestatusPatternstring. 
Known Issues
- This uses the LIFX HTTP API and as such requires an active Internet connection as well as LIFX bulbs that are connected to the LIFX Cloud.
 - Status is checked every second so there may be a noticeable delay in certain cases with the status not reflecting reality (particluarly when the effect is started or stopped externally from HomeKit).
 - If your linear multizone bulb (i.e. Z or Beam) is a single colour, you may not notice the Move effect at all. There’s no simple solution to this yet, unfortunately.
 
Configuration
 | 
 | 
Enjoy!