Controller: move hotspot settings to controller.yaml with WiFi device dropdown.

Hotspot was reported as "not supported" on x86 machines (Ubuntu/Debian PCs)
because the Controller only watched the hardcoded default wlan0 device, while
predictable interface naming produces names like wlp2s0. The Settings page
saved hotspot_device to wrolpi.yaml, which the Controller never read.

The Controller now owns hotspot settings in controller.yaml:

* New endpoints: GET/POST /api/hotspot/settings, GET /api/hotspot/devices
  (WiFi interfaces discovered via nmcli).
* Legacy hotspot_* values in wrolpi.yaml are migrated into controller.yaml
  once on startup, unless controller.yaml already sets them.
* The Hotspot SSID/password/device fields moved from the Settings page to the
  Control page next to the Hotspot toggle; the device is now a dropdown of
  the WiFi devices found on the machine.
* The Controller fallback UI gets the same hotspot settings form for parity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-07-04 08:22:24 -06:00 • committed by lrnselfreliance
parent ebbc60992c
commit 0d2c13e4e7
12 changed files with 586 additions and 89 deletions

View file

@ -75,6 +75,18 @@ export async function getHotspotStatus() {
return controllerFetch('/hotspot/status');
}
export async function getHotspotDevices() {
return controllerFetch('/hotspot/devices');
}
export async function getHotspotSettings() {
return controllerFetch('/hotspot/settings');
}
export async function updateHotspotSettings(settings) {
return controllerFetch('/hotspot/settings', {method: 'POST', body: JSON.stringify(settings)});
}
export async function enableHotspot() {
return controllerFetch('/hotspot/enable', {method: 'POST'});
}