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
+15
@@ -4,6 +4,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_http_server.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @brief Start the HTTP server on port 80 (UI and JSON API). */
|
||||
esp_err_t web_start(void);
|
||||
|
||||
/**
|
||||
* @brief Add Access-Control-Allow-Origin for a LAN or localhost page that asked (the Origin header).
|
||||
* Call before the response is sent. Other origins get no header, so the browser blocks them.
|
||||
*/
|
||||
void web_allow_lan_origin(httpd_req_t *req);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user