Control your LIFX smart lights directly from Raycast with local network discovery and cloud API fallback.
- Type Commands Naturally: Control your lights by typing commands like "set to electric blue and make it cozy"
- Incredibly Smart Parsing: Recognizes 80+ colors, 50+ brightness levels, 30+ temperature keywords
- Compound Commands: Chain multiple actions together (e.g., "turn on, set to pastel pink, and dim a bit")
- Conversational: Say it however feels natural - "gimme some light", "make it super bright", "barely on night light"
- Profile Integration: Load saved profiles by name or tag (e.g., "switch to my sleep mode")
- Keyboard Shortcut: Press
Ctrl+Enterto execute your command
- LAN-First Discovery: Fast local network control (no internet required)
- HTTP API Fallback: Automatic fallback to cloud API if LAN unavailable
- Auto-Detection: Discovers all LIFX lights on your network within seconds
- Power: Toggle lights on/off
- Brightness: 7 preset levels from 1% to 100%
- Color: 9 preset colors with emoji indicators (π΄ Red, π’ Green, π΅ Blue, etc.)
- Temperature: 8 white temperature presets (2500K - 9000K)
- Scenes: 9 one-click mood scenes (Warm Relax, Reading, Energize, Night, etc.)
- Save current light states as profiles
- Load saved profiles instantly
- Built-in profile management (save/load/delete)
- Control all lights simultaneously
- Turn all lights on/off together
- Set all lights to same brightness
All actions have keyboard shortcuts for maximum efficiency:
Cmd+Shift+P- Toggle powerCmd+Shift+B- Set brightnessCmd+Shift+C- Set colorCmd+Shift+T- Set temperatureCmd+Shift+S- Save as profileCmd+Shift+L- Load profile
Cmd+1- 100% brightnessCmd+2- 75% brightnessCmd+3- 50% brightnessCmd+4- 25% brightness
Cmd+Shift+1-9- Apply color scenes (Red, Green, Blue, Yellow, etc.)
Cmd+Shift+O- Turn all lights onCmd+Shift+X- Turn all lights offCmd+Shift+1-4- Set all lights to preset brightness
Cmd+R- Refresh lights listCmd+Shift+T- Open troubleshooting guide
The extension shows real-time connection status with visual indicators:
- LAN Connected (π’ Green) - Using local network discovery (fast, no internet required)
- HTTP API Connected (π Orange) - Using cloud API (fallback, remote access)
- Discovering (π΅ Blue) - Currently searching for lights
- Connection Error (π΄ Red) - Unable to connect
Status indicators show:
- β LAN Discovery status
- β HTTP API status
- Current connection method (LAN/HTTP)
- Error messages (if any)
Access step-by-step troubleshooting help:
- Press
Cmd+Shift+Tor click "Troubleshoot Connection" - View specific steps based on your error type
- Get suggestions for common issues
- Access LIFX support documentation
- Check network settings
- Restart the extension
| Error | Description | Solutions |
|---|---|---|
| No Lights Found | No LIFX lights discovered | Check lights are powered on, same network, restart lights |
| Connection Timeout | Network timeout during discovery | Check network, disable VPN, check power-saving mode |
| Connection Refused | Network connection refused | Check firewall, disable VPN, restart router |
| Network Error | General network issue | Check internet connection, network settings |
- Exponential backoff: Retries failed connections with delays (1s β 2s β 4s β 8s β 16s)
- Automatic fallback: Switches to HTTP API if LAN fails
- Smart error messages: Clear guidance for each error type
- Raycast installed
- LIFX smart lights on your network
- Node.js 18+ (for development)
- Clone this repository:
git clone https://github.com/luinbytes/lifx-raycast.git
cd lifx-raycast- Install dependencies:
npm install- Build the extension:
npm run build- Import into Raycast:
npm run devNo configuration needed! The extension will automatically discover LIFX lights on your local network.
If LAN discovery fails or you want remote control, you can add an HTTP API token:
- Go to https://cloud.lifx.com/settings
- Sign in with your LIFX account
- Click "Generate New Token"
- Copy the token
- Open Raycast β LIFX extension β Preferences
- Paste your token in "LIFX HTTP API Token"
- LIFX HTTP API Token: Optional token for HTTP API fallback
- Default Fade Duration: How long light transitions take (default: 1000ms)
- LAN Discovery Timeout: How long to wait for local network discovery (default: 5000ms)
- Enable LAN Discovery: Toggle local network discovery on/off
The easiest way to control your lights is with natural language:
- Open Raycast
- Search for "LIFX Dashboard"
- Type your command in the search bar
- Press
Ctrl+Enterto execute
Example Commands:
Power & Basic
turn on/lights on/gimme light- Turn on lightslights off/darkness/make it dark- Turn off lights
Colors (80+ recognized!)
set to red/electric blue/neon pink- Basic colorsdeep blue/pale green/pastel pink- Color variationssapphire/emerald/crimson/amber- Named colorsbaby blue/hot pink/forest green- Descriptive colors
Brightness (50+ keywords!)
super bright/max brightness/brightest- Maximumdim a bit/pretty dim/quite dim- Decreasenight light/barely on/barely lit- Very low75%/half/medium- Specific levels
Temperature (30+ moods!)
warm white/cozy/relaxing/sunset- Warmcool white/energizing/focus- Cooldaylight/morning/sunshine- Brightcandlelight/warm glow- Atmospheric
Compound Commands
turn on and set to blue- Multiple actionselectric blue and super bright- Color + brightnesscozy and dim a bit- Temperature + brightnessall lights to pastel pink and half brightness- Complex
Profiles
load my sleep mode/switch to sleep mode- By namegimme my work preset/use the relax scene- Casual
- Open Raycast
- Search for "LIFX Dashboard"
- Select a light
- Use actions to control it:
- Power on/off
- Set brightness, color, or temperature
- Apply preset scenes
- Save/load profiles
When you have multiple lights, an "All Lights" section appears at the top:
- Turn all lights on/off
- Set all to same brightness
- Quick access via keyboard shortcuts
- Set your lights to desired state
- Press
Cmd+Son a light - Name your profile
- Later, press
Cmd+Lto load saved profiles
The extension provides visual indicators for connection status:
- π’ LAN Connected (Green WiFi icon) - Lights discovered via local network (fastest)
- π HTTP API Connected (Orange Globe icon) - Connected via cloud API (fallback)
- π΅ Discovering... (Blue Spinner) - Currently searching for lights
- π΄ Connection Error (Red Exclamation) - No connection available
The connection status is displayed at the top of the lights list, showing:
- LAN Discovery status (β / β)
- HTTP API status (β / β)
- Current connection method
- Any error messages
If you experience connection issues, use the Troubleshoot Connection action (Cmd+Shift+T) to:
- View step-by-step troubleshooting instructions
- Get specific guidance for your error type
- Access LIFX support documentation
- Check network settings
- Restart the extension
- Ensure your LIFX lights are powered on
- Check that your computer is on the same network as your lights
- Try increasing the LAN Discovery Timeout in preferences
- Add an HTTP API token as fallback
- Restart your LIFX lights by unplugging and replugging them
- Check if your lights are powered on
- Verify your network connection is stable
- Try disabling any VPN or firewall temporarily
- Check if lights are in a power-saving mode
- Check your network connection
- Disable VPN temporarily
- Check firewall settings
- Restart your router if needed
- Check if lights are reachable on your network
- Try refreshing the lights list (
Cmd+R) - The extension will automatically try HTTP API if LAN fails
- Check the connection status at the top of the list
The extension includes intelligent error handling:
- Exponential backoff retry: Automatically retries failed connections with increasing delays (1s, 2s, 4s, 8s, 16s)
- Automatic fallback: Falls back to HTTP API if LAN discovery fails
- Specific error messages: Clear messages for different error types (no lights, timeout, connection refused, network error)
- Troubleshooting suggestions: Helpful tips embedded in error messages
npm run buildnpm run devnpm run lintnpm run fix-lint- Raycast API: Extension framework
- lifx-lan-client: Local network control (LAN protocol)
- lifxjs: HTTP API control (cloud fallback)
- TypeScript: Type safety and better DX
- React: UI components
src/
βββ dashboard.tsx # Main dashboard command
βββ save-profile.tsx # Save profile command
βββ load-profile.tsx # Load profile command
βββ manage-profiles.tsx # Manage profiles command
βββ lib/
β βββ lifx-client.ts # Connection manager (LAN + HTTP)
β βββ lifx-lan.ts # LAN client wrapper
β βββ lifx-http.ts # HTTP client wrapper
β βββ nlp-parser.ts # Natural language parser
β βββ storage.ts # Profile storage
β βββ types.ts # TypeScript interfaces
βββ components/
β βββ LightListItem.tsx # Light list item with actions
β βββ LightGridItem.tsx # Light grid item with actions
β βββ BrightnessControl.tsx # Brightness picker
β βββ ColorPicker.tsx # Color picker
β βββ TemperatureControl.tsx # Temperature picker
βββ utils/
βββ validation.ts # Input validation
- LAN First: Attempts local network discovery (fast, no internet)
- HTTP Fallback: Uses cloud API if LAN unavailable
- Auto-Deduplication: Merges lights from both sources
- Smart Failover: Switches between LAN/HTTP automatically on failure
User Action β LIFXClientManager β Try LAN β If fail, try HTTP β Update UI
MIT
Created by nazzy_wazzy_lu
Contributions are welcome! Please feel free to submit a Pull Request.
- LIFX for making awesome smart lights
- Raycast for the amazing launcher platform
- lifx-lan-client for the LAN protocol implementation
- lifxjs for the HTTP API wrapper
Enjoy controlling your lights! π‘β¨