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>
28 lines
866 B
Rust
28 lines
866 B
Rust
// Implementations Windows (winapi_session ou external_tool).
|
|
use anyhow::{bail, Result};
|
|
use tracing::info;
|
|
|
|
use crate::commands::{CommandAction, CommandValue};
|
|
|
|
// Stub Windows pour les commandes power (a completer).
|
|
pub fn execute_power(backend: &str, action: CommandAction) -> Result<()> {
|
|
match backend {
|
|
"windows_service" | "winapi_session" | "external_tool" => {
|
|
info!(?action, "windows power backend stub");
|
|
Ok(())
|
|
}
|
|
_ => bail!("unknown windows power backend"),
|
|
}
|
|
}
|
|
|
|
// Stub Windows pour l'ecran (a completer).
|
|
pub fn execute_screen(backend: &str, value: CommandValue) -> Result<()> {
|
|
match backend {
|
|
"winapi_session" | "external_tool" => {
|
|
info!(?value, "windows screen backend stub");
|
|
Ok(())
|
|
}
|
|
_ => bail!("unknown windows screen backend"),
|
|
}
|
|
}
|