+
+Lights Control is the **central command panel** for your LEDs. It is also the integration point for every external controller β Home Assistant, DMX, IR remotes, hardware buttons, displays β all talk to the same module.
+
+---
+
+## Power & Brightness
+
+| Control | Type | Description |
+|---|---|---|
+| **On** | Toggle | Master switch β turns all lights on or off. Also driven by hardware buttons and PIR sensor (see [Hardware pins](#hardware-pins)). |
+| **Brightness** | Slider | Global brightness of the LEDs when on (0β255, default 20). |
+
+When lights are turned off the brightness is set to 0 in the LED driver; the stored brightness value is kept so it is restored when switched back on.
+
+---
+
+## Colour
+
+Three sliders set a global colour multiplier applied to every pixel:
+
+- π΄ **Red** β red channel (0β255)
+- π’ **Green** β green channel (0β255)
+- π΅ **Blue** β blue channel (0β255)
+
+Setting all three to 255 (default) leaves effect colours unchanged. Reducing a channel tints the entire output away from that colour.
+
+---
+
+## Palette
+
+A searchable dropdown listing all available palettes, grouped by origin:
+
+| Category | Tag |
+|---|---|
+| FastLED built-ins | β‘οΈ |
+| MoonModules palettes | π |
+| MoonLight palettes | π« |
+| WLED palettes | *(no tag)* |
+
+The selected palette is the **global palette** used by effects that reference `layerP.palette`. See [WLED-MM palettes](https://mm.kno.wled.ge/features/palettes/) for the full WLED-MM palette reference.
+
+> **Tip:** LiveScript palette files (`P_*.sc`) stored on the filesystem appear automatically under the *LiveScript* category.
+
+---
+
+## BPM & Intensity
+
+Two global override sliders that broadcast a value to **all currently active effect nodes**:
+
+| Control | Default | What it pushes |
+|---|---|---|
+| **BPM** | 60 | Writes to each active node's `speed` and `BPM` controls |
+| **Intensity** | 128 | Writes to each active node's `intensity` control |
+
+These give you a single knob to speed up or calm down all running effects simultaneously, without opening the Effects panel. Effects that expose a `speed`, `BPM`, or `intensity` control will react; others are unaffected.
+
+---
+
+## Presets
+
+A 64-slot grid for saving and loading complete effect configurations.
+
+### Slot colours
+
+| Colour | Meaning |
+|---|---|
+| π΅ Blue | Empty slot |
+| π’ Green | Saved preset β the label shows the first effect name |
+| π΄ Red | Currently active preset |
+
+### Interactions
+
+| Action | Result |
+|---|---|
+| **Click** an empty (blue) slot | Saves the current effects & modifiers to that slot |
+| **Click** a saved (green) slot | Loads that preset |
+| **Long-press** a saved slot | Deletes the preset |
+| **Hover** over a saved slot | Shows a popup listing the effects and modifiers stored inside |
+
+> **Note:** Presets store **Effects and Modifiers only** β not Layouts or Drivers. Configure those separately.
+
+---
+
+## Preset Loop
+
+Automatically cycles through saved presets on a timer.
+
+| Control | Range | Description |
+|---|---|---|
+| **Preset loop** | 0β255 s | Seconds between automatic preset advances. Set to **0** to disable. |
+| **First preset** | 1β64 | First slot included in the loop |
+| **Last preset** | 1β64 | Last slot included in the loop |
+
+The loop skips empty slots and wraps around when it reaches *Last preset*.
+
+---
+
+## Monitor
+
+**Monitor On** β when enabled, the current LED frame is streamed to the [Monitor](../moonbase/monitor.md) view in the UI. Disable to reduce WebSocket traffic when monitoring is not needed.
+
+---
+
+## Hardware Pins
+
+Pin assignments are configured in [IO](../moonbase/io.md). Lights Control reacts to the following pin types:
+
+| Pin type | Behaviour |
+|---|---|
+| **Relay β Lights On** | Output: driven HIGH when lights are on, LOW when off |
+| **Push button β Lights On** | Momentary press toggles lights on/off (debounced, active-low) |
+| **Toggle button β Lights On** | Any state change (rising or falling) toggles lights on/off |
+| **PIR sensor** | HIGH = lights on, LOW = lights off |
+
+---
+
+## Home Assistant / MQTT
+
+When MQTT is enabled, Lights Control auto-registers as a **Home Assistant light entity** via MQTT discovery. HA can then control **On/Off** and **Brightness**; the device appears under the hostname of the ESP32.
+
+The integration activates and deactivates automatically when MQTT is enabled or disabled in the [MQTT settings](../moonbase/mqtt.md) β no restart required.
diff --git a/docs/moonlight/lightscontrol.png b/docs/moonlight/lightscontrol.png
new file mode 100644
index 00000000..6badf6c9
Binary files /dev/null and b/docs/moonlight/lightscontrol.png differ
diff --git a/firmware/esp32-p4.ini b/firmware/esp32-p4.ini
index 0fa711b3..1279eaad 100644
--- a/firmware/esp32-p4.ini
+++ b/firmware/esp32-p4.ini
@@ -32,55 +32,34 @@ lib_deps = ${esp32-p4-base.lib_deps}
; Flash: [======== ] 82.3% (used 1726193 bytes from 2097152 bytes)
-
-;https://www.olimex.com/Products/IoT/ESP32-P4/ESP32-P4-DevKit
-;https://github.com/CreoKinetics/Olimex-ESP32-P4-Test
-; compiling but crashing (firmware.elf': No such file, H_SDIO_DRV: sdio card init failed)
-; see https://github.com/MoonModules/MoonLight/issues/3
-[env:esp32-p4-olimex]
-; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
-;platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
-board = olimex-esp32-p4
-framework = arduino
-board_build.partitions = default_16MB.csv
-monitor_speed = 115200
-board_dir = boards
+; https://www.waveshare.com/esp32-p4-eth.htm
+; https://www.waveshare.com/wiki/ESP32-P4-ETH
+; Ethernet only (no WiFi coprocessor), 100M RJ45, 32MB flash, 32MB PSRAM
+; Also works for https://www.olimex.com/Products/IoT/ESP32-P4/ESP32-P4-DevKit
+[env:esp32-p4-eth]
+board = esp32-p4-evboard
+board_build.partitions = default_16MB.csv
+upload_speed = 921600
build_flags = ${esp32-p4-base.build_flags}
- -DARDUINO_USB_CDC_ON_BOOT=1
- -DARDUINO_USB_MODE=1
+ -D FT_WIFI=0 ; no WiFi coprocessor on this board
lib_deps = ${esp32-p4-base.lib_deps}
-; RAM: [= ] 7.0% (used 36580 bytes from 524288 bytes)
-; Flash: [=== ] 26.3% (used 1726203 bytes from 6553600 bytes). !!!???
-
-
-; running fine on https://github.com/CreoKinetics/Olimex-ESP32-P4-Test :
-
-; [Boot] ESP32-P4 Async Web Server Test
-; [Flash] Init 0
-; β
SPIFFS mounted 0 - 1061117952
-; π Content: Hello from P4 @ 5160
-; [PSRAM] 32.00 MB
-; [SD] begin⦠E (5375) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
-; E (5375) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
-; [ 5391][E][SD_MMC.cpp:295] begin(): Failed to initialize the card (0x107). Make sure SD card lines have pull-up resistors in place.
-; β Failed
-; [ETH] initβ¦
-; [HTTP] AsyncWebServer started
-; [SPI] bus initialized
-; [Display] initialized
-; [ETH] IP: 192.168.1.231 Gateway: 192.168.1.1
-; [ETH] Speed : 100 Mbps, Duplex: FULL
-; We have:
-
-; ============ Before Setup End ============
-; [ 172][I][esp32-hal-periman.c:141] perimanSetPinBus(): Pin 24 already has type USB_DM (45) with bus 0x4ff14ccc
-; [ 172][I][esp32-hal-periman.c:141] perimanSetPinBus(): Pin 25 already has type USB_DP (46) with bus 0x4ff14ccc
-; sdio_mempool_create free:34092740 min-free:34092740 lfb-def:33030132 lfb-8bit:33030132
-
-; E (1352) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
-; E (1352) sdio_wrapper: sdmmc_card_init failed
-; E (3783) H_SDIO_DRV: sdio card init failed
-
-; FreeRTOS: FreeRTOS Task "sdio_read" should not return, Aborting now!
+; ;https://www.olimex.com/Products/IoT/ESP32-P4/ESP32-P4-DevKit
+; ;https://github.com/CreoKinetics/Olimex-ESP32-P4-Test
+; ; compiling but crashing (firmware.elf': No such file, H_SDIO_DRV: sdio card init failed)
+; ; see https://github.com/MoonModules/MoonLight/issues/3
+; [env:esp32-p4-olimex]
+; ; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
+; ;platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
+; board = olimex-esp32-p4
+; framework = arduino
+; board_build.partitions = default_16MB.csv
+; monitor_speed = 115200
+; board_dir = boards
+; build_flags = ${esp32-p4-base.build_flags}
+; -DARDUINO_USB_CDC_ON_BOOT=1
+; -DARDUINO_USB_MODE=1
+; lib_deps = ${esp32-p4-base.lib_deps}
+; ; RAM: [= ] 7.0% (used 36580 bytes from 524288 bytes)
+; ; Flash: [=== ] 26.3% (used 1726203 bytes from 6553600 bytes). !!!???
diff --git a/firmware/installer/images/esp32-p4-eth.png b/firmware/installer/images/esp32-p4-eth.png
new file mode 100644
index 00000000..c8118bb6
Binary files /dev/null and b/firmware/installer/images/esp32-p4-eth.png differ
diff --git a/firmware/installer/manifest_esp32-p4-olimex-nightly.json b/firmware/installer/manifest_esp32-p4-eth-nightly.json
similarity index 70%
rename from firmware/installer/manifest_esp32-p4-olimex-nightly.json
rename to firmware/installer/manifest_esp32-p4-eth-nightly.json
index 51e1dbb5..654bb64a 100644
--- a/firmware/installer/manifest_esp32-p4-olimex-nightly.json
+++ b/firmware/installer/manifest_esp32-p4-eth-nightly.json
@@ -1,5 +1,5 @@
{
- "name": "MoonLight nightly on esp32-p4-olimex",
+ "name": "MoonLight nightly on esp32-p4-eth",
"version": "0.9.1",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
@@ -8,10 +8,10 @@
"builds": [
{
"chipFamily": "ESP32-P4",
- "name": "esp32-p4-olimex",
- "image": "./images/olimex-esp32-p4.jpg",
+ "name": "esp32-p4-eth",
+ "image": "./images/esp32-p4-eth.png",
"parts": [
- { "path": "https://proxy.corsfix.com/?https://github.com/MoonModules/MoonLight/releases/download/v0.9.1/MoonLight_esp32-p4-olimex_0-9-1_webflash.bin", "offset": 0 }
+ { "path": "https://proxy.corsfix.com/?https://github.com/MoonModules/MoonLight/releases/download/v0.9.1/MoonLight_esp32-p4-eth_0-9-1_webflash.bin", "offset": 0 }
]
}
]
diff --git a/firmware/installer/manifest_esp32-p4-olimex.json b/firmware/installer/manifest_esp32-p4-eth.json
similarity index 70%
rename from firmware/installer/manifest_esp32-p4-olimex.json
rename to firmware/installer/manifest_esp32-p4-eth.json
index 819dfbb5..0f53c41f 100644
--- a/firmware/installer/manifest_esp32-p4-olimex.json
+++ b/firmware/installer/manifest_esp32-p4-eth.json
@@ -1,5 +1,5 @@
{
- "name": "MoonLight v0.9.0 on esp32-p4-olimex",
+ "name": "MoonLight v0.9.0 on esp32-p4-eth",
"version": "0.9.0",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
@@ -8,10 +8,10 @@
"builds": [
{
"chipFamily": "ESP32-P4",
- "name": "esp32-p4-olimex",
- "image": "./images/olimex-esp32-p4.jpg",
+ "name": "esp32-p4-eth",
+ "image": "./images/esp32-p4-eth.png",
"parts": [
- { "path": "https://proxy.corsfix.com/?https://github.com/MoonModules/MoonLight/releases/download/v0.9.0/MoonLight_esp32-p4-olimex_0-9-0_webflash.bin", "offset": 0 }
+ { "path": "https://proxy.corsfix.com/?https://github.com/MoonModules/MoonLight/releases/download/v0.9.0/MoonLight_esp32-p4-eth_0-9-0_webflash.bin", "offset": 0 }
]
}
]
diff --git a/interface/src/lib/components/moonbase/EditRowWidget.svelte b/interface/src/lib/components/moonbase/EditRowWidget.svelte
index 3962264c..c8191909 100644
--- a/interface/src/lib/components/moonbase/EditRowWidget.svelte
+++ b/interface/src/lib/components/moonbase/EditRowWidget.svelte
@@ -98,6 +98,7 @@
}}
type="button"
>
+