### Setup Frontend Dependencies
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Navigates to the frontend directory and installs required packages.
```bash
$ cd frontend
$ yarn install
```
--------------------------------
### Launch LedFx with uv
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Creates a virtual environment, installs dependencies, and starts the application.
```bash
$ cd LedFx
$ uv run ledfx
```
--------------------------------
### Install Only Documentation Dependencies
Source: https://docs.ledfx.app/en/stable/README.html
Use this command if you only want to install the documentation dependencies. This is an alternative to installing them alongside development dependencies.
```bash
uv sync --only-group docs
```
--------------------------------
### Run LedFx on Linux
Source: https://docs.ledfx.app/en/stable/installing.html
Execute this command to start the LedFx application after installation on a Linux system.
```bash
$ ledfx
```
--------------------------------
### GET Virtual Presets Response
Source: https://docs.ledfx.app/en/stable/apis/api.html
Example JSON response showing active and available presets for a virtual device.
```json
{
"status": "success",
"virtual": "my-virtual",
"effect": "singleColor",
"ledfx_presets": {
"blue": {
"name": "Blue",
"config": {
"color": "#0000ff",
"brightness": 1,
// ... additional effect config parameters
},
"active": true
},
"green": {
"name": "Green",
"config": {
"color": "#00ff00",
"brightness": 1,
// ... additional effect config parameters
},
"active": false
}
},
"user_presets": {
"my-custom-color": {
"name": "My Custom Color",
"config": {
"color": "#ff00ff",
"brightness": 1,
// ... additional effect config parameters
},
"active": false
}
}
}
```
--------------------------------
### Install Frontend Dependencies
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Navigates to the frontend directory and installs project dependencies using yarn. This is a standard step after cloning or updating the project.
```bash
$ cd frontend
$ yarn install
```
--------------------------------
### Install Documentation Dependencies
Source: https://docs.ledfx.app/en/stable/README.html
Use this command to install documentation dependencies on top of development dependencies. Ensure you are in the LedFx source directory where pyproject.toml resides.
```bash
uv sync --group docs
```
--------------------------------
### Launch LedFx on Apple Silicon macOS
Source: https://docs.ledfx.app/en/stable/installing.html
Activate the virtual environment and launch LedFx with the `--open-ui` option to start the application and open the user interface in your browser. This is the final step after installation on Apple Silicon.
```bash
$ source ~/ledfx-venv/bin/activate
$ ledfx --open-ui
```
--------------------------------
### Initialize Frontend Development
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Clones the frontend repository and starts the development server.
```bash
$ git clone https://github.com/YeonV/LedFx-Frontend-v2.git
$ cd LedFx-Frontend-v2
$ yarn install
$ yarn start
```
--------------------------------
### Install Node.js on Ubuntu
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Installs Node.js, a prerequisite for yarn, using apt-get on Ubuntu. Ensure your package list is updated before installation.
```bash
$ sudo apt-get update
$ sudo apt-get install nodejs
```
--------------------------------
### Install LedFx on Raspberry Pi using Bash Script
Source: https://docs.ledfx.app/en/stable/installing.html
Install LedFx and its dependencies on a Raspberry Pi using the provided curl and bash command. This script automates the installation process.
```bash
$ curl -sSL https://install.ledfx.app/ | bash
```
--------------------------------
### Request Local Image File (Windows Example)
Source: https://docs.ledfx.app/en/stable/apis/cache.html
Example of requesting a local image file on Windows. Ensure the path is correctly formatted and within the allowed directories.
```json
{
"path_url": "C:\\Users\\username\\.ledfx\\images\\custom.gif"
}
```
--------------------------------
### Start Playlist Action
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
To start a playlist, send a POST request with the playlist 'id' and 'action' set to 'start'. This stops any currently active playlist first.
```json
{ "id": "evening-cycle", "action": "start" }
```
--------------------------------
### Start Playlist
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
Starts a specified playlist by its ID. This action can also override the playlist's default mode at runtime, for example, to enable shuffle mode.
```curl
curl -X PUT http://localhost:8888/api/playlists \
-H "Content-Type: application/json" \
-d '{ "id":"evening-cycle", "action":"start" }'
```
```curl
curl -X PUT http://localhost:8888/api/playlists \
-H "Content-Type: application/json" \
-d '{ "id":"evening-cycle", "action":"start", "mode":"shuffle" }'
```
--------------------------------
### Install LedFx on Linux
Source: https://docs.ledfx.app/en/stable/installing.html
Install LedFx and its dependencies using pipx. Ensure Python 3.10 or higher is installed before running this command.
```bash
$ python -m pip install ledfx
```
--------------------------------
### Start LedFx and Frontend Watcher
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Launches the backend and the frontend development server simultaneously.
```bash
$ uv run ledfx
$ yarn start
```
--------------------------------
### Install LedFx in a Python venv on macOS
Source: https://docs.ledfx.app/en/stable/installing.html
Set up a Python virtual environment for LedFx on macOS. This involves creating the venv, activating it, installing build tools, and then installing LedFx.
```bash
$ python3 -m venv ~/ledfx-venv
$ source ~/ledfx-venv/bin/activate
$ python -m pip install -U pip setuptools wheel
$ python -m pip install ledfx
```
--------------------------------
### Install Linux System Dependencies
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Installs necessary system-level libraries for LedFx on Debian-based Linux distributions.
```bash
$ sudo apt install libatlas3-base \
libavformat58 \
portaudio19-dev \
pulseaudio \
cmake \
```
--------------------------------
### Install Audio Loopback
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Required for development builds to enable audio loopback functionality.
```bash
$ uv run ledfx-loopback-install
```
--------------------------------
### Install Yarn on Windows
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Installs the yarn package manager globally using npm.
```bash
$ npm install -g yarn
```
--------------------------------
### Artnet Data Packet Output Examples
Source: https://docs.ledfx.app/en/stable/devices/artnet.html
Examples showing how different pixels_per_device values result in varying data packet structures for a 6-pixel configuration.
```text
[255, RGB1, RGB2, RGB3, RGB4, RGB5, RGB6, 0, 0]
```
```text
[255, RGB1, 0, 0, 255, RGB2, 0, 0, 255, RGB3, 0, 0, 255, RGB4, 0, 0, 255, RGB5, 0, 0, 255, RGB6, 0, 0]
```
```text
[255, RGB1, RGB2, 0, 0, 255, RGB3, RGB4, 0, 0, 255, RGB5, RGB6, 0, 0]
```
```text
[255, RGB1, RGB2, RGB3, 0, 0, 255, RGB4, RGB5, RGB6, 0, 0]
```
```text
[255, RGB1, RGB2, RGB3, RGB4, 0, 0]
```
--------------------------------
### Install LedFx on macOS using pip
Source: https://docs.ledfx.app/en/stable/installing.html
Install LedFx and dependencies on macOS using Homebrew for portaudio and pip for the Python package. Ensure Python 3.10+ is installed.
```bash
$ brew install portaudio
$ python3 -m pip install ledfx
```
--------------------------------
### Install LedFx on Apple Silicon macOS
Source: https://docs.ledfx.app/en/stable/installing.html
Install LedFx on Apple Silicon Macs using Homebrew for specific Python versions and dependencies, then set up a virtual environment and install LedFx with specific compiler flags.
```bash
$ brew install python@3.12
$ brew install portaudio --HEAD
$ brew install virtualenv
$ virtualenv -p python3.12 ~/ledfx-venv
$ source ~/ledfx-venv/bin/activate
$ export CFLAGS="-Wno-incompatible-function-pointer-types"
$ pip install numpy>=2.0.0 --no-cache-dir
$ pip install aubio-ledfx>=0.4.11 --no-cache-dir
$ pip install --force-reinstall ledfx
```
--------------------------------
### Example cURL request for POST /api/log
Source: https://docs.ledfx.app/en/stable/apis/log.html
This example demonstrates how to send a POST request to the /api/log endpoint using cURL, including the necessary headers and JSON body.
```bash
curl -X POST http://localhost:8888/api/log \
-H "Content-Type: application/json" \
-d '{"text": "Hello from frontend!"}'
```
--------------------------------
### System Event Payloads
Source: https://docs.ledfx.app/en/stable/apis/websocket.html
Example payloads for global_pause, base_config_update, and audio_input_device_changed events.
```json
{
"event_type": "global_pause",
"paused": true
}
```
```json
{
"event_type": "base_config_update",
"config": {
// TODO
}
}
```
```json
{
"event_type": "audio_input_device_changed",
"audio_input_device_name": "ALSA: default"
}
```
--------------------------------
### GET /api/log
Source: https://docs.ledfx.app/en/stable/apis/api.html
Establishes a websocket connection for receiving real-time LedFx logging information.
```APIDOC
## GET /api/log
### Description
Opens a websocket connection through which realtime LedFx logging info will be sent.
### Method
GET
### Endpoint
/api/log
```
--------------------------------
### Scene Object Structure
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
Example of a complete scene definition including virtual device configurations with various action types.
```json
{
"name": "Living Room",
"scene_image": "Wallpaper",
"scene_midiactivate": null,
"scene_payload": null,
"scene_puturl": null,
"scene_tags": null,
"virtuals": {
"wled-breland-nightstand": {
"action": "ignore"
},
"wled-dining-room": {
"action": "stop"
},
"wled-lr-behind-couch": {
"action": "activate",
"type": "scroll_plus",
"config": {
"background_brightness": 1.0,
"background_color": "#000000",
"blur": 3.0,
"brightness": 1.0,
"color_high": "#0000ff",
"color_lows": "#ff0000",
"color_mids": "#00ff00",
"decay_per_sec": 0.5,
"flip": false,
"mirror": true,
"scroll_per_sec": 0.7,
"threshold": 0.0
}
},
"wled-accent-light": {
"action": "forceblack"
}
},
"active": true
}
```
--------------------------------
### GET /api/info
Source: https://docs.ledfx.app/en/stable/apis/api.html
Retrieves basic information about the LedFx instance, including its version, URL, and available features.
```APIDOC
## GET /api/info
### Description
Information about LedFx
### Method
GET
### Endpoint
/api/info
### Response
#### Success Response (200)
- **url** (string) - The URL of the LedFx instance.
- **name** (string) - The name of the LedFx instance.
- **version** (string) - The version of LedFx.
- **github_sha** (string) - The GitHub commit SHA.
- **is_release** (string) - Indicates if this is a release build.
- **developer_mode** (boolean) - Indicates if developer mode is enabled.
- **features** (object) - An object containing boolean flags for optional backend capabilities.
- **sendspin** (boolean) - Indicates if Sendspin synchronized multi-room audio integration is available.
### Response Example
```json
{
"url": "http://127.0.0.1:8888",
"name": "LedFx Controller",
"version": "2.1.5",
"github_sha": "unknown",
"is_release": "false",
"developer_mode": false,
"features": {
"sendspin": true
}
}
```
```
--------------------------------
### Create Linux Desktop Launcher with Options
Source: https://docs.ledfx.app/en/stable/launch.html
Create a .desktop file in '~/.local/share/applications/' and specify the 'Exec' line with 'ledfx' followed by your desired options.
```ini
[Desktop Entry]
Name=LedFx Custom Launch
Exec=ledfx [options]
Type=Application
Terminal=true
```
--------------------------------
### REST API Response for Clients
Source: https://docs.ledfx.app/en/stable/apis/websocket_client.html
This is an example of the JSON response from the GET /api/clients endpoint, detailing each connected client with its IP, device ID, name, type, and connection timestamp.
```json
{
"client-uuid-1": {
"ip": "192.168.1.100",
"device_id": "abc123-device-uuid",
"name": "Living Room Display",
"type": "display",
"connected_at": 1708188000.123
},
"client-uuid-2": {
"ip": "192.168.1.101",
"device_id": null,
"name": "Client-e7a3f2d1",
"type": "unknown",
"connected_at": 1708188050.789
}
}
```
--------------------------------
### Basic WebSocket Client Setup and Registration
Source: https://docs.ledfx.app/en/stable/developer/websocket_client_examples.html
Establishes a WebSocket connection and sends client metadata upon receiving a client ID. Ensure the WebSocket server is running and accessible.
```javascript
const websocket = new WebSocket('ws://localhost:8888/api/websocket');
let myClientId = null;
websocket.onopen = () => {
console.log('WebSocket connected');
};
websocket.onmessage = (event) => {
const data = JSON.parse(event.data);
// First message will be our client ID
if (data.event_type === 'client_id') {
myClientId = data.client_id;
console.log('Received client ID:', myClientId);
// Now set our metadata
setClientInfo();
}
};
function setClientInfo() {
websocket.send(JSON.stringify({
id: 1,
type: 'set_client_info',
data: {
name: 'My Application',
type: 'controller',
device_id: 'my-device-123'
}
}));
}
```
--------------------------------
### Install yarn Globally
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Installs the yarn package manager globally using npm. This command should be run after Node.js is installed.
```bash
$ npm install -g yarn
```
--------------------------------
### Build Documentation with Sphinx
Source: https://docs.ledfx.app/en/stable/README.html
Navigate to the docs directory and run this command to build the HTML documentation. The output will be placed in the docs/build directory.
```bash
$ cd docs
$ uv run sphinx-build -a -b html . build
```
--------------------------------
### End-to-End Scene Sync Example (Controller to Visualisers)
Source: https://docs.ledfx.app/en/stable/developer/websocket_client_examples.html
This sequence diagram illustrates the flow for synchronizing a scene from a controller to multiple visualisers via the server. It covers connection, subscription, scene activation, and broadcast.
```mermaid
sequenceDiagram
participant Controller
participant Server
participant Visualiser1
participant Visualiser2
Note over Controller,Visualiser2: Initial Setup
Controller->>Server: Connect & set_client_info (type: "controller")
Visualiser1->>Server: Connect & set_client_info (type: "visualiser")
Visualiser2->>Server: Connect & set_client_info (type: "visualiser")
Controller->>Server: subscribe_event: clients_updated
Visualiser1->>Server: subscribe_event: client_broadcast
Visualiser2->>Server: subscribe_event: client_broadcast
Note over Controller,Visualiser2: User Activates Scene in Controller
Controller->>Server: POST /api/scenes/party-mode/activate
Server->>Controller: Scene activated successfully
Controller->>Server: broadcast {
broadcast_type: "scene_sync",
target: {mode: "type", value: "visualiser"},
payload: {scene_id: "party-mode", action: "activate"}
}
Server->>Server: Filter clients by type="visualiser"
Server->>Server: Derive sender from WebSocket (Controller)
Server->>Controller: broadcast_sent {targets_matched: 2}
par Notify visualisers
Server->>Visualiser1: client_broadcast {
sender_name: "Scene Controller",
sender_type: "controller",
broadcast_type: "scene_sync",
payload: {scene_id: "party-mode"}
}
Server->>Visualiser2: client_broadcast {
sender_name: "Scene Controller",
sender_type: "controller",
broadcast_type: "scene_sync",
payload: {scene_id: "party-mode"}
}
end
Visualiser1->>Visualiser1: Check broadcast_type == "scene_sync"
Visualiser1->>Visualiser1: activateScene("party-mode")
Note over Visualiser1: Display updates to party mode
Visualiser2->>Visualiser2: Check broadcast_type == "scene_sync"
Visualiser2->>Visualiser2: activateScene("party-mode")
Note over Visualiser2: Display updates to party mode
```
--------------------------------
### Create Scene with Explicit ID and Virtuals
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
This cURL example demonstrates creating or replacing a scene with a specific ID and configuring individual virtual devices, including their actions and settings.
```bash
curl -X POST http://localhost:8888/api/scenes \
-H "Content-Type: application/json" \
-d '{
"id":"living-room",
"name":"Living Room",
"scene_image":"Wallpaper",
"virtuals":{
"wled-lr-behind-couch":{
"action":"activate",
"type":"scroll_plus",
"config":{
"background_brightness":1.0,
"blur":3.0,
"brightness":1.0,
"color_high":"#0000ff",
"color_lows":"#ff0000",
"color_mids":"#00ff00"
}
},
"wled-dining-room":{
"action":"stop"
}
}
}'
```
--------------------------------
### Create Scene using Presets and Mixed Actions
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
This cURL command shows how to create a scene using predefined presets for virtual devices and includes mixed actions like activate, forceblack, and ignore.
```bash
curl -X POST http://localhost:8888/api/scenes \
-H "Content-Type: application/json" \
-d '{
"name":"Party Mode",
"virtuals":{
"strip1":{
"action":"activate",
"type":"scroll_plus",
"preset":"rainbow-scroll"
},
"strip2":{
"action":"activate",
"type":"singleColor",
"preset":"bass-pulse"
},
"strip3":{
"action":"forceblack"
},
"strip4":{
"action":"ignore"
}
}
}'
```
--------------------------------
### Prepare PulseAudio directory
Source: https://docs.ledfx.app/en/stable/installing.html
Create and set ownership for the directory used by the LedFx container for PulseAudio socket communication.
```bash
$ mkdir -p ~/ledfx/pulse
$ sudo chown 1000:1000 ~/ledfx/pulse
```
--------------------------------
### Launch LedFx on Windows
Source: https://docs.ledfx.app/en/stable/installing.html
Run LedFx with the `--open-ui` option to start the backend and automatically open the frontend in your browser. This command is executed from the directory containing LedFx.exe.
```bash
$ .\LedFx.exe --open-ui
```
--------------------------------
### Build Frontend for Distribution
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Compiles the frontend assets into production-ready distribution files.
```bash
$ yarn build
```
--------------------------------
### GET /api/scenes/{scene_id} - Get Scene Details
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
Retrieves detailed information about a specific scene, identified by its scene ID.
```APIDOC
## GET /api/scenes/{scene_id}
### Description
Gets detailed information about a specific scene.
### Method
GET
### Endpoint
/api/scenes/{scene_id}
### Parameters
#### Path Parameters
- **scene_id** (string) - Required - The ID of the scene to retrieve.
### Response
#### Success Response (200)
- **status** (string) - Indicates the status of the operation ('success' or 'failed').
- **payload** (object) - Contains the scene details.
- **scene** (object) - The scene object with all its properties.
- **id** (string) - The ID of the scene.
- **name** (string) - The name of the scene.
- **active** (boolean) - Indicates if the scene is currently active.
- *All other scene configuration details.*
#### Response Example
```json
{
"status": "success",
"payload": {
"scene": {
"id": "custom-scene",
"name": "Custom Scene",
"scene_image": "image: https://example.com/image.jpg",
"scene_tags": "party,energetic",
"scene_puturl": "",
"scene_payload": "",
"virtuals": {
"falcon1": {
"action": "activate",
"type": "blade_power_plus",
"config": {
"background_brightness": 1,
"background_color": "#000000",
"blur": 2,
"brightness": 1,
"decay": 0.7,
"flip": false,
"frequency_range": "Lows (beat+bass)",
"gradient": "linear-gradient(90deg, rgb(255, 0, 0) 0%, rgb(255, 120, 0) 14%)",
"mirror": false,
"multiplier": 0.5
}
},
"strip2": {
"action": "activate",
"type": "scroll_plus",
"preset": "rainbow-scroll"
},
"strip3": {
"action": "forceblack"
},
"strip4": {
"action": "stop"
},
"strip5": {
"action": "ignore"
}
}
}
}
}
```
```
--------------------------------
### Create Scene (Auto-capture Virtuals)
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
Use this cURL command to create a new scene, automatically capturing all active virtual devices. Scene name, image, and tags are specified.
```bash
curl -X POST http://localhost:8888/api/scenes \
-H "Content-Type: application/json" \
-d '{
"name":"Evening Vibe",
"scene_image":"Wallpaper",
"scene_tags":"ambient,relaxing"
}'
```
--------------------------------
### Install Node.js and yarn on macOS
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Installs Node.js and yarn using Homebrew on macOS. This is the recommended method for managing these dependencies on macOS.
```bash
$ brew install nodejs
$ brew install yarn
$ cd ~/frontend
$ yarn install
```
--------------------------------
### Virtual Diag Event Payload Example
Source: https://docs.ledfx.app/en/stable/apis/websocket.html
Example JSON payload for the 'virtual_diag' WebSocket event, detailing performance and timing metrics for a virtual device.
```json
{
"event_type": "virtual_diag",
"virtual_id": "my_virtual_id",
"fps": 48,
"r_avg": 0.017432,
"r_min": 0.008123,
"r_max": 0.022345,
"cycle": 16.67,
"sleep": 0.014232,
"phy":
{
"fps": 55,
"ver": "0.14.4",
"n": 1024,
"name": "32x32",
"rssi": -45,
"qual": 100
}
}
```
--------------------------------
### Disable Jitter at Start
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
To explicitly disable jitter for a runtime session, pass an empty 'timing' object with the 'start' action. This overrides any stored playlist timing settings.
```json
{ "id": "evening-cycle", "action": "start", "timing": {} }
```
--------------------------------
### Start Playlist with Timing Override
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
Temporarily override playlist timing settings, such as jitter, for a runtime session by providing a 'timing' object with the 'start' action. This override does not persist.
```json
{ "id": "evening-cycle", "action": "start", "timing": { "jitter": { "enabled": true, "factor_min": 0.5, "factor_max": 1.5 } } }
```
--------------------------------
### Start Playlist with Mode Override
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
You can override the playlist's default playback mode (sequence or shuffle) for a runtime session by including the 'mode' field with the 'start' action.
```json
{ "id": "evening-cycle", "action": "start", "mode": "shuffle" }
```
--------------------------------
### Locate configuration and log files by OS
Source: https://docs.ledfx.app/en/stable/howto/report.html
Paths to the .ledfx directory where config.json and ledfx.log are stored, depending on the operating system.
```text
C:\Users\username\AppData\Roaming\.ledfx
%appdata%\.ledfx
```
```text
/home/username/.ledfx
~/.ledfx
```
```text
/Users/username/.ledfx
~/.ledfx
```
--------------------------------
### Run LedFx with Options (Linux Terminal)
Source: https://docs.ledfx.app/en/stable/launch.html
Append options to the 'ledfx' command in the terminal. If using a virtual environment, activate it first.
```bash
ledfx [options]
```
```bash
source /path/to/venv/bin/activate
ledfx [options]
```
--------------------------------
### Start LedFx in Development Mode
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Starts LedFx in development mode and initiates the yarn watcher for automatic rebuilding of frontend assets upon changes. This is useful for active development.
```bash
$ uv run ledfx
$ yarn start
```
--------------------------------
### Download Asset using cURL (GET)
Source: https://docs.ledfx.app/en/stable/apis/assets.html
Download a specific asset using a GET request with the path as a query parameter. This method is browser-friendly. The response includes binary image data or a JSON error message.
```bash
# User asset
curl "http://localhost:8888/api/assets/download?path=icons/led.png" --output led.png
# Built-in asset
curl "http://localhost:8888/api/assets/download?path=builtin://skull.gif" --output skull.gif
# Cached URL
curl "http://localhost:8888/api/assets/download?path=https://example.com/image.gif" --output image.gif
```
--------------------------------
### Launch LedFx with UI on macOS
Source: https://docs.ledfx.app/en/stable/installing.html
Start LedFx with the `--open-ui` flag to launch the backend and automatically open the frontend in a web browser. This is typically run after activating a virtual environment.
```bash
$ ledfx --open-ui
```
--------------------------------
### Build Frontend for Distribution
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Builds the frontend for distribution after development is complete. This command generates the necessary production-ready files.
```bash
$ yarn build
```
--------------------------------
### GET /api/playlists
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
Retrieves a list of all available playlists.
```APIDOC
## GET /api/playlists
### Description
Retrieves a list of all available playlists.
### Method
GET
### Endpoint
`/api/playlists`
### Responses
#### Success Response (200 OK)
- **playlists** (array of objects) - An array containing playlist objects.
#### Error Response (500 Internal Server Error)
- **error** (string) - Error message if the server encounters an issue.
```
--------------------------------
### GET /api/clients
Source: https://docs.ledfx.app/en/stable/apis/websocket.html
Retrieves metadata for all active websocket clients.
```APIDOC
## GET /api/clients
### Description
As of this version, GET /api/clients returns full client metadata objects instead of simple IP strings. Returns metadata for all active websocket clients.
### Method
GET
### Endpoint
/api/clients
### Response
#### Success Response (200)
Returns a JSON object where keys are client UUIDs and values are client metadata objects.
**Metadata Fields:**
* `ip` (string) - Client IP address
* `name` (string) - Client-provided name (or auto-generated `Client-{uuid[:8]}`)
* `type` (string) - Client type - one of: `controller`, `visualiser`, `mobile`, `display`, `api`, `unknown`
* `device_id` (string) - Optional device identifier provided by client
* `connected_at` (number) - Unix timestamp when client connected
### Response Example
```json
{
"823f78cd-24fa-4cd4-908f-979249350dea": {
"ip": "127.0.0.1",
"name": "Living Room Display",
"type": "visualiser",
"device_id": "device-123",
"connected_at": 1708272000.123
},
"34361601-1416-428d-9b89-37c82281222d": {
"ip": "127.0.0.1",
"name": "Controller App",
"type": "controller",
"device_id": null,
"connected_at": 1708272010.789
},
"8743a845-40ba-4427-8ae6-361b2be6fac6": {
"ip": "1.2.3.4",
"name": "Client-8743a845",
"type": "unknown",
"device_id": null,
"connected_at": 1708272020.456
}
}
```
```
--------------------------------
### GET /api/integrations/qlc/
Source: https://docs.ledfx.app/en/stable/apis/api.html
Retrieve information from a QLC+ integration.
```APIDOC
## GET /api/integrations/qlc/
### Description
Returns info from the QLC+ integration.
### Method
GET
### Endpoint
/api/integrations/qlc/
### Request Body
- **info** (string) - Required - One of: ["event_types", "qlc_widgets", "qlc_listeners"]
### Request Example
{
"info": "qlc_listeners"
}
```
--------------------------------
### GET /api/sendspin/servers
Source: https://docs.ledfx.app/en/stable/apis/sendspin_servers.html
Retrieves a list of all configured Sendspin servers.
```APIDOC
## GET /api/sendspin/servers
### Description
Returns all configured Sendspin servers.
### Method
GET
### Endpoint
/api/sendspin/servers
### Response
#### Success Response (200)
- **servers** (object) - A dictionary of server configurations keyed by their unique ID.
#### Response Example
{
"servers": {
"living-room": {
"server_url": "ws://192.168.1.12:8927/sendspin",
"client_name": "LedFx"
}
}
}
```
--------------------------------
### Run LedFx with Options (Windows Command Prompt)
Source: https://docs.ledfx.app/en/stable/launch.html
Append desired options to the ledfx command when running from the Command Prompt. Ensure you are in the directory where ledfx is located.
```bash
ledfx [options]
```
--------------------------------
### Virtual Device Preset Activation
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
Example of using a named preset instead of an explicit configuration object when activating a virtual device.
```json
{
"virtual-id": {
"action": "activate",
"type": "scroll_plus",
"preset": "rainbow-scroll"
}
}
```
--------------------------------
### GET /api/scenes
Source: https://docs.ledfx.app/en/stable/apis/scenes.html
Retrieve a list of all scenes or details of a specific scene.
```APIDOC
## GET /api/scenes
### Description
Lists all available scenes or retrieves details for a specific scene by ID.
### Method
GET
### Endpoint
/api/scenes or /api/scenes/{id}
### Parameters
#### Path Parameters
- **id** (string) - Optional - The ID of the specific scene to retrieve
```
--------------------------------
### Auto-discover and Add First Found Server
Source: https://docs.ledfx.app/en/stable/apis/sendspin_servers.html
A two-step process using `curl`. First, discover servers with a specified timeout. Second, add the discovered server using its URL. This demonstrates a common workflow for integrating new servers.
```Shell
# Discover
curl http://localhost:8888/api/sendspin/discover?timeout=5.0
# Add the discovered server
curl -X POST http://localhost:8888/api/sendspin/servers \
-H "Content-Type: application/json" \
-d '{"id": "my-server", "server_url": "ws://192.168.1.12:8927/sendspin"}'
```
--------------------------------
### GET /api/playlists/{id}
Source: https://docs.ledfx.app/en/stable/apis/playlists.html
Retrieves the details of a specific playlist by its ID.
```APIDOC
## GET /api/playlists/{id}
### Description
Retrieves the details of a specific playlist identified by its unique ID.
### Method
GET
### Endpoint
`/api/playlists/{id}`
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the playlist.
### Responses
#### Success Response (200 OK)
- **playlist** (object) - The playlist object with its details.
#### Error Response (404 Not Found)
- **error** (string) - Error message indicating that the playlist with the specified ID was not found.
```
--------------------------------
### Clone LedFx Repository
Source: https://docs.ledfx.app/en/stable/developer/developer.html
Initial step to download the main LedFx source code from GitHub.
```bash
$ git clone https://github.com/LedFx/LedFx.git
```