Files
pilot/docs/utilisation.md
Gilles Soulier c5381b7112 Pilot v2: Core implementation + battery telemetry
Major updates:
- Complete Rust rewrite (pilot-v2/) with working MQTT client
- Fixed MQTT event loop deadlock (background task pattern)
- Battery telemetry for Linux (auto-detected via /sys/class/power_supply)
- Home Assistant auto-discovery for all sensors and switches
- Comprehensive documentation (AVANCEMENT.md, CLAUDE.md, roadmap)
- Docker test environment with Mosquitto broker
- Helper scripts for development and testing

Features working:
 MQTT connectivity with LWT
 YAML configuration with validation
 Telemetry: CPU, memory, IP, battery (Linux)
 Commands: shutdown, reboot, sleep, screen (dry-run tested)
 HA discovery and integration
 Allowlist and cooldown protection

Ready for testing on real hardware.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 06:23:00 +01:00

33 lines
1.0 KiB
Markdown

<!-- Codex created 2025-12-29_0224 -->
# Utilisation
## Entites Home Assistant attendues
- Capteurs: cpu_usage, cpu_temp, cpu_freq, memory, ip, battery, gpu (si dispo).
- Switches: shutdown, reboot, screen.
- States: power_state.
## Commandes
- `pilot/<device>/cmd/shutdown/set` : OFF
- `pilot/<device>/cmd/reboot/set` : OFF
- `pilot/<device>/cmd/sleep/set` : OFF
- `pilot/<device>/cmd/screen/set` : ON/OFF
## Etats des commandes
- `pilot/<device>/state/shutdown` : ON/OFF
- `pilot/<device>/state/reboot` : ON/OFF
- `pilot/<device>/state/sleep` : ON/OFF
- `pilot/<device>/state/screen` : ON/OFF
## Power state
- Valeurs minimales: on, off, sleep, unknown.
- Si logind fournit IdleHint: `idle` peut etre publie.
## Parametres YAML courants
- mqtt.host, mqtt.port, mqtt.base_topic, mqtt.discovery_prefix
- device.name, device.identifiers
- features.telemetry, features.commands
## Depannage rapide
- Confirmer la presence des topics `status` et `availability`.
- Verifier les droits systeme pour shutdown/reboot/screen.
<!-- Codex modified 2025-12-29_0224 -->