Feature Proposal for plugin support in Xlights #6368
Replies: 1 comment
|
With a plugin system, it would be a good idea to have a way for xLights to load without plugins. Alternatively, it could be used to temporarily disable any user modifiable parts of xLights. This would be a big change but would be great for resolving issues. I was thinking to have a "Safe Mode", and be able to launch xLights with a -s flag for safe mode. Have it as in option in the file menu "Open xLights in Safe Mode". In Windows, there could also be a shortcut for "xLights (Safe Mode)". If xLights throws an exception or error at startup, have it automatically fall back to safe mode so we can get into it and remove/disable plugins. This would also assist zoom helpers to be able to diagnose issues better if/when plugins are introduced. One of the main questions on GitHub Issues and in the zoom room would become "Have you tried safe mode?" which would help determine if the user installed something to cause the issue or if it's an actual issue with xLights. Right now, if we have slow render times, issues with models, and other similar things we go digging. With plugins, we could instruct the user to open safe mode first, see if the issue persists, and that would keep us from hours of guessing to find out that it was a plugin causing the issue all along. For plugin signing, I'd say have a dropdown in xLights Settings labelled "Allow unsigned plugins:" with options always, warn, or never - and is set to never by default. If a user tries to install an unsigned plugin and the warning is turned on, give them a big scary warning that it is unsigned and could have a negative effect, and give them the option to install anyway. That way, regular users can make sure they only install official plugins. Advanced users can have it set to warn so they know it's unsigned but can still install. Developers who frequently install or test unsigned plugins have the option to turn it off completely. |
Uh oh!
There was an error while loading. Please reload this page.
Proposal: Plugin Architecture for XLights
Discussion Type: Feature Proposal
Author: Nick Scilingo (Focusedonsound)
Date: May 2026
Status: Open for Community Feedback
Overview
This proposal outlines a plugin architecture for XLights that would allow community developers to extend the software with new effects, output protocols, import/export formats, controller integrations, and sequencing tools — without requiring changes to the core codebase or waiting for a core maintainer to merge new features.
A plugin system would transform XLights from a single monolithic application into an extensible platform, enabling the community to contribute functionality independently and allowing the core team to focus on stability, performance, and foundational features.
I am volunteering to design and implement the initial plugin framework.
Motivation
XLights has grown into a remarkably capable piece of software, but growth creates tension: the more the community wants, the heavier the maintenance burden on a small group of core contributors. A plugin architecture addresses this directly by:
Projects like Audacity, OBS Studio, and Inkscape have demonstrated that a well-designed plugin system dramatically expands what a community can build without overwhelming core contributors.
Scope: What Can Be a Plugin?
The following categories are proposed as pluggable extension points:
1. Effect Plugins
New sequencing effects that appear in the effects panel alongside built-in effects. A plugin effect has full access to the model pixel grid and the timing/beat data for the sequence.
Examples: Custom pixel font renderer, advanced kaleidoscope effect, sports scoreboard overlay, AI-generated motion patterns.
2. Output / Protocol Plugins
New controller output protocols beyond the built-in E1.31, DDP, Artnet, DMX, etc. This allows support for proprietary or emerging protocols without modifying core networking code.
Examples: A new manufacturer's UDP protocol, a custom serial protocol for DIY controllers, a cloud-connected output bridge.
3. Import / Export Plugins
New sequence file format readers and writers. Currently adding import support for a new format (e.g. a competitor's sequence format) requires a core PR. A plugin can handle this independently.
Examples: Vixen 3 importer, Light-O-Rama LMS enhanced importer, custom CSV/JSON sequence exporter, cloud backup exporter.
4. Controller Configuration Plugins
Additional tabs or panels in the Controller Config / FPP Connect screen for controller brands not yet natively supported.
Examples: A new pixel controller brand's auto-upload tool, a custom WLED profile manager, a Raspberry Pi GPIO output configurator.
5. Sequencing Tool Plugins
Custom panels or dialog windows that assist with sequencing workflows. These appear as additional tools in the Tools menu or as floating panels.
Examples: AI-assisted beat detection, custom lyric synchronization tool, commercial sequence conversion wizard, show budget/power calculator.
6. Model Plugins
New model types beyond the built-in singles, matrices, arches, trees, etc.
Examples: Custom 3D sculpture shapes, stadium/arena layouts, animated prop models with articulated segments.
Plugin Architecture Design
Loading Model: Native Shared Libraries
Plugins are compiled as native shared libraries (
.dllon Windows,.dylibon macOS,.soon Linux). XLights discovers them by scanning a designatedplugins/directory at startup.This approach is consistent with how OBS Studio, Audacity, and most C++ desktop applications implement plugins. It provides:
Plugin Interface (C ABI)
Each plugin exposes a small set of standardized C-style functions that XLights calls to discover and interact with the plugin. Using a C ABI (rather than C++) avoids C++ ABI fragility across compiler versions:
The
XLightsHostAPIstruct passed during initialization gives the plugin a stable set of function pointers to call back into XLights core — reading model data, queuing renders, accessing timing tracks, writing output data, etc.Plugin Info Struct
Plugin Discovery & Loading Sequence
Plugins that fail to load are skipped with a warning logged to the XLights log file. A single bad plugin cannot prevent XLights from starting.
Plugin Isolation & Safety
Plugin Manager UI
A new Plugin Manager dialog (accessible from
Help → Plugin ManagerorTools → Plugin Manager) provides:Plugin Distribution & Discovery
Phase 1 — Manual Install
Users download a plugin
.dll/.dylib/.sofrom a GitHub release, forum post, or developer's website, and place it in theirplugins/folder. XLights picks it up on next launch. Simple and requires no infrastructure.Phase 2 — Community Plugin Registry (Future)
A GitHub repository (e.g.
xlights-community/xlights-plugins) acts as a curated index of community plugins. Each plugin has a simple JSON metadata file:{ "name": "Advanced Beat Detector", "author": "community_dev", "version": "1.0.2", "category": "tool", "description": "Enhanced beat and phrase detection using onset analysis.", "download_url": "https://github.com/community_dev/xl-beatdetector/releases/latest", "source_url": "https://github.com/community_dev/xl-beatdetector", "is_open_source": true, "min_xlights_version": "2024.10", "platforms": ["windows", "macos", "linux"] }The Plugin Manager's "Browse" tab fetches this index and lets users install plugins with a single click — similar to how VS Code's extension marketplace works, but lightweight and GitHub-hosted.
Host API — Available to Plugins
The following is the initial proposed surface area of the XLights Host API that plugins can call into. This is deliberately conservative for the first release — it can be expanded based on community needs.
Read-Only Model Access
Sequence & Timing Data
Effect Registration (Effect Plugins only)
Output Registration (Output Plugins only)
Import/Export Registration
UI Helpers
What Is Intentionally NOT in the Host API (v1)
Versioning & Compatibility
The Host API will be versioned with an integer (
XLIGHTS_PLUGIN_API_VERSION).A plugin built for API version 1 will continue to load and run correctly in XLights versions that ship API version 2 or 3.
Security Considerations
Plugins are native code running in the same process as XLights. This means:
Developer Experience
Plugin SDK
A lightweight
xlights-plugin-sdkrepository will be published containing:XLightsPlugin.hheader file defining the Host APICMakeLists.txttemplate for building a plugin against the SDKBuild System
Plugins use CMake (matching XLights core) and can be built independently without a full XLights source checkout — only the SDK header is needed.
Documentation
Full API documentation will be published at a GitHub wiki or docs site, covering:
Phased Implementation Plan
Phase 1 — Foundation (Core infrastructure, ~4–6 weeks)
XLightsPluginInfoand version checkingXLightsHostAPIv1 with minimal surface areaPhase 2 — More Plugin Types (~3–4 weeks)
Phase 3 — Community Registry (~2–3 weeks)
Phase 4 — Model Plugins & Advanced API (~ongoing)
My Commitment
I am volunteering to:
XLightsHostAPIv1 in collaboration with core maintainersxlights-plugin-sdkrepository with examples and documentationI am not asking core maintainers to write the implementation — only to collaborate on the API design, review the PRs, and provide guidance on the internal architecture I'll be integrating with.
Open Questions for the Community
Native plugins vs. scripting? Native
.dll/.soplugins offer full performance but require C++ knowledge. Would the community benefit from a scripting option (e.g. Lua or Python) for simpler tool plugins, even at the cost of a heavier runtime dependency?Same-process vs. out-of-process? Running plugins in a separate process (via IPC) would make crashes completely safe but adds significant complexity and latency. Is the crash risk of same-process plugins acceptable?
Plugin signing/verification? Should XLights warn users when loading unsigned plugins? Should the community registry require code signing?
Priority of plugin categories? Which plugin types should be tackled first — effects, outputs, import/export, or tools? Community input on this will shape the Phase 1 scope.
Naming and branding? Should community plugins have a formal name ("XLights Extensions"? "XLights Add-ons"?) or just be called plugins?
Backwards compatibility commitment? How long should XLights commit to supporting older plugin API versions? One year? Two major releases?
I welcome all feedback on the design. My goal is to build something sustainable that reduces friction for core contributors while opening XLights up to the broader community of developers who want to contribute.
Thank you!
All reactions