feat: control several drivers from one web UI
- Device dropdown: All devices, this device by name, then drivers found by mDNS (tagged app=led-strip) and any added by hand. - POST /api/relay: a driver calls another driver's API for the page, so the browser only talks to its own board. Limited to /api/*, /ota and /reboot. - All devices sends brightness and preset plays to every device. - Settings: sync this device's presets, order and startup to the others. - CORS for LAN and localhost origins, and an OPTIONS handler for /ota. - Header labels are removed; the controls keep aria-labels. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b623bb156
commit
d32f3d69cf
8 files changed
+525
-11
No files matched your search
+3
-1
@@ -174,7 +174,9 @@ esp_err_t net_start(void)
|
||||
ESP_ERROR_CHECK(mdns_init());
|
||||
ESP_ERROR_CHECK(mdns_hostname_set(n.hostname));
|
||||
ESP_ERROR_CHECK(mdns_instance_name_set("LED controller"));
|
||||
ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0));
|
||||
// app=led-strip lets other drivers' discovery (GET /api/devices) pick out LED drivers from other HTTP devices
|
||||
static mdns_txt_item_t txt[] = { { "app", "led-strip" } };
|
||||
ESP_ERROR_CHECK(mdns_service_add(NULL, "_http", "_tcp", 80, txt, 1));
|
||||
ESP_LOGI(TAG, "mDNS: %s.local", n.hostname);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user