diff --git a/docs/components.md b/docs/components.md index 968f7c64..f65bb786 100644 --- a/docs/components.md +++ b/docs/components.md @@ -188,7 +188,6 @@ Shows filename, file contents and uploadfile (from file system). Used in FileMan Arguments * path: file or folder to edit -* showEditor: collapsed or not * newItem * isFile: or folder diff --git a/docs/gettingstarted/installer.md b/docs/gettingstarted/installer.md index 4b89a654..f9d89724 100644 --- a/docs/gettingstarted/installer.md +++ b/docs/gettingstarted/installer.md @@ -54,7 +54,7 @@ After a successful install, go to **Logs & Console**, press **Reset Device**, an | esp32-s3-atoms3r | ![esp32-s3-atoms3r](../firmware/installer/images/esp32-s3-atoms3r.jpg){: style="width:100px"} | | | [M5Stack store](https://shop.m5stack.com/products/atoms3r-dev-kit){:target="_blank"} | | esp32-s3-zero-n4r2 | ![esp32-s3-zero-n4r2](../firmware/installer/images/esp32-s3-zero-n4r2.jpg){: style="width:100px"} | | | [Ali*](https://s.click.aliexpress.com/e/_EukjHX8){:target="_blank"} | | esp32-d0-wrover | ![esp32-d0-wrover](../firmware/installer/images/esp32-d0-wrover.jpg){: style="width:100px"} | | | [Ali*](https://a.aliexpress.com/_EzhPi6g){:target="_blank"} | -| esp32-p4-olimex | ![esp32-p4-olimex](../firmware/installer/images/esp32-p4-olimex.jpg){: style="width:100px"} | | | [Olimex](https://www.olimex.com/Products/IoT/ESP32-P4/ESP32-P4-DevKit/open-source-hardware){:target="_blank"} | +| esp32-p4-eth | ![esp32-p4-eth](../firmware/installer/images/esp32-p4-eth.png){: style="width:100px"} | | | [Waveshare](https://www.waveshare.com/product/arduino/boards-kits/esp32-p4/esp32-p4-eth.htm){:target="_blank"}
[Olimex](https://www.olimex.com/Products/IoT/ESP32-P4/ESP32-P4-DevKit/open-source-hardware){:target="_blank"} | | esp32-c3 | ![esp32-c3](../firmware/installer/images/esp32-c3.jpg){: style="width:100px"} | | | [Ali*](https://s.click.aliexpress.com/e/_EIl7NKw){:target="_blank"} | | esp32-c3-supermini | ![esp32-c3-supermini](../firmware/installer/images/esp32-c3-supermini.jpg){: style="width:100px"} | | | [Ali*](https://s.click.aliexpress.com/e/_EIl7NKw){:target="_blank"} | | esp32-d0-moonbase | ![esp32-d0-moonbase](../firmware/installer/images/esp32-d0.jpg){: style="width:100px"} | | | | diff --git a/docs/moonlight/drivers.md b/docs/moonlight/drivers.md index 6eff0b4a..fc2bae47 100644 --- a/docs/moonlight/drivers.md +++ b/docs/moonlight/drivers.md @@ -8,7 +8,7 @@ The Drivers module defines layers and drivers. * Layout πŸš₯: A layout (πŸš₯) defines the positions of the lights to control. See [Layouts](../../moonlight/layouts) * Driver ☸️: A driver is a link between MoonLight to hardware or the network. Drivers can both input data or output data. Examples: - * LED drivers (FastLED, Parallel LED Drivers, hub75 panels) + * LED drivers (FastLED, Parallel LED Drivers) * Light driver (Art-Net / DMX) * Audio driver * Sensor drivers (microphone, gyro, MIDI controller) diff --git a/docs/moonlight/effects.md b/docs/moonlight/effects.md index cfe97bbc..c83df81a 100644 --- a/docs/moonlight/effects.md +++ b/docs/moonlight/effects.md @@ -42,17 +42,17 @@ These effects have first been created in MoonLight: | Name | Preview | Controls | Remarks | ---- | ----- | ---- | ---- | | Solid | ![](https://raw.githubusercontent.com/scottrbailey/WLED-Utils/master/gifs/FX_000.gif) | | Can be used as background to other effects when ordered before other effects | -| Lines | ![lines](../../media/moonlight/effects/lines.gif) | Speed | To test a layout, Red = x, Green = y, Blue = z | +| Lines | ![lines](../../media/moonlight/effects/lines.gif) | | To test a layout, Red = x, Green = y, Blue = z | | Frequency Saws β™« | ![FreqSaws](https://github.com/user-attachments/assets/9e0f1f22-eba9-470e-850e-bd0e2f7c787f) | | | | Moon Man | MoonMan | No controls | only on devices supporting M5 library, e.g. AtomS3R | | Particles 🧊 | ![Particles](https://github.com/user-attachments/assets/c2df7f6b-3b5a-4836-8e21-127de3eb3364) | Particles | Supports gyro, see [IMU driver](../../moonlight/drivers/#driver-nodes) | | Rainbow | ![Rainbow](https://github.com/user-attachments/assets/d74832fa-0e77-481c-9823-588042751f87) | Rainbow | | -| Random | ![Random](https://github.com/user-attachments/assets/b7874741-7a30-4ad1-9a8b-db0093da1297) | Speed | | +| Random | ![Random](https://github.com/user-attachments/assets/b7874741-7a30-4ad1-9a8b-db0093da1297) | | | | Ripples 🧊 | ![Ripples](https://github.com/user-attachments/assets/ad1d96d9-60fc-4301-8f17-239e45de8d38) | Ripples | | -| Rubiks Cube 🧊 | ![Rubik](https://github.com/user-attachments/assets/a9f9b0f7-d9e9-48a2-8b02-e602593e21f6) | Rubik | | +| Rubik's Cube 🧊 | ![Rubik](https://github.com/user-attachments/assets/a9f9b0f7-d9e9-48a2-8b02-e602593e21f6) | Rubik | | | Scrolling Text | ![ScrollingText](https://github.com/user-attachments/assets/9ebcc5eb-2b4a-4eff-993c-7836fc07dcea) | ScrollingText | Preset: Auto, IP (.ddd), FPS (ddds), Time (HHMM), Uptime (s/m/h), Status (AP/STA), Clients (dC), Connected (dCC), Active (dAC) | -| Sinus | ![Sinus](https://github.com/user-attachments/assets/ad42f5f1-3670-4238-a9e7-d9d1388760d4) | Speed | | -| Sphere Move 🧊 | ![SphereMove](https://github.com/user-attachments/assets/f02013a4-9aca-4831-9bae-79db8e421008) | Speed | | +| Sinus | ![Sinus](https://github.com/user-attachments/assets/ad42f5f1-3670-4238-a9e7-d9d1388760d4) | | | +| Sphere Move 🧊 | ![SphereMove](https://github.com/user-attachments/assets/f02013a4-9aca-4831-9bae-79db8e421008) | | | | StarField | ![StarField](https://github.com/user-attachments/assets/a5fcc733-0365-4109-bdcf-f353aa2cf3c0) | StarField | | | Praxis | ![Praxis](https://github.com/user-attachments/assets/f9271d1c-bcd1-4a79-bc1a-cac951758195) | Praxis| | | Wave | ![Wave](https://github.com/user-attachments/assets/a699f3a6-c981-4159-a96e-85d43c9a853c) | Wave | Type: Saw, Triangle, Sinus, Square, Sin3, Noise | diff --git a/docs/moonlight/lightscontrol.md b/docs/moonlight/lightscontrol.md index 4d2842b8..b2f05c37 100644 --- a/docs/moonlight/lightscontrol.md +++ b/docs/moonlight/lightscontrol.md @@ -1,23 +1,124 @@ -# Lights Control module - - - -Controls: - -* On: lights on or off -* Brightness: brightness of the LEDs when on -* RGB Sliders: control each color separately. -* Palette: Global palette setting used in Effects. See [WLED-MM palettes](https://mm.kno.wled.ge/features/palettes/) for the WLED-MM palettes used. -* Presets: Store the current effects and modifiers or retrieve earlier saved presets. 64 slots available: - * Blue: Empty preset - * Green: Saved preset - * Hover with the mouse to see effects and modifiers in the preset - * Double click on a saved preset to delete the preset. - * Red: Selected preset - * 🚨: Save (πŸ’Ύ) or cancel (↻) Save effects first, before storing them as a preset! - * Note: Presets only stores Effects and Modifiers, not Layers and Drivers. -* Preset loop: loop over presets (seconds per presets) -* Monitor On: sends LED output to the monitor. - -Light Controls is the interface to control lights for the UI, but also for all protocols eg. HA, DMX, Hardware buttons, displays etc -e.g. a DMX controller, can control presets, but not individual preset details. +# Lights Control + + + +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" > + Close diff --git a/interface/src/lib/components/moonbase/FieldRenderer.svelte b/interface/src/lib/components/moonbase/FieldRenderer.svelte index c1dfb06e..b58678f1 100644 --- a/interface/src/lib/components/moonbase/FieldRenderer.svelte +++ b/interface/src/lib/components/moonbase/FieldRenderer.svelte @@ -12,7 +12,9 @@ -{#if path[0] === '/'} - {}} closed={() => {}}> - {#snippet title()} - {newItem ? 'Add ' + (isFile ? 'file' : 'folder') : 'Edit ' + editableFile.name} - {/snippet} -
- -
- { - changed = true; - }} - > - -
- {#if isFile} +