- 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
85 lines
4.4 KiB
Plaintext
85 lines
4.4 KiB
Plaintext
# Screenshot capture behavior
|
|
# Set to 1 to force captures even when no display is active (useful for testing)
|
|
# In production, prefer 0 so captures only occur when a presentation/video/webpage is running
|
|
SCREENSHOT_ALWAYS=0
|
|
# Infoscreen Client Configuration Template
|
|
# Copy this file to .env and adjust values for your setup
|
|
|
|
# Environment (set for small prod-like test)
|
|
# IMPORTANT: CEC TV control is automatically DISABLED when ENV=development
|
|
# to avoid constantly switching the TV on/off during testing.
|
|
# Set to 'production' to enable automatic CEC TV control.
|
|
ENV=development # development | production
|
|
DEBUG_MODE=0 # 1 to enable debug mode
|
|
LOG_LEVEL=INFO # DEBUG | INFO | WARNING | ERROR
|
|
|
|
# MQTT Broker Configuration
|
|
MQTT_BROKER=<your-mqtt-broker-host-or-ip> # Change to your MQTT server IP
|
|
MQTT_PORT=1883
|
|
# Broker login used by simclient to connect to MQTT
|
|
MQTT_USER=<broker-username>
|
|
MQTT_PASSWORD_BROKER=<broker-password>
|
|
# Optional per-device identity credentials (legacy fallback)
|
|
MQTT_USERNAME=infoscreen-client-<client-uuid-prefix>
|
|
MQTT_PASSWORD=<set-per-device-20-char-random-password>
|
|
MQTT_TLS_ENABLED=0 # 1 when broker TLS is enabled for this client
|
|
# MQTT_TLS_CA_CERT=/etc/infoscreen/mqtt/ca.crt
|
|
# MQTT_TLS_CERT=/etc/infoscreen/mqtt/client.crt
|
|
# MQTT_TLS_KEY=/etc/infoscreen/mqtt/client.key
|
|
# MQTT_TLS_INSECURE=0 # only for controlled test environments
|
|
|
|
# Timing Configuration (quieter intervals for productive test)
|
|
HEARTBEAT_INTERVAL=60 # Heartbeat frequency in seconds
|
|
SCREENSHOT_INTERVAL=180 # Screenshot transmission (simclient)
|
|
SCREENSHOT_CAPTURE_INTERVAL=180 # Screenshot capture (display_manager)
|
|
DISPLAY_CHECK_INTERVAL=15 # Display Manager event check frequency in seconds
|
|
|
|
# File/API Server (used to download presentation files)
|
|
# By default, the client rewrites incoming file URLs that point to 'server' to this host.
|
|
# If not set, FILE_SERVER_HOST defaults to the same host as MQTT_BROKER.
|
|
# You can also set FILE_SERVER_BASE_URL (e.g., http://192.168.1.10:8000) to override entirely.
|
|
FILE_SERVER_HOST= # optional: e.g., 192.168.43.100
|
|
FILE_SERVER_PORT=8000 # default port for API server
|
|
FILE_SERVER_SCHEME=http # http or https
|
|
# FILE_SERVER_BASE_URL= # optional: takes precedence over the above when set
|
|
|
|
# HDMI-CEC TV Control (optional)
|
|
# Automatically turn TV on/off based on event scheduling
|
|
# NOTE: CEC is automatically DISABLED when ENV=development to avoid constantly switching TV on/off during testing
|
|
CEC_ENABLED=true # Enable automatic TV power control in production (true/false)
|
|
CEC_DEVICE=0 # Target CEC device (TV, 0, etc.)
|
|
CEC_TURN_OFF_DELAY=30 # Seconds to wait before turning off TV after last event ends
|
|
CEC_POWER_ON_WAIT=5 # Seconds to wait after power ON command (for TV to boot up)
|
|
CEC_POWER_OFF_WAIT=5 # Seconds to wait after power OFF command (increased for slower TVs)
|
|
|
|
# TV Power Intent (MQTT-based coordinated power control, Phase 1)
|
|
# Controls how the display manager decides whether to use local CEC or server-issued intent.
|
|
# local — ignore MQTT intents; all power decisions are local (safe default for rollout)
|
|
# hybrid — prefer MQTT intent when present and valid; fall back to local CEC if not
|
|
# mqtt — MQTT intent is authoritative; local CEC only fires as last-resort guard
|
|
# See README.md "TV Power Intent — Rollout Runbook" before changing from 'local'.
|
|
POWER_CONTROL_MODE=hybrid # local | hybrid | mqtt
|
|
|
|
# Reboot/Shutdown command handling
|
|
# Helper installed by ./scripts/install-command-helper.sh
|
|
COMMAND_HELPER_PATH=/usr/local/bin/infoscreen-cmd-helper.sh
|
|
# Mock mode (safe canary): uncomment next line and comment the live path above
|
|
# COMMAND_HELPER_PATH=/home/olafn/infoscreen-dev/scripts/mock-command-helper.sh
|
|
# Timeout for helper execution (seconds)
|
|
COMMAND_EXEC_TIMEOUT_SEC=15
|
|
# Test mode: for reboot_host with mock helper, send completed without restart (0/1)
|
|
COMMAND_MOCK_REBOOT_IMMEDIATE_COMPLETE=0
|
|
# Command deduplication retention window (hours)
|
|
COMMAND_DEDUPE_TTL_HOURS=24
|
|
# Maximum processed command IDs kept in dedupe cache
|
|
COMMAND_DEDUPE_MAX_ENTRIES=5000
|
|
|
|
# MQTT authentication
|
|
# Use a per-client service account. Keep this file mode 600 on the device.
|
|
|
|
# Optional TLS settings (if using secure MQTT)
|
|
|
|
# Notes:
|
|
# - Keep actual secrets and host-specific values in a local .env file that is NOT committed.
|
|
# - This template is safe to check into version control.
|