Add Kiosk Control: live web UI for managing fullpageos.txt and rotation speed - #716
Add Kiosk Control: live web UI for managing fullpageos.txt and rotation speed#716willryker wants to merge 4 commits into
Conversation
A small stdlib-only Python web UI (tools/kiosk-control) that lets you add, remove, reorder FullPageOS's kiosk pages and change the rotation interval live, without a reboot for routine changes. Pushes changes to Chromium's remote-debugging (CDP) port and rewrites fullpageos.txt so the change also survives a future reboot. See tools/kiosk-control/README.md for install steps.
Adds screen_power.sh (X11 DPMS-based sleep/wake) and wires it into Kiosk Control's web UI with a new "Screen" card (Sleep now / Wake now buttons) backed by a new /api/screen endpoint. Lets the display be turned off overnight and manually overridden without SSH. Documented in README under "Screen sleep/wake (optional)".
Adds a Sleep at / Wake at schedule editor to the Screen card, backed by a new /api/schedule endpoint and apply_schedule_to_cron() in app.py. Saving rewrites the pi user's crontab, replacing only the screen_power.sh lines it manages while leaving every other crontab entry untouched; the chosen times persist in a new schedule.json and repopulate the fields on page load. Sleep now / Wake now remain a manual override on top of whatever schedule is set. README updated to document the new fields.
|
Does this replace FullPageOSDashboard or works with it? |
|
It works with FullPageDashboard, doesn't replace it. The tab rotation stuff is untouched. Kiosk Control edits the same fullpageos.txt and rotation interval through a small web UI and pushes the change live over Chromium's debug port, instead of SSH + manual edit + reboot every time. You're right that's not the original design. My use case: kiosk's been running a while and I want to tweak the page list / rotation speed occasionally without re-flashing the SD card each time. This is meant to be optional, not a replacement for flash-time config. |
What this adds
tools/kiosk-control/— a small, stdlib-only Python web UI that lets you add, remove, reorder FullPageOS's kiosk pages and change the rotation interval live, without a reboot for routine changes.Today, editing
/boot/firmware/fullpageos.txtand its rotation interval both require an SSH session and a reboot to take effect. This adds a local web page (default port 7077, reachable from a phone or laptop on the same network) where you can manage both, with changes pushed to the running Chromium session immediately (via its remote-debugging/CDP port) and written back tofullpageos.txtso they also survive the next reboot.Files
app.pyis the web server itself (stdlib only, no pip install needed).kiosk-control.serviceis the systemd unit that runs it.start_chromium_browseris patched to add--remote-debugging-port=9222(the only change from stock; every other flag is untouched).rotate_tabs.shis patched to re-read the rotation interval from a file each loop instead of a hardcoded sleep.README.mdcovers install steps, including a real gotcha found while testing on a Bookworm-based nightly:/boot/firmwarethere is FAT32/vfat, sochowncan't set per-file ownership (fails with "Operation not permitted" even as root) — the README covers the fstab-based fix instead.Testing
Built and deployed against a Raspberry Pi 5 running the FullPageOS 0.14.0 Bookworm nightly. Verified end-to-end: added/removed/reordered pages and changed rotation speed via the web UI, confirmed changes applied live with no reboot, and confirmed
fullpageos.txtstayed in sync for a subsequent reboot.Happy to adjust structure/naming/scope if you'd like this organized differently.