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>
This commit is contained in:
19
pilot-v2/src/main.rs
Normal file
19
pilot-v2/src/main.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
// Point d'entree principal de l'application.
|
||||
use anyhow::Result;
|
||||
use tracing::info;
|
||||
|
||||
use pilot_v2::config;
|
||||
use pilot_v2::runtime::Runtime;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter("pilot_v2=info")
|
||||
.init();
|
||||
|
||||
let config = config::load()?;
|
||||
info!("config loaded");
|
||||
|
||||
let runtime = Runtime::new(config);
|
||||
runtime.run().await
|
||||
}
|
||||
Reference in New Issue
Block a user