OLED notifications on the SoundTouch 20 + UI translations#1
Merged
Conversation
When a chime fires, the ST20's front-panel OLED now also shows a notification alongside the sound: a bell with "Someone is at <device>" for a doorbell press, a motion icon with "Motion at <device>" for motion — honoring the existing per-device Motion/Doorbell toggles. The panel contents are snapshotted before drawing and restored 8 seconds later. A new toggle in the settings (default on, only shown on the ST20) disables it; other SoundTouch models are detected by probing the 128x100 framebuffer and never touch /dev/fb0. The settings manifest and the on-display texts are translated (en/de/nl/fr/es/af), following ReTouch's UI language via the --host-url settings endpoint. internal/oled is a small self-contained drawing package (canvas, 5x7 font with accent folding, sprites, framebuffer backup/restore); it can move to a shared ReTouch module once one is published.
The panel is owned by ReTouch (internal/display) now: the plugin probes GET /api/display for ST20 availability and posts the bell/motion notification to /api/display/notify; ReTouch renders its built-in icons, arbitrates with other plugins and restores the panel after 8s. The self-contained internal/oled copy and all framebuffer code are gone. Standalone agent runs (no plugin layer) simply have no display notifications (ring.NotifyFunc is nil). Requires a ReTouch with the display API; on older hosts the probe fails closed and the plugin behaves exactly as before (sound only).
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.
When a chime fires, the SoundTouch 20's front-panel OLED also shows a notification alongside the sound:
Behaviour:
--host-url/api/settingsendpoint (cached 60 s).--host-urlwas already passed by the host and previously ignored.The plugin never touches
/dev/fb0. The panel is owned by ReTouch's display manager: the plugin probesGET /api/displayfor ST20 availability and posts{icon, text, seconds}toPOST /api/display/notify; ReTouch renders its built-in bell/motion icons, arbitrates with other plugins (e.g. a standby screen), and restores the previous panel contents afterwards. This depends on a ReTouch that ships the display API (internal/display+/api/display/*); on older hosts the probe fails closed and the plugin behaves exactly as before (sound only) — other SoundTouch models can't crash for the same reason.Tests:
go test ./...passes.🤖 Generated with Claude Code