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>
44 lines
1.4 KiB
Markdown
44 lines
1.4 KiB
Markdown
<!-- Codex created 2025-12-29_0224 -->
|
|
# Deploiement
|
|
|
|
## Pre-requis
|
|
- Broker MQTT accessible.
|
|
- Fichier config YAML valide.
|
|
- Droits systeme pour power/screen si necessaire.
|
|
|
|
## Linux
|
|
1. Installer le binaire `pilot`.
|
|
2. Placer la config dans `/etc/pilot/config.yaml` (ou `./config.yaml`).
|
|
3. Creer un utilisateur `pilot` (recommande).
|
|
4. Copier le service systemd `packaging/pilot.service` vers `/etc/systemd/system/pilot.service`.
|
|
5. Activer + demarrer:
|
|
- `sudo systemctl daemon-reload`
|
|
- `sudo systemctl enable pilot`
|
|
- `sudo systemctl start pilot`
|
|
6. Verifier les logs: `journalctl -u pilot`.
|
|
|
|
Permissions (selon backend power/screen) :
|
|
- backend `linux_sudoers` : autoriser `shutdown` et `reboot` via sudoers.
|
|
- backend `gnome_busctl` : necessite une session utilisateur GNOME active.
|
|
|
|
Exemple sudoers:
|
|
```
|
|
pilot ALL=(ALL) NOPASSWD: /sbin/shutdown
|
|
pilot ALL=(ALL) NOPASSWD: /sbin/reboot
|
|
```
|
|
|
|
## Windows
|
|
1. Copier `pilot.exe`.
|
|
2. Placer la config dans `C:\ProgramData\Pilot\config.yaml` (ou `./config.yaml`).
|
|
3. Installer une tache planifiee ou un service.
|
|
4. Verifier les logs (fichier ou Event Viewer selon config).
|
|
|
|
## Upgrade / rollback
|
|
- Conserver `backup_v1/<timestamp>`.
|
|
- Revenir a v1 en reactiver le service v1 ou lancer le script v1.
|
|
|
|
## Debug
|
|
- Verifier `pilot/<device>/status` et `availability`.
|
|
- Activer logs debug dans la config.
|
|
<!-- Codex modified 2025-12-29_0224 -->
|