HDMI-CEC: auto-disable in dev mode + docs/tests synced

README: document dev-mode CEC auto-disable; add testing notes; set CEC_POWER_OFF_WAIT=5
Copilot instructions: add dev-mode CEC behavior and test script guidance
test-hdmi-cec.sh: respect ENV=development (skip option 5), explicit .env load, ASCII output, 30s wait
display_manager: remove emoji from logs to avoid Unicode errors
This commit is contained in:
RobbStarkAustria
2025-11-12 17:09:11 +01:00
parent 947552fad1
commit 6617c3d7b9
11 changed files with 2590 additions and 5 deletions

View File

@@ -108,6 +108,9 @@ This is an **Infoscreen Client** system for Raspberry Pi that creates digital si
- **Development**: `ENV=development`, verbose logging, frequent heartbeats
- **Production**: `ENV=production`, minimal logging, longer intervals
HDMI-CEC behavior:
- In development mode (`ENV=development`) the Display Manager automatically disables HDMI-CEC to avoid constantly switching the TV during local testing. The test helper `scripts/test-hdmi-cec.sh` also respects this: option 5 (Display Manager CEC integration) detects dev mode and skips running CEC commands. Manual options (14) still work for direct `cec-client` checks.
### Key Environment Variables
```bash
# Environment
@@ -363,6 +366,9 @@ When working on this codebase:
- Test individual components with specific test scripts
- Always check logs in `logs/` directory for debugging
CEC testing notes:
- In development mode, the CEC integration path is skipped on purpose. To test end-to-end, either set `ENV=production` temporarily or use the manual options (14) in `scripts/test-hdmi-cec.sh`.
### Code Changes
- Display logic is in `src/display_manager.py`, not `simclient.py`
- MQTT client (`simclient.py`) writes events to `current_event.json`
@@ -388,6 +394,9 @@ Summary of additions since the last Copilot instructions update:
- New helper scripts for debugging DevTools handshake: `scripts/test_cdp.py` and `scripts/test_cdp_origins.py`.
- Updated `requirements.txt` to include `websocket-client`.
Runtime behavior adjustments:
- HDMI-CEC is automatically disabled in development mode; both the Display Manager and the CEC integration test (option 5) honor this to protect developer setups from constant TV power cycling.
Notes for Copilot:
- When adding or modifying display logic, prefer Impressive for PDF presentations and avoid xdotool approaches for slideshow control.
- For web events, ensure autoscroll is only activated for `event_type: "website"` and keep the CDP injection optional/fallback-only when feasible.