Files
infoscreen-dev/QUICK_REFERENCE.md
RobbStarkAustria 6617c3d7b9 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
2025-11-12 17:09:11 +01:00

222 lines
4.4 KiB
Markdown

# 🚀 Infoscreen Client - Quick Reference
## One-Line Summary
**PPTX → PDF (LibreOffice) → Impressive (auto-advance + loop) = Perfect Kiosk Presentations**
## Essential Commands
### Start Services
```bash
# MQTT Client
cd ~/infoscreen-dev/src && python3 simclient.py
# Display Manager
cd ~/infoscreen-dev/src && python3 display_manager.py
```
### Testing
```bash
# Interactive testing menu
./scripts/test-display-manager.sh
# Test Impressive (single playthrough)
./scripts/test-impressive.sh
# Test Impressive (loop mode)
./scripts/test-impressive-loop.sh
# Test MQTT
./scripts/test-mqtt.sh
# Test HDMI-CEC TV control
./scripts/test-hdmi-cec.sh
```
### Logs
```bash
tail -f ~/infoscreen-dev/logs/display_manager.log
tail -f ~/infoscreen-dev/logs/simclient.log
```
## Event JSON Examples
### Loop Presentation (Most Common)
```json
{
"presentation": {
"files": [{"name": "slides.pptx"}],
"auto_advance": true,
"slide_interval": 10,
"loop": true
}
}
```
### Single Playthrough
```json
{
"presentation": {
"files": [{"name": "welcome.pptx"}],
"auto_advance": true,
"slide_interval": 5,
"loop": false
}
}
```
### Webpage
```json
{
"web": {
"url": "https://dashboard.example.com"
}
}
```
### Video
```json
{
"video": {
"url": "https://server/video.mp4",
"loop": true
}
}
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `auto_advance` | bool | `false` | Enable auto-advance |
| `slide_interval` | int | `10` | Seconds per slide |
| `loop` | bool | `false` | Loop vs. quit |
## Impressive Commands
```bash
# Auto-advance + loop
impressive --fullscreen --nooverview --auto 10 --wrap file.pdf
# Auto-advance + quit after last slide
impressive --fullscreen --nooverview --auto 10 --autoquit file.pdf
```
## HDMI-CEC Commands
```bash
# Scan for devices
echo "scan" | cec-client -s -d 1
# Turn TV on
echo "on 0" | cec-client -s -d 1
# Turn TV off (standby)
echo "standby 0" | cec-client -s -d 1
# Check TV power status
echo "pow 0" | cec-client -s -d 1
# Interactive test menu
./scripts/test-hdmi-cec.sh
```
## Troubleshooting
### Presentation doesn't start
```bash
which impressive # Should show path
which libreoffice # Should show path
tail -f logs/display_manager.log # Check errors
```
### Slides don't advance
- Verify `auto_advance: true` in event JSON
- Check `slide_interval` is set
- Test: `./scripts/test-impressive.sh`
### Presentation doesn't loop
- Verify `loop: true` in event JSON
- Test: `./scripts/test-impressive-loop.sh`
### MQTT issues
```bash
./scripts/test-mqtt.sh # Test connectivity
```
## File Locations
```
~/infoscreen-dev/
├── src/
│ ├── simclient.py # MQTT client
│ ├── display_manager.py # Display controller
│ ├── current_event.json # Current event
│ └── presentation/ # Downloaded files
├── logs/
│ ├── simclient.log
│ └── display_manager.log
├── scripts/
│ └── *.sh # All test/start scripts
└── .env # Configuration
```
## Installation
```bash
# System dependencies
sudo apt-get install python3 python3-pip python3-venv \
libreoffice impressive chromium-browser vlc cec-utils
# Python dependencies
cd ~/infoscreen-dev
python3 -m venv venv
source venv/bin/activate
pip install -r src/requirements.txt
```
## Configuration (.env)
```bash
ENV=production
MQTT_BROKER=192.168.1.100
MQTT_PORT=1883
HEARTBEAT_INTERVAL=30
SCREENSHOT_INTERVAL=60
DISPLAY_CHECK_INTERVAL=5
# HDMI-CEC TV Control
CEC_ENABLED=true
CEC_DEVICE=TV
CEC_TURN_OFF_DELAY=30
```
## Documentation
- **README.md** - Complete guide (start here)
- **IMPRESSIVE_INTEGRATION.md** - Presentation details
- **HDMI_CEC_SETUP.md** - TV control setup and troubleshooting
- **CLEANUP_SUMMARY.md** - What changed
- **WORKSPACE_STATUS.txt** - Visual summary
## Key Features
✅ Auto-advance presentations
✅ Loop mode for events
✅ HDMI-CEC TV control (automatic on/off)
✅ MQTT-controlled display
✅ Group management
✅ Heartbeat monitoring
✅ Multi-content (presentations, video, web)
✅ Kiosk mode
## Status
**Version:** Final Solution (October 2025)
**Status:** ✅ Production Ready
**Tested:** Raspberry Pi 5, Pi OS Bookworm
**Solution:** Impressive PDF Presenter
---
**Need help?** Read README.md or check logs/