-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Add FSEQ usermod (SD playback + FPP) #5395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Danit2
wants to merge
9
commits into
wled:main
Choose a base branch
from
Danit2:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,230
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e25ee04
Add FSEQ usermod (SD playback + FPP)
Danit2 1b034b4
Update README.md with author information and details
Danit2 6948043
Fixes to make the Rabit happy: Refactor FSEQ SD, playback and web API
Danit2 8599e9d
Fixes to make the Rabbit happy: FSEQ: fix types, SD_ADAPTER, UDP chec…
Danit2 832e6fa
FSEQ/FPP: update APIs, IDs and UI handling
Danit2 ef4e4e0
FSEQ: API paths, UDP sync safety, UI fixes
Danit2 b1d49b5
Improve FPP sync parsing and SD upload handling
Danit2 5c1ad63
Use MAC-based ID for FPP host and ping
Danit2 e3f6677
Improve FSEQ Multisync Stability with Proportional Time-Based Drift C…
Danit2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| # ✨ Usermod FSEQ ✨ | ||
|
|
||
| > **Original created original by: Andrej Chrcek** | ||
|
|
||
| Welcome to the **Usermod FSEQ** project! | ||
| This module extends your WLED setup by enabling FSEQ file playback from an SD card, including a web UI and UDP remote control. It combines creativity with functionality to enhance your lighting experience. | ||
|
|
||
| --- | ||
|
|
||
| # FSEQ Web UI | ||
|
|
||
| Access the interface via: | ||
|
|
||
| http://yourIP/fsequi | ||
|
|
||
| or over the WLED Infotab | ||
|
|
||
| <img width="792" height="206" alt="image" src="https://github.com/user-attachments/assets/e58693ec-afe8-4c28-8343-5b3382cd10ef" /> | ||
|
|
||
| --- | ||
|
|
||
| # SD & FSEQ Usermod for WLED | ||
|
|
||
| This usermod adds support for playing FSEQ files from an SD card and provides a web interface for managing SD files and controlling FSEQ playback via HTTP and UDP. | ||
|
|
||
| It supports configurable SPI pin settings when using SD over SPI. | ||
|
|
||
| The usermod exposes several HTTP endpoints for file management and playback control. | ||
|
|
||
| --- | ||
|
|
||
| ## Features | ||
|
|
||
| - **FSEQ Playback** – Play FSEQ files from an SD card. | ||
| - **Web UI** – Manage SD files (list, upload, delete) and control playback. | ||
| - **UDP Synchronization** – Remote control via UDP packets. | ||
| - **Configurable SPI Pins** – SPI pin assignments can be configured via WLED’s Usermods settings (JSON). | ||
|
|
||
| --- | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Configure PlatformIO | ||
|
|
||
| Add the following to your `platformio_override.ini` (or `platformio.ini`): | ||
|
|
||
| [env:esp32dev_V4] | ||
| custom_usermods = FSEQ | ||
|
|
||
| --- | ||
|
|
||
| ### Storage Configuration | ||
|
|
||
| - If you use **SD over SPI**, the build flag | ||
| `-D WLED_USE_SD_SPI` | ||
| will be enabled automatically (default behavior). | ||
|
|
||
| - If you use **SD via MMC**, you must manually set the build flag: | ||
| `-D WLED_USE_SD_MMC` | ||
|
|
||
| --- | ||
|
|
||
| ## Available Endpoints | ||
|
|
||
| ### SD Management | ||
|
|
||
| GET /fsequi | ||
| Returns the main HTML interface for the SD & FSEQ Manager. | ||
|
|
||
| GET /api/sd/list | ||
| Displays an HTML page listing all files on the SD card, including options to delete files and upload new ones. | ||
|
|
||
| POST /api/sd/upload | ||
| Handles file uploads using multipart/form-data. | ||
|
|
||
| POST /api/sd/delete | ||
| Deletes the specified file from the SD card. | ||
| Example: /api/sd/delete | ||
| body: file=example.fseq | ||
|
|
||
| --- | ||
|
|
||
| ### FSEQ Control | ||
|
|
||
| GET /api/fseq/list | ||
| Returns an HTML page listing all .fseq and .FSEQ files found on the SD card. Each file includes a play button. | ||
|
|
||
| POST /api/fseq/start | ||
| body: file=animation.fseq | ||
| Starts playback of the selected FSEQ file. | ||
|
|
||
| POST /api/fseq/startloop | ||
| body: file=animation.fseq | ||
| Starts playback of the selected FSEQ file in loop mode. | ||
|
|
||
| POST /api/fseq/stop | ||
| Stops the current FSEQ playback and clears the active session. | ||
|
|
||
| --- | ||
|
|
||
| ### FPP Control | ||
|
|
||
| GET /api/system/info | ||
| Returns a JSON list of the system info | ||
|
|
||
| GET /api/system/status | ||
| Returns a JSON list of the system status | ||
|
|
||
| GET /api/fppd/multiSyncSystems | ||
| Returns a JSON list of the multisyncinfos | ||
|
|
||
| POST /fpp | ||
| Endpoint for file upload from xLights (raw, application/octet-stream) | ||
|
|
||
| GET /fseqfilelist | ||
| Endpoint to list FSEQ files on SD card for FPP Player | ||
|
|
||
| GET /fpp/connect | ||
| Endpoint to start FSEQ playback from FPP Player | ||
|
|
||
| GET /fpp/stop | ||
| Endpoint to stop FSEQ playback | ||
|
|
||
| --- | ||
|
|
||
| ## Configurable SPI Pin Settings | ||
|
|
||
| Default SPI pin assignments for SD over SPI: | ||
|
|
||
| ```cpp | ||
| #ifdef WLED_USE_SD_SPI | ||
| int8_t UsermodFseq::configPinSourceSelect = 5; | ||
| int8_t UsermodFseq::configPinSourceClock = 18; | ||
| int8_t UsermodFseq::configPinPoci = 19; | ||
| int8_t UsermodFseq::configPinPico = 23; | ||
| #endif | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| These values can be modified via the WLED Usermods settings tab without recompiling the firmware. | ||
|
|
||
| After making changes, you must reboot the device. | ||
|
|
||
| --- | ||
|
|
||
| ## Summary | ||
|
|
||
| The SD & FSEQ Usermod for WLED enables FSEQ playback from an SD card with a full-featured web interface and UDP synchronization. With configurable SPI pin settings, it integrates seamlessly into WLED without modifying the core code. | ||
|
|
||
| For further customization or support, please refer to the project documentation or open an issue on GitHub. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| Import("env") | ||
|
|
||
| # Reference to the current build environment | ||
| projenv = env | ||
|
|
||
| # Read the custom_usermods option from platformio.ini (WLED 0.16 structure) | ||
| custom_usermods = projenv.GetProjectOption("custom_usermods", default="") | ||
|
|
||
| # Convert the string into a clean uppercase list | ||
| # Supports comma or space separated entries | ||
| usermod_list = [ | ||
| u.strip().upper() | ||
| for u in custom_usermods.replace(",", " ").split() | ||
| ] | ||
|
|
||
| # Check if FSEQ or wildcard "*" is selected | ||
| fseq_enabled = ( | ||
| "FSEQ" in usermod_list or | ||
| "*" in usermod_list | ||
| ) | ||
|
|
||
| # Get current CPPDEFINES (build flags) | ||
| cpp_defines = projenv.get("CPPDEFINES", []) | ||
|
|
||
| # Extract define names into a simple list | ||
| define_names = [] | ||
| for d in cpp_defines: | ||
| if isinstance(d, tuple): | ||
| define_names.append(d[0]) | ||
| else: | ||
| define_names.append(d) | ||
|
|
||
| # Check if MMC or SPI is already enabled | ||
| mmc_enabled = "WLED_USE_SD_MMC" in define_names | ||
| spi_enabled = "WLED_USE_SD_SPI" in define_names | ||
|
|
||
| # Logic: | ||
| # If FSEQ usermod is selected | ||
| # AND neither MMC nor SPI is already defined | ||
| # then automatically enable SPI | ||
| if fseq_enabled and not mmc_enabled and not spi_enabled: | ||
| print("FSEQ usermod detected -> enabling WLED_USE_SD_SPI") | ||
| projenv.Append(CPPDEFINES=["WLED_USE_SD_SPI"]) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.