- Command intake (reboot/shutdown) on infoscreen/{uuid}/commands with ack lifecycle
- MQTT_USER/MQTT_PASSWORD_BROKER split from identity vars; configure_mqtt_security() updated
- infoscreen-simclient.service: Type=notify, WatchdogSec=60, Restart=on-failure
- infoscreen-notify-failure@.service + script: retained MQTT alert when systemd gives up (Gap 3)
- _sd_notify() watchdog keepalive in simclient main loop (Gap 1)
- broker_connection block in health payload: reconnect_count, last_disconnect_at (Gap 2)
- COMMAND_MOCK_REBOOT_IMMEDIATE_COMPLETE canary flag with safety guard
- SERVER_TEAM_ACTIONS.md: server-side integration action items
- Docs: README, CHANGELOG, src/README, copilot-instructions updated
- 43 tests passing
4.8 KiB
4.8 KiB
Changelog
April 2026
Remote Command Intake
- Added MQTT command intake on
infoscreen/{client_id}/commands(supportsrebootandshutdown). - Added command acknowledgement publishing to
infoscreen/{client_id}/commands/ackandinfoscreen/{client_id}/command/ackwith statesaccepted,rejected,execution_started,completed,failed. - Added
COMMAND_HELPER_PATHenvironment variable; command execution delegated to an external shell helper sosimclient.pyrequires no elevated privileges. - Added deduplication of commands by
command_idwith configurable TTL (COMMAND_DEDUPE_TTL_HOURS) and max-entries cap (COMMAND_DEDUPE_MAX_ENTRIES). - Added execution timeout (
COMMAND_EXEC_TIMEOUT_SEC). - Added
COMMAND_MOCK_REBOOT_IMMEDIATE_COMPLETEflag for canary and test environments — immediately completes a mock reboot without waiting for process restart. Safety-guarded: only activates when the helper basename ismock-command-helper.sh.
MQTT Broker Authentication Split
- Split broker connection credentials (
MQTT_USER,MQTT_PASSWORD_BROKER) from legacy per-device identity fields (MQTT_USERNAME,MQTT_PASSWORD). configure_mqtt_security()now prefersMQTT_USER/MQTT_PASSWORD_BROKERfor broker login, with fallback to legacy vars if broker-specific vars are absent.
Systemd Service Units
- Added
scripts/infoscreen-simclient.service— systemd unit forsimclient.pywithType=notify,WatchdogSec=60,Restart=on-failure,StartLimitBurst=5. - Added
scripts/start-simclient.sh— launcher script mirroringstart-display-manager.sh. - Updated
scripts/infoscreen-display.servicewithOnFailure=infoscreen-notify-failure@%n.service. - Updated
src/pi-setup.shto install and enable both units plus the failure notifier template.
Process Watchdog (Gap 1 — Hung Process Detection)
- Added zero-dependency
_sd_notify()raw socket helper insimclient.py(nosystemd-pythonpackage required). - Sends
READY=1on main loop entry andWATCHDOG=1on every 5-second iteration. - Service unit uses
Type=notifyandWatchdogSec=60; systemd will restart the process if it stops sending keepalives for 60 seconds.
OnFailure MQTT Notifier (Gap 3 — systemd Give-Up Detection)
- Added
scripts/infoscreen-notify-failure@.service— systemd template unit triggered byOnFailure=. - Added
scripts/infoscreen-notify-failure.sh— publishes a retained JSON payload toinfoscreen/{uuid}/service_failedviamosquitto_pubso the monitoring dashboard gets an alert even when the process is fully dead. - Payload:
{"event":"service_failed","unit":"<unit-name>","client_uuid":"...","failed_at":"<ISO-UTC>"}.
Health Payload Broker Connection Block (Gap 2 — Broker vs. Process Ambiguity)
- Added
broker_connectionblock to the health payload:broker_reachable,reconnect_count,connect_count,last_disconnect_at. simclient.pynow tracksreconnect_countandconnect_counton everyon_connectcallback andlast_disconnecttimestamp onon_disconnect.publish_health_message()accepts an optionalconnection_stateparameter; both heartbeat-success call sites pass the enriched state.
TV Power Coordination
- Added Phase 1 TV power coordination on
infoscreen/groups/{group_id}/power/intent. - Added
POWER_CONTROL_MODEwithlocal,hybrid, andmqttbehavior. - Added
src/power_intent_state.jsonandsrc/power_state.jsonfor power IPC and telemetry. - Added
infoscreen/{client_id}/power/statepublishing fromsimclient.py. - Added turn-off guard logic to avoid unintended TV-off races at event boundaries.
- Added TV_POWER_RUNBOOK.md and test tooling in
scripts/test-power-intent.sh.
March 2026
- Hardened event-trigger screenshots (
event_start,event_stop) against periodic overwrite races. - Improved
latest.jpgandmeta.jsonsynchronization for reliable dashboard updates. - Added self-healing for stale or invalid pending screenshot trigger metadata.
- Improved display environment fallbacks (
DISPLAY=:0,XAUTHORITY) for non-interactive starts. - Allowed periodic idle captures in development mode so dashboard previews stay fresh without active events.
- Added content-type-aware trigger delays for event screenshots.
- Changed screenshot transmission to a 1-second polling tick so triggered sends fire within <=1s.
- Migrated dashboard payload to grouped schema v2 (
message,content,runtime,metadata).
November 2025
- Implemented the two-process screenshot pipeline (
display_manager.pycapture,simclient.pytransmission). - Added Wayland/X11 screenshot tool fallback chains.
- Extended dashboard payloads with screenshot and system metadata.
- Extended scheduler event type support for
presentation,webuntis,webpage, andwebsite. - Added website autoscroll support via CDP injection and extension fallback.