From cda3c39f1fa1e3dbc6d7606f0afa902f6c77a8fb Mon Sep 17 00:00:00 2001 From: bullshit Date: Fri, 22 Aug 2025 16:12:53 +0200 Subject: [PATCH] docs: update documentation Signed-off-by: bullshit --- README.md | 2 +- components/ups_hid/README.md | 22 +--------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 1f49b80..ec96d54 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ Copyright bullshit ### Current Status -- ✅ **UPS HID Component**: **Production ready** - ESP-IDF v5.4 compatible +- ✅ **UPS HID Component**: ESP-IDF v5.4 compatible - ✅ **Hardware validated** - 100% success in stale data prevention testing - ✅ **Robust USB management** - Clean disconnect detection and graceful state corruption recovery - ✅ **Safety-critical** - All sensors immediately show "unavailable" after disconnect (never stale data) diff --git a/components/ups_hid/README.md b/components/ups_hid/README.md index 00d413a..6cec87b 100644 --- a/components/ups_hid/README.md +++ b/components/ups_hid/README.md @@ -1,6 +1,6 @@ # UPS HID Component for ESPHome -A production-ready ESPHome component for monitoring UPS devices via USB connection on ESP32-S3. Direct USB HID communication with support for APC, CyberPower, and generic HID UPS devices. +A ESPHome component for monitoring UPS devices via USB connection on ESP32-S3. Direct USB HID communication with support for APC, CyberPower, and generic HID UPS devices. ## Features @@ -12,8 +12,6 @@ A production-ready ESPHome component for monitoring UPS devices via USB connecti - 🔌 **Multi-protocol support**: APC HID, CyberPower HID, Generic HID - 🎯 **Auto-detection**: Intelligent protocol detection based on USB vendor IDs - 🔧 **Robust USB handling**: ESP-IDF v5.4 compatible with 3-tier reconnection recovery -- 🛡️ **Safety-critical design**: Stale data prevention, never displays incorrect readings -- 🏭 **Production-ready**: Thread-safe, comprehensive error handling, hardware validated - 🧪 **Simulation mode**: Test integration without physical UPS device ## Quick Start @@ -783,24 +781,6 @@ automation: message: "UPS test completed: {{ states('text_sensor.ups_test_result') }}" ``` -**USB Connection & Disconnection Handling:** - -Production-grade USB management with ESP-IDF v5.4 compatibility: - -- **Clean Disconnect Detection**: Immediate recognition via `USB_HOST_CLIENT_EVENT_DEV_GONE` -- **3-Tier Recovery Strategy**: Handles USB Host Library state corruption gracefully - - **Tier 1**: Standard device cleanup with `usb_host_device_free_all()` - - **Tier 2**: Complete USB client re-registration when cleanup fails with `ESP_ERR_INVALID_STATE` - - **Tier 3**: Immediate sensor data clearing to prevent stale readings -- **Automatic Reconnection**: When UPS is physically reconnected, detection occurs within 15 seconds -- **Graceful Degradation**: System remains stable during USB state corruption scenarios -- **Stale Data Prevention**: All sensors immediately show "unavailable" after disconnect -- **Safety-Critical Design**: Never displays potentially dangerous outdated readings - -**Expected Behavior:** -- **During disconnect**: All sensors clear within 1 second, LED shows offline state -- **During reconnection**: UPS detected automatically, full protocol re-initialization -- **State corruption**: USB client re-registration recovers without ESP32 restart ```yaml # Enable detailed USB debugging if needed