Public Access
docs: update documentation
Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
2 files changed
+2
-22
No files matched your search
@@ -173,7 +173,7 @@ Copyright bullshit <coding@ow-software.pl>
|
|||||||
|
|
||||||
### Current Status
|
### 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
|
- ✅ **Hardware validated** - 100% success in stale data prevention testing
|
||||||
- ✅ **Robust USB management** - Clean disconnect detection and graceful state corruption recovery
|
- ✅ **Robust USB management** - Clean disconnect detection and graceful state corruption recovery
|
||||||
- ✅ **Safety-critical** - All sensors immediately show "unavailable" after disconnect (never stale data)
|
- ✅ **Safety-critical** - All sensors immediately show "unavailable" after disconnect (never stale data)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# UPS HID Component for ESPHome
|
# 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
|
## 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
|
- 🔌 **Multi-protocol support**: APC HID, CyberPower HID, Generic HID
|
||||||
- 🎯 **Auto-detection**: Intelligent protocol detection based on USB vendor IDs
|
- 🎯 **Auto-detection**: Intelligent protocol detection based on USB vendor IDs
|
||||||
- 🔧 **Robust USB handling**: ESP-IDF v5.4 compatible with 3-tier reconnection recovery
|
- 🔧 **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
|
- 🧪 **Simulation mode**: Test integration without physical UPS device
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
@@ -783,24 +781,6 @@ automation:
|
|||||||
message: "UPS test completed: {{ states('text_sensor.ups_test_result') }}"
|
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
|
```yaml
|
||||||
# Enable detailed USB debugging if needed
|
# Enable detailed USB debugging if needed
|
||||||
|
|||||||
Reference in new issue
Block a user