rename WLED to LED
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -7,7 +7,7 @@ This document describes all REST API endpoints and WebSocket messages required f
|
|||||||
- [REST API Endpoints](#rest-api-endpoints)
|
- [REST API Endpoints](#rest-api-endpoints)
|
||||||
- [WiFi](#wifi)
|
- [WiFi](#wifi)
|
||||||
- [Light Control](#light-control)
|
- [Light Control](#light-control)
|
||||||
- [WLED Configuration](#wled-configuration)
|
- [LED Configuration](#led-configuration)
|
||||||
- [Schema](#schema)
|
- [Schema](#schema)
|
||||||
- [Devices](#devices)
|
- [Devices](#devices)
|
||||||
- [Scenes](#scenes)
|
- [Scenes](#scenes)
|
||||||
@@ -202,11 +202,11 @@ Returns current light status (alternative to WebSocket).
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### WLED Configuration
|
### LED Configuration
|
||||||
|
|
||||||
#### Get WLED Configuration
|
#### Get LED Configuration
|
||||||
|
|
||||||
Returns the current WLED configuration including host and all segments.
|
Returns the current LED segment configuration.
|
||||||
|
|
||||||
- **URL:** `/api/wled/config`
|
- **URL:** `/api/wled/config`
|
||||||
- **Method:** `GET`
|
- **Method:** `GET`
|
||||||
@@ -214,7 +214,6 @@ Returns the current WLED configuration including host and all segments.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"host": "192.168.1.100",
|
|
||||||
"segments": [
|
"segments": [
|
||||||
{
|
{
|
||||||
"name": "Main Light",
|
"name": "Main Light",
|
||||||
@@ -232,7 +231,6 @@ Returns the current WLED configuration including host and all segments.
|
|||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|--------------------|--------|------------------------------------------|
|
|--------------------|--------|------------------------------------------|
|
||||||
| host | string | WLED host address (IP or hostname) |
|
|
||||||
| segments | array | List of LED segments |
|
| segments | array | List of LED segments |
|
||||||
| segments[].name | string | Optional segment name |
|
| segments[].name | string | Optional segment name |
|
||||||
| segments[].start | number | Start LED index (0-based) |
|
| segments[].start | number | Start LED index (0-based) |
|
||||||
@@ -240,9 +238,9 @@ Returns the current WLED configuration including host and all segments.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Save WLED Configuration
|
#### Save LED Configuration
|
||||||
|
|
||||||
Saves the WLED configuration.
|
Saves the LED segment configuration.
|
||||||
|
|
||||||
- **URL:** `/api/wled/config`
|
- **URL:** `/api/wled/config`
|
||||||
- **Method:** `POST`
|
- **Method:** `POST`
|
||||||
@@ -251,7 +249,6 @@ Saves the WLED configuration.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"host": "192.168.1.100",
|
|
||||||
"segments": [
|
"segments": [
|
||||||
{
|
{
|
||||||
"name": "Main Light",
|
"name": "Main Light",
|
||||||
@@ -269,7 +266,6 @@ Saves the WLED configuration.
|
|||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
|--------------------|--------|----------|------------------------------------------|
|
|--------------------|--------|----------|------------------------------------------|
|
||||||
| host | string | Yes | WLED host address (IP or hostname) |
|
|
||||||
| segments | array | Yes | List of LED segments (can be empty) |
|
| segments | array | Yes | List of LED segments (can be empty) |
|
||||||
| segments[].name | string | No | Optional segment name |
|
| segments[].name | string | No | Optional segment name |
|
||||||
| segments[].start | number | Yes | Start LED index (0-based) |
|
| segments[].start | number | Yes | Start LED index (0-based) |
|
||||||
@@ -278,10 +274,9 @@ Saves the WLED configuration.
|
|||||||
- **Response:** `200 OK` on success, `400 Bad Request` on validation error
|
- **Response:** `200 OK` on success, `400 Bad Request` on validation error
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
- The firmware uses this configuration to communicate with a WLED controller
|
- Segments define how the LED strip is divided into logical groups
|
||||||
- Segments are mapped to the WLED JSON API segment control
|
|
||||||
- Changes are persisted to NVS (non-volatile storage)
|
- Changes are persisted to NVS (non-volatile storage)
|
||||||
- The host can be an IP address (e.g., `192.168.1.100`) or hostname (e.g., `wled.local`)
|
- Each segment can be controlled independently in the light schema
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1200,7 +1200,7 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WLED Configuration */
|
/* LED Configuration */
|
||||||
.segment-header {
|
.segment-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -1305,7 +1305,7 @@ body {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive for WLED */
|
/* Responsive for LED */
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.segment-header {
|
.segment-header {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -188,10 +188,11 @@
|
|||||||
|
|
||||||
<!-- Schema Sub-Tab (Lichtsteuerung) -->
|
<!-- Schema Sub-Tab (Lichtsteuerung) -->
|
||||||
<div id="subtab-schema" class="sub-tab-content">
|
<div id="subtab-schema" class="sub-tab-content">
|
||||||
<!-- WLED Konfiguration -->
|
<!-- LED Konfiguration -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 data-i18n="wled.config.title">WLED Konfiguration</h2>
|
<h2 data-i18n="wled.config.title">LED Konfiguration</h2>
|
||||||
<p class="card-description" data-i18n="wled.config.desc">Konfiguriere die WLED-Segmente und LEDs pro
|
<p class="card-description" data-i18n="wled.config.desc">Konfiguriere die LED-Segmente und Anzahl
|
||||||
|
LEDs pro
|
||||||
Segment</p>
|
Segment</p>
|
||||||
|
|
||||||
<div class="segment-header">
|
<div class="segment-header">
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ const translations = {
|
|||||||
'subtab.devices': '🔗 Geräte',
|
'subtab.devices': '🔗 Geräte',
|
||||||
'subtab.scenes': '🎬 Szenen',
|
'subtab.scenes': '🎬 Szenen',
|
||||||
|
|
||||||
// WLED Configuration
|
// LED Configuration
|
||||||
'wled.config.title': 'WLED Konfiguration',
|
'wled.config.title': 'LED Konfiguration',
|
||||||
'wled.config.desc': 'Konfiguriere die WLED-Segmente und LEDs pro Segment',
|
'wled.config.desc': 'Konfiguriere die LED-Segmente und Anzahl LEDs pro Segment',
|
||||||
'wled.host': 'WLED Host',
|
|
||||||
'wled.host.placeholder': 'z.B. 192.168.1.100 oder wled.local',
|
|
||||||
'wled.segments.title': 'Segmente',
|
'wled.segments.title': 'Segmente',
|
||||||
'wled.segments.empty': 'Keine Segmente konfiguriert',
|
'wled.segments.empty': 'Keine Segmente konfiguriert',
|
||||||
'wled.segments.empty.hint': 'Klicke auf "Segment hinzufügen" um ein Segment zu erstellen',
|
'wled.segments.empty.hint': 'Klicke auf "Segment hinzufügen" um ein Segment zu erstellen',
|
||||||
@@ -29,10 +27,9 @@ const translations = {
|
|||||||
'wled.segment.leds': 'Anzahl LEDs',
|
'wled.segment.leds': 'Anzahl LEDs',
|
||||||
'wled.segment.start': 'Start-LED',
|
'wled.segment.start': 'Start-LED',
|
||||||
'wled.segment.remove': 'Entfernen',
|
'wled.segment.remove': 'Entfernen',
|
||||||
'wled.saved': 'WLED-Konfiguration gespeichert!',
|
'wled.saved': 'LED-Konfiguration gespeichert!',
|
||||||
'wled.error.host': 'Bitte WLED Host eingeben',
|
'wled.error.save': 'Fehler beim Speichern der LED-Konfiguration',
|
||||||
'wled.error.save': 'Fehler beim Speichern der WLED-Konfiguration',
|
'wled.loaded': 'LED-Konfiguration geladen',
|
||||||
'wled.loaded': 'WLED-Konfiguration geladen',
|
|
||||||
|
|
||||||
// Light Control
|
// Light Control
|
||||||
'control.light.title': 'Lichtsteuerung',
|
'control.light.title': 'Lichtsteuerung',
|
||||||
@@ -190,11 +187,9 @@ const translations = {
|
|||||||
'subtab.devices': '🔗 Devices',
|
'subtab.devices': '🔗 Devices',
|
||||||
'subtab.scenes': '🎬 Scenes',
|
'subtab.scenes': '🎬 Scenes',
|
||||||
|
|
||||||
// WLED Configuration
|
// LED Configuration
|
||||||
'wled.config.title': 'WLED Configuration',
|
'wled.config.title': 'LED Configuration',
|
||||||
'wled.config.desc': 'Configure WLED segments and LEDs per segment',
|
'wled.config.desc': 'Configure LED segments and number of LEDs per segment',
|
||||||
'wled.host': 'WLED Host',
|
|
||||||
'wled.host.placeholder': 'e.g. 192.168.1.100 or wled.local',
|
|
||||||
'wled.segments.title': 'Segments',
|
'wled.segments.title': 'Segments',
|
||||||
'wled.segments.empty': 'No segments configured',
|
'wled.segments.empty': 'No segments configured',
|
||||||
'wled.segments.empty.hint': 'Click "Add Segment" to create a segment',
|
'wled.segments.empty.hint': 'Click "Add Segment" to create a segment',
|
||||||
@@ -203,10 +198,9 @@ const translations = {
|
|||||||
'wled.segment.leds': 'Number of LEDs',
|
'wled.segment.leds': 'Number of LEDs',
|
||||||
'wled.segment.start': 'Start LED',
|
'wled.segment.start': 'Start LED',
|
||||||
'wled.segment.remove': 'Remove',
|
'wled.segment.remove': 'Remove',
|
||||||
'wled.saved': 'WLED configuration saved!',
|
'wled.saved': 'LED configuration saved!',
|
||||||
'wled.error.host': 'Please enter WLED host',
|
'wled.error.save': 'Error saving LED configuration',
|
||||||
'wled.error.save': 'Error saving WLED configuration',
|
'wled.loaded': 'LED configuration loaded',
|
||||||
'wled.loaded': 'WLED configuration loaded',
|
|
||||||
|
|
||||||
// Light Control
|
// Light Control
|
||||||
'control.light.title': 'Light Control',
|
'control.light.title': 'Light Control',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// WLED Configuration Module
|
// LED Configuration Module
|
||||||
// Manages WLED segments and LED configuration
|
// Manages LED segments and configuration
|
||||||
|
|
||||||
let wledConfig = {
|
let wledConfig = {
|
||||||
segments: []
|
segments: []
|
||||||
@@ -24,7 +24,7 @@ async function loadWledConfig() {
|
|||||||
showStatus('wled-status', t('wled.loaded'), 'success');
|
showStatus('wled-status', t('wled.loaded'), 'success');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Using default WLED config');
|
console.log('Using default LED config');
|
||||||
wledConfig = { segments: [] };
|
wledConfig = { segments: [] };
|
||||||
renderWledSegments();
|
renderWledSegments();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user