Files
pilot/backup_v1/20251229_0205/install.sh
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

22 lines
651 B
Bash
Executable File

#!/bin/bash
# Vérifier si le script est exécuté avec les privilèges root
if [ "$EUID" -ne 0 ]; then
echo "Veuillez exécuter ce script avec sudo ou en tant que root."
exit 1
fi
# Copier le fichier de service dans le répertoire systemd
cp mqtt_pilot.service /etc/systemd/system/
# Recharger systemd pour prendre en compte le nouveau service
systemctl daemon-reload
# Activer le service pour qu'il démarre au démarrage
systemctl enable mqtt_pilot.service
# Démarrer le service immédiatement
systemctl stop mqtt_pilot.service
systemctl start mqtt_pilot.service
echo "Le service mqtt_pilot a été installé et démarré avec succès."