LIFX Smart Lighting
Control LIFX smart lights directly from FaustBot with full support for color control, effects, multi-zone devices, and groups.
Overview
FaustBot integrates with LIFX smart lights using both the Cloud API and local LAN protocol, providing fast and reliable control over your lighting setup.
Power Control
Turn on, off, or toggle lights with smooth transitions.
Color Control
Full HSBK support: Hue, Saturation, Brightness, Kelvin.
Color Temperature
Adjust warmth from 2500K to 9000K.
Light Effects
Pulse, breathe, and waveform effects.
Multi-zone Support
Control individual zones on Beam, Strip, and Tile.
Groups & Locations
Organize and control lights by room or area.
Setup
LAN Mode (Recommended)
LAN mode provides the fastest response times and works without internet access. Your LIFX lights must be on the same network as the computer running FaustBot.
Ensure Network Connectivity
Make sure your LIFX lights are connected to the same local network as FaustBot. The lights should be visible in the official LIFX app.
Open LIFX Settings
In FaustBot, go to LIFX in the sidebar. Set the connection mode to LAN or Auto.
Discover Devices
Click Discover Devices to scan your network for LIFX lights. Discovered devices will appear in the device list with their labels and current state.
Cloud Mode
Cloud mode uses the LIFX HTTP API and requires an OAuth token from your LIFX account. Use this mode when LAN discovery doesn't work or when controlling lights remotely.
Get API Token
Log in to the LIFX Cloud and generate a Personal Access Token under Settings.
Configure FaustBot
In FaustBot's LIFX settings, set the connection mode to Cloud and paste your API token in the token field.
Connect
Click Connect to authenticate and fetch your device list from the LIFX Cloud.
Auto Mode
Use Auto connection mode to let FaustBot automatically choose the best method. It will try LAN first for speed, falling back to Cloud if needed.
Connection Modes
| Feature | LAN Mode | Cloud Mode |
|---|---|---|
| Response Time | ~10-50ms | ~200-500ms |
| Internet Required | No | Yes |
| Setup Complexity | None | API Token Required |
| Remote Access | No | Yes |
| Rate Limits | None | 120 requests/min |
Selectors
Both modes support the same selector syntax to target specific lights:
all All lightslabel:Desk Light Light by namegroup:Office All lights in a grouplocation:Home All lights in a locationid:d073d5xxxxxx Light by MAC addressEffects
Power Control
Turn On
Turn on selected lights with optional transition duration.
Turn Off
Turn off selected lights with optional fade out.
Toggle Power
Toggle between on and off states.
All On
Turn on all discovered lights.
All Off
Turn off all discovered lights.
Color Control
Set Color
Set color using hex code or HSBK values.
Set Brightness
Adjust brightness (0-100%).
Set Color Temp
Set white temperature (2500K-9000K).
Set Group Color
Set all lights in a group to a color.
Set Location Color
Set all lights in a location to a color.
Set All Color
Set all lights to the same color.
Light Effects
Pulse
Rapid flash between current color and target color.
Breathe
Smooth fade in/out with adjustable peak timing.
Multi-zone Effects
Set Zone
Set color for a range of zones (start to end).
Set Multi Zone
Set multiple zone colors at once for gradients.
HSBK Color Model
LIFX uses the HSBK color model. Hue (0-360) is the color angle, Saturation (0-100%) is color intensity, Brightness (0-100%) is light intensity, and Kelvin (2500-9000) sets white temperature when saturation is low.
Scripting
Scripting API Coming Soon
A dedicated LIFX scripting API with direct methods like CPH.LifxSetColor() is
planned for a future release. For now, use CPH.RunAction() to trigger
pre-configured LIFX action effects from your scripts.
Power Control
# Turn on specific light using an action
CPH.RunAction("LIFX Turn On Desk Light")
# Turn off all lights
CPH.RunAction("LIFX All Lights Off")
# Toggle power with transition
CPH.RunAction("LIFX Toggle Living Room", {"duration": 1000})Color Control
# Set color using hex value
CPH.RunAction("LIFX Set Color", {
"selector": "all",
"color": "#ff0000",
"duration": 500
})
# Set color using HSBK values
CPH.RunAction("LIFX Set HSBK Color", {
"selector": "label:Desk Light",
"hue": 120,
"saturation": 100,
"brightness": 75,
"kelvin": 3500
})
# Set brightness only
CPH.RunAction("LIFX Set Brightness", {
"selector": "group:Office",
"brightness": 50
})Light Effects
# Pulse effect - rapid flash
CPH.RunAction("LIFX Pulse Effect", {
"selector": "all",
"color": "#00ff00",
"period": 500,
"cycles": 5,
"powerOn": True
})
# Breathe effect - smooth fade
CPH.RunAction("LIFX Breathe Effect", {
"selector": "group:Stream Room",
"color": "#0066ff",
"period": 2000,
"cycles": 3,
"peak": 0.5
})Multi-zone Control
# Set specific zones on a LIFX Beam or Strip
CPH.RunAction("LIFX Set Zone Color", {
"selector": "label:LIFX Beam",
"startZone": 0,
"endZone": 5,
"color": "#ff00ff",
"duration": 500
})
# Set multiple zone colors at once (gradient effect)
CPH.RunAction("LIFX Set Multi Zone", {
"selector": "label:LIFX Strip",
"colors": ["#ff0000", "#ff7f00", "#ffff00", "#00ff00", "#0000ff", "#8b00ff"],
"duration": 1000
})Group & Location Control
# Set all lights in a group to a color
CPH.RunAction("LIFX Set Group Color", {
"groupName": "Office",
"color": "#ffcc00",
"duration": 1000,
"powerOn": True
})
# Set all lights in a location to a color
CPH.RunAction("LIFX Set Location Color", {
"locationName": "Home",
"color": "#ffffff",
"duration": 2000
})