Mitchell R
7c88d7f733
fix(displays): use kiosk-local indices
...
Kiosk heartbeat reports local display positions so the server can sync physical outputs without consuming global display indices.
Migrate displays.index away from global uniqueness because display numbering is only meaningful within a kiosk.
2026-05-13 03:57:12 +02:00
Mitchell R
1c0fe02fcf
feat: layout switch push + idle/sleep timer + offline bundle cache
...
Layout switch push:
- POST /admin/kiosks/:id/layout/:layoutId — coordinator sends
{type:"layout-switch", layout_id} via WS
- Kiosk renders specified layout from cached bundle
- KioskEditPage adds Switch Layout dropdown + button
Idle/sleep timer:
- thread_local LAST_ACTIVITY + IS_ASLEEP + CURRENT_LAYOUT_ID
- mark_activity() on render/switch/wake; wakes if asleep
- glib timeout_add_local every 1s checks elapsed:
- elapsed >= idle_timeout AND not on default + resets_idle_timer
→ switch to default layout
- elapsed >= sleep_timeout AND !asleep → cec::standby()
- Display idle/sleep timeouts from bundle.display
Offline cache:
- server::save_bundle → ~/.betterframe-kiosk/bundle.json
- server::load_cached_bundle on offline boot
- fetch_bundle no longer panics; returns Option
- 30s retry loop until server reachable
- Reload-bundle gracefully handles fetch failures
2026-05-13 01:00:11 +02:00
Mitchell R
51c58e7abf
feat: Pi fan control + temp monitoring + stream swap on layout change
...
Kiosk:
- hwmon.rs reads /sys/class/thermal + /sys/class/hwmon for CPU temp,
fan RPM, fan PWM
- Heartbeat reports cpu_temp_c, fan_rpm, fan_pwm
- WS message "fan" with {pwm: N} or {mode: "auto"} sets pwm1_enable+pwm1
- Picture content_fit Cover → Contain (no more cropping/overlay cuts)
- ensure_warm tears down + rebuilds pipeline when desired stream
changes (M↔S swap on layout change)
Server:
- Migration v0.8: add cpu_temp_c, fan_rpm, fan_pwm to kiosks
- Heartbeat persists hwmon fields
- KioskEditPage shows CPU/fan/PWM + Auto/Off/50%/Full buttons
- POST /admin/kiosks/:id/fan dispatches via coordinator WS
2026-05-11 11:47:07 +02:00
Mitchell R
96d7cc45ba
fix(deploy): require proxied local services
...
Bind native backend services and Node-RED to loopback so Angie remains the public auth boundary. Keep Docker on an internal compose network and stop kiosk fallback to a layout when display default is none.
2026-05-11 09:51:00 +02:00
Mitchell R
766bf8dee0
feat: WebKit for web/html cells + display auto-discovery via heartbeat
...
Rust kiosk:
- web cells now use webkit6 WebView (load_uri)
- html cells use WebView.load_html (full HTML rendering)
- query_displays() reads /sys/class/drm/ for connected HDMI/DP outputs
- Heartbeat reports display geometry every 60s
Server:
- /api/kiosk/heartbeat accepts displays array
- Syncs kiosk-reported displays to display records
- Updates dimensions when changed, creates new displays for new ports
2026-05-10 22:39:53 +02:00
Mitchell R
c4315917d8
fix: resolve all Rust compile errors in kiosk app
2026-05-10 20:04:43 +02:00
Mitchell R
371c023c81
feat: Rust kiosk app — GTK4 + GStreamer multi-camera display
...
- Server discovery (localhost → betterframe.local → cloud)
- Pairing flow with fullscreen code display
- Bundle fetch and layout rendering
- GTK4 Grid layout matching template regions
- GStreamer pipelines per camera cell via gtk4paintablesink
- Heartbeat loop in background thread
- Placeholder widgets for web/html cells
2026-05-10 04:18:40 +02:00