Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
27d3420
Build each usermod in isolation
netmindz Jan 22, 2025
0e7d5dd
Build each usermod in isolation
netmindz Jan 22, 2025
04c7eac
Use JSON for usermods list
netmindz Jan 22, 2025
b3af04d
Use JSON for usermods list
netmindz Jan 22, 2025
b1b2eea
Use JSON for usermods list
netmindz Jan 22, 2025
8d4c911
Fix typo in env name
netmindz Jan 22, 2025
5f19608
Merge branch 'usermod-libs' into usermod-libs-matrix
netmindz Jan 22, 2025
7d48bba
build usermod_esp32
netmindz Jan 22, 2025
74672e2
Verify each usermod on change
netmindz Jan 22, 2025
99108f9
Swap ordering to see if naming is then clearer
netmindz Jan 22, 2025
199529a
Also run if the workflow changes
netmindz Jan 22, 2025
3a31d5d
Merge branch 'usermod-libs' into usermod-libs-matrix
netmindz Feb 7, 2025
adb9b77
Merge branch 'main' into usermod-libs-matrix
netmindz Apr 26, 2025
7852ff5
Build for each chipset
netmindz Apr 26, 2025
b77881f
Build for each chipset
netmindz Apr 26, 2025
fbb7ef7
fix custom_usermods setting
netmindz Apr 26, 2025
6c4d049
force new line
netmindz Apr 26, 2025
19ba257
usermod_esp32s3
netmindz Apr 26, 2025
92db9e0
fix envs
netmindz Apr 26, 2025
f1c88bc
fix envs
netmindz Apr 26, 2025
7835550
Merge branch 'main' into usermod-libs-matrix
netmindz Jun 14, 2025
65a79d4
Fix build_flags and lib_deps for usermods#
netmindz Jun 14, 2025
b0dd969
Add missing ${esp32_idf_V4.lib_deps} to usermods lib_deps
netmindz Jun 14, 2025
a6f5080
Update usermods/platformio_override.usermods.ini
netmindz Jun 15, 2025
e97723d
Use existing board envs for usermod build
willmmiles Jun 16, 2025
1c4141a
Exclude PWM_fan
netmindz Jun 28, 2025
7cc5c87
Fixing Si7021_MQTT_HA
netmindz Jun 28, 2025
b187f94
use extreme_partitions
netmindz Jun 28, 2025
5163fbf
Merge branch 'main' into usermod-libs-matrix
netmindz Jun 28, 2025
a2e9e2b
Update buzzer to default to 21 if GPIO 32 is not defined
netmindz Jun 28, 2025
b1ed99d
Disable BME68X_v2
netmindz Jun 28, 2025
0ba0587
Exclude BME68X_v2
netmindz Jun 28, 2025
9099b13
Fix deps for Si7021_MQTT_HA
netmindz Jun 28, 2025
db55fec
Merge branch 'usermod-libs-matrix' of github.com:netmindz/WLED into u…
netmindz Jun 28, 2025
e227d01
Exclude pixels_dice_tray until we can limit what the CI builds, respe…
netmindz Jun 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/usermods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Usermod CI

