Add Kiosk Control: live web UI for managing fullpageos.txt and rotation speed - #716
Open
willryker wants to merge 4 commits into
Open
Add Kiosk Control: live web UI for managing fullpageos.txt and rotation speed#716willryker wants to merge 4 commits into
willryker 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.
Owner
|
Does this replace FullPageOSDashboard or works with it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.