Commit Graph
26 Commits
Author SHA1 Message Date
GrigoandClaude Opus 5.5 66578a0925 displaywatch: panel takeover at boot, daily re-init, cold/warm boot log
Investigation on a returned unit (docs/display-blank-investigation.md):
the dark-panel/backlight-on failure reproduces with a warm reboot or a
200 ms pulse on the panel reset line, with no kernel message. After the
U-Boot logo hand-off the panel powers/avee GPIOs stay undriven inputs.

- Fresh boot: DPMS off/on before the UI starts (unit Before=buttontask),
  so the driver runs the full panel power-on and drives those lines.
- Daily preventive re-init (01:30 UTC, or every 24 h of uptime without
  NTP); not counted towards reboot escalation.
- Previous boot found by saved boot_id, not 'journalctl -b -1' (clock
  jumps reorder boots); log cold/warm boot from the rk809 RTC (reset to
  2017-08-04 on power loss); keep the RTC set from NTP; uptime in every
  incident line; loop timers on the monotonic clock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 00:50:37 +00:00
GrigoandClaude Opus 5.5 1dc88fabf5 Fix UI freeze every 5 s
The settings main page exists from startup inside the closed dialog and
its IP timer always ran: networkInfo() spawns nmcli twice synchronously on
the GUI thread (~200 ms), stalling every animation. Poll only while the
page is visible. Also write the qt.alive heartbeat without QSaveFile's
fsync (bt-update only checks its mtime).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:58:16 +00:00
GrigoandClaude Opus 5.5 f07e153f09 Boot splash and periodic announcement banner
Splash: resources/splash/splash.gif built into the binary, played once by
SplashOverlay over a black cover present from the first frame (no UI
flash), then fades into the UI; hides icons loading. GIF, so no
QtMultimedia/gstreamer. Toggle: splash.enabled.

Banner (InfoBanner): metro-style band that fades/slides in with a hold
pictogram; text that does not fit runs as a seamless ticker for two
rounds. Never takes touches; hidden during splash and settings. Config
section banner (enabled, text, intervalSec, showSec, position,
accentColor), editable in the web UI and on-device settings; shown once
after saving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:58:16 +00:00
GrigoandClaude Opus 5.5 ec84133417 rest api: accept Basic Auth with the panel password for writes
Any login, password = web/settings password (or master password). 401
carries WWW-Authenticate so browsers/Postman prompt. X-Api-Key still
works for existing integrations. Docs warn that over plain HTTP the
password travels in every request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:58:05 +00:00
GrigoandClaude Opus 5.5 392095d549 collector: RSSI of connected sensors via kernel mgmt API
BlueZ fills Device1.RSSI only while scanning; sensors connect to us, so
the field stayed empty. MGMT_OP_GET_CONN_INFO (like btmgmt conn-info)
returns the link RSSI; polled per connected sensor and after each write.
Needs CAP_NET_ADMIN (AmbientCapabilities in the collector unit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:58:05 +00:00
GrigoandClaude Opus 5.5 56d635f051 docs: what OTA changes in the system (docs/ota.md)
bt-update runs as root and installs helpers, sudoers, systemd units and
config; none of it is rolled back. Documents the order of stage steps, the
'old bt-update runs the OTA' pitfall and how to add a system change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:58:05 +00:00
GrigoandClaude Opus 5.5 d71fa812da Display/GUI watchdog for the "backlight on, no picture" failure
On PoE sites the MIPI-DSI panel can lose its init on a supply dip while the
RK3566 keeps running; the UI may also hang or exit. Three layers:

- hardware watchdog: systemd RuntimeWatchdogSec=20s (system.conf.d)
- GUI: SdWatchdog pings systemd per swapped frame (WATCHDOG_USEC=30s, enabled
  by the binary so older versions run under the same unit) and writes
  run/qt.frame; buttontask.service gets Restart=always, NotifyAccess=main,
  TimeoutAbortSec=10s
- bt-displaywatch (root, buttontask-displaywatch.service): kernel DRM/DSI
  timeouts, eth link down->up (PoE dip hint), stale UI frames, restart storms
  -> panel re-init (stop UI, fb0 blank 4->0, start UI), repeated -> reboot
  (max 3/day, never during OTA); incident log in /var/log/buttontask/

Manual recovery: hold one finger 10 s in the bottom-left corner (panels are
single-touch). Delivered by OTA via bt-update sync_system; the web service
runs `bt-update sync-system` at start for devices updated by an older
bt-update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:10:10 +00:00
GrigoandClaude Opus 5.5 115879ab67 collector: survive bluetoothd hangs and restarts
- every BlueZ call runs off the asyncio thread with a timeout; if bluetoothd
  stays unresponsive for 30 s the collector restarts bluetooth.service and
  exits for a clean re-registration
- Type=notify + WatchdogSec for buttontask-collector, never give up restarting
- bluetooth.service drop-in: Restart=always (BlueZ 5.55 crashes on assert/SEGV),
  installed by device-install.sh and OTA (bt-update)
- bt-service: bluez-restart action for the collector

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:10:02 +00:00
Grigo 588c2e0135 added restapi 2026-11-02 16:46:20 +03:00
Grigo 9d74d06ce3 as 2026-11-02 01:23:50 +03:00
Grigo f74d52d39d ble version 2026-10-16 07:19:06 +03:00
Grigo 32abb8bf0a a 2026-08-24 16:40:48 +03:00
Grigo f7e99516bf fixed mass deploy 2026-07-29 14:20:27 +03:00
Grigo f16a365b4d fixed new target 2026-07-28 21:29:02 +03:00
Grigo e7996a15ed added ssh deploy 2026-07-28 15:33:07 +03:00
Grigo 6644fd07c1 added colorpicker 2026-07-21 14:34:39 +03:00
Grigo 5392273794 added backlight and fixed outbound 2026-07-21 09:17:48 +03:00
Grigo ff2b8a250e minor fixess 2026-07-13 06:04:04 +03:00
Grigo e9e2cbbfec fixed default network 2026-06-29 15:06:48 +03:00
Grigo 980608a279 fixed default network 2026-06-29 10:34:02 +03:00
Grigo cdb731d837 fixes button 2026-06-26 14:45:42 +03:00
Grigo 84a007f9d0 added presets 2026-06-25 15:28:46 +03:00
Grigo db5f174ef3 fix OTA 2026-06-18 09:37:29 +03:00
Grigo 21fb4704a6 Added delay button 2026-06-18 04:07:53 +03:00
Grigo 70513c1136 fix readme 2026-06-17 14:36:32 +03:00
Grigo da3d9ef7b5 init 2026-06-17 04:55:15 +03:00