on:
push:
paths:
- usermods/**
- .github/workflows/usermods.yml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove trailing whitespace – YAML-lint treats it as an error

Also applies to: 71-71

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 8-8: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/usermods.yml at lines 8 and 71, there are trailing
whitespace characters that cause YAML-lint errors. Remove any spaces or tabs at
the end of these lines to comply with YAML formatting rules and prevent linting
issues.

jobs:

get_usermod_envs:
name: Gather Usermods
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Comment on lines +15 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix YAML indentation under get_usermod_envs steps.
Sequence items (- uses:) must be indented two spaces under steps: to be valid.

Apply this diff:

-    - uses: actions/checkout@v4
-    - uses: actions/setup-python@v5
+      - uses: actions/checkout@v4
+      - uses: actions/setup-python@v5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 15-15: wrong indentation: expected 6 but found 4

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/usermods.yml around lines 15 to 16, the sequence items
under the steps key are not indented correctly. Fix the YAML indentation by
ensuring that each `- uses:` line is indented exactly two spaces under the
`steps:` key to comply with YAML syntax requirements.

with:
python-version: '3.12'
cache: 'pip'
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Get default environments
id: envs
run: |
echo "usermods=$(find usermods/ -name library.json | xargs dirname | xargs -n 1 basename | jq -R | grep -v PWM_fan | grep -v BME68X_v2| grep -v pixels_dice_tray | jq --slurp -c)" >> $GITHUB_OUTPUT
outputs:
usermods: ${{ steps.envs.outputs.usermods }}


build:
name: Build Enviornments
runs-on: ubuntu-latest
needs: get_usermod_envs
strategy:
fail-fast: false
matrix:
usermod: ${{ fromJSON(needs.get_usermod_envs.outputs.usermods) }}
environment: [usermods_esp32, usermods_esp32c3, usermods_esp32s2, usermods_esp32s3]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
Comment on lines +40 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix YAML indentation under build steps.
The - uses: entries here should align with a two-space indent under steps:.

Apply this diff:

-    - uses: actions/checkout@v4
-    - name: Set up Node.js
+      - uses: actions/checkout@v4
+      - name: Set up Node.js
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v4
- name: Set up Node.js
- uses: actions/checkout@v4
- name: Set up Node.js
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 40-40: wrong indentation: expected 6 but found 4

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/usermods.yml at lines 40 to 41, the YAML indentation for
the build steps is incorrect. Adjust the indentation so that the `- uses:` and
`- name:` entries are indented exactly two spaces under the `steps:` key to
comply with YAML syntax and ensure proper workflow execution.

uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio/.cache
~/.buildcache
build_output
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-${{ hashFiles('wled00/**', 'usermods/**') }}
restore-keys: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct indentation for Python setup block.
Indent python-version and cache two spaces under with: (8 spaces total).

Apply this diff:

-          python-version: '3.12'
-          cache: 'pip'
+        python-version: '3.12'
+        cache: 'pip'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
python-version: '3.12'
python-version: '3.12'
cache: 'pip'
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 59-59: wrong indentation: expected 8 but found 10

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/usermods.yml at line 59, the `python-version` key under the
`with:` block is not correctly indented. Adjust the indentation of
`python-version` and the `cache` keys to be two spaces further indented under
`with:`, making a total of 8 spaces, to comply with YAML formatting standards.

cache: 'pip'
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Add usermods environment
run: |
cp -v usermods/platformio_override.usermods.ini platformio_override.ini
echo >> platformio_override.ini
echo "custom_usermods = ${{ matrix.usermod }}" >> platformio_override.ini
cat platformio_override.ini

- name: Build firmware
run: pio run -e ${{ matrix.environment }}
4 changes: 3 additions & 1 deletion usermods/Si7021_MQTT_HA/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"build": { "libArchive": false },
"dependencies": {
"finitespace/BME280":"3.0.0",
"adafruit/Adafruit Si7021 Library" : "1.5.3"
"adafruit/Adafruit Si7021 Library" : "1.5.3",
"SPI":"*",
"adafruit/Adafruit BusIO": "1.17.1"
}
}
12 changes: 1 addition & 11 deletions usermods/Si7021_MQTT_HA/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,8 @@ SDA_PIN = 4;

## Software

Add to `build_flags` in platformio.ini:
Add `Si7021_MQTT_HA` to custom_usermods

```
-D USERMOD_SI7021_MQTT_HA
```

Add to `lib_deps` in platformio.ini:

```
adafruit/Adafruit Si7021 Library @ 1.4.0
BME280@~3.0.0
```

# Credits

Expand Down
7 changes: 4 additions & 3 deletions usermods/buzzer/buzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@

#define USERMOD_ID_BUZZER 900
#ifndef USERMOD_BUZZER_PIN
#ifdef GPIO_NUM_32
#define USERMOD_BUZZER_PIN GPIO_NUM_32
#else
#define USERMOD_BUZZER_PIN 21
#endif
#endif

/*
* Usermods allow you to add own functionality to WLED more easily
* See: https://github.com/wled-dev/WLED/wiki/Add-own-functionality
*
* Using a usermod:
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino)
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
*/

class BuzzerUsermod : public Usermod {
Expand Down
31 changes: 31 additions & 0 deletions usermods/platformio_override.usermods.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[platformio]
default_envs = usermods_esp32, usermods_esp32c3, usermods_esp32s2, usermods_esp32s3

[env:usermods_esp32]
extends = env:esp32dev_V4
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat


[env:usermods_esp32c3]
extends = env:esp32c3dev
board = esp32-c3-devkitm-1
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat


[env:usermods_esp32s2]
extends = env:lolin_s2_mini
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat


[env:usermods_esp32s3]
extends = env:esp32s3dev_16MB_opi
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat



[usermods]
# Added in CI