Nanoleaf
Control Nanoleaf smart lighting panels directly from FaustBot with full support for colors, effects, brightness, and device management.
Overview
FaustBot integrates with Nanoleaf smart lighting products, allowing you to create immersive lighting experiences that react to stream events. Supported devices include:
- Nanoleaf Shapes (Hexagons, Triangles, Mini Triangles)
- Nanoleaf Canvas
- Nanoleaf Light Panels (Aurora)
- Nanoleaf Lines
- Nanoleaf Elements
Color Control
Set colors via hex, RGB, or color temperature.
Brightness
Adjust panel brightness from 0-100%.
Effects
Activate built-in and custom lighting effects.
Power Control
Turn panels on, off, or toggle state.
Auto-Discovery
Automatically find devices on your network.
Device Info
Query model, firmware, and panel layout.
Setup
Connect Your Nanoleaf Device
Before FaustBot can control your Nanoleaf panels, you need to pair the device and authorize the connection.
Discover Devices
In FaustBot, go to Integrations → Nanoleaf in the sidebar. Click Discover Devices to scan your local network for Nanoleaf panels.
Enable Pairing Mode
On your Nanoleaf device, hold the power button for 5-7 seconds until the LED starts flashing. This enables pairing mode for 30 seconds.
Authorize Connection
Select your device from the discovered list and click Pair. FaustBot will request an authorization token from the device. The panels will flash to confirm successful pairing.
Test Connection
Click Identify to make your panels flash, confirming the connection is working properly.
Auto-Connect
Enable Auto-Connect to automatically connect to your Nanoleaf device when FaustBot starts. Make sure your panels are powered on and connected to the same network.
Network Requirements
Your Nanoleaf device and the computer running FaustBot must be on the same local network. Nanoleaf uses mDNS for discovery on port 16021.
Effects
Power Control
Turn On
Power on the panels.
Turn Off
Power off the panels.
Toggle Power
Toggle current power state.
Color & Brightness
Set Color
Set a solid color on all panels.
Set Brightness
Adjust brightness level (0-100%).
Set Color Temperature
Set warm to cool white (1200K-6500K).
Lighting Effects
Set Effect
Activate a lighting effect by name.
Identify
Flash panels to identify device.
Common Use Cases
Scripting API
Control your Nanoleaf panels from scripts using the CPH API:
Connection Management
# Check if connected to Nanoleaf
connected = CPH.NanoleafIsConnected()
# Connect to Nanoleaf device
CPH.NanoleafConnect()
# Disconnect from Nanoleaf
CPH.NanoleafDisconnect()
# Discover Nanoleaf devices on network
devices = CPH.NanoleafDiscover()
for device in devices:
CPH.Log(f"Found: {device}")Power Control
# Turn on Nanoleaf panels
CPH.NanoleafTurnOn()
# Turn off Nanoleaf panels
CPH.NanoleafTurnOff()
# Toggle power state
CPH.NanoleafToggle()
# Set power state explicitly
CPH.NanoleafSetPower(True) # On
CPH.NanoleafSetPower(False) # Off
# Get current device state
state = CPH.NanoleafGetState()
CPH.Log(f"Power: {state['on']}, Brightness: {state['brightness']}")Color Control
# Set brightness (0-100)
CPH.NanoleafSetBrightness(75)
# Set color using hex code
CPH.NanoleafSetColorHex("#FF5500")
# Set color using RGB values (0-255)
CPH.NanoleafSetColorRGB(255, 85, 0)
# Set color temperature (1200K-6500K)
CPH.NanoleafSetColorTemperature(4000)
# Generic set color method
CPH.NanoleafSetColor("blue") # Named color
CPH.NanoleafSetColor("#00FF00") # HexEffects & Device Info
# Get list of available effects
effects = CPH.NanoleafGetEffects()
for effect in effects:
CPH.Log(f"Effect: {effect}")
# Set an effect by name
CPH.NanoleafSetEffect("Northern Lights")
# Identify the device (flash panels)
CPH.NanoleafIdentify()
# Get device information
device = CPH.NanoleafGetDevice()
CPH.Log(f"Model: {device['model']}")
CPH.Log(f"Firmware: {device['firmwareVersion']}")
# Start pairing with a new device
CPH.NanoleafStartPairing()API Reference
| Method | Description |
|---|---|
NanoleafIsConnected() | Returns true if connected to a Nanoleaf device. |
NanoleafConnect() | Connect to the configured Nanoleaf device. |
NanoleafDisconnect() | Disconnect from the Nanoleaf device. |
NanoleafDiscover() | Discover Nanoleaf devices on the local network. |
NanoleafStartPairing() | Initiate pairing with a Nanoleaf device. |
NanoleafGetDevice() | Get device information (model, firmware, etc.). |
NanoleafGetState() | Get current state (power, brightness, color). |
NanoleafSetPower(on) | Set power state (true = on, false = off). |
NanoleafTurnOn() | Turn on the panels. |
NanoleafTurnOff() | Turn off the panels. |
NanoleafToggle() | Toggle the power state. |
NanoleafSetBrightness(level) | Set brightness (0-100). |
NanoleafSetColor(color) | Set color by name or hex string. |
NanoleafSetColorHex(hex) | Set color using hex code (e.g., "#FF5500"). |
NanoleafSetColorRGB(r, g, b) | Set color using RGB values (0-255 each). |
NanoleafSetColorTemperature(kelvin) | Set color temperature (1200K-6500K). |
NanoleafGetEffects() | Get list of available effects. |
NanoleafSetEffect(name) | Activate an effect by name. |
NanoleafIdentify() | Flash panels to identify the device. |
See the full API reference for all available Nanoleaf methods.