๐ Major - ESPHome Native Integration
Complete platform migration from ESP-IDF to ESPHome
This release represents a major architectural shift from standalone ESP-IDF firmware to a native ESPHome component, enabling seamless Home Assistant integration.
โ ๏ธ Note: Extensively tested on ESP32-S3 and ESP32-C6, but bugs may still exist. Community contributions, bug reports, and support for additional ESP32 variants are welcome!
๐ฏ Two-Platform Strategy
ESPectre now follows a dual-platform development model:
| Platform | Role | Focus | Target |
|---|---|---|---|
| ESPectre (ESPHome - C++) | Production | Motion detection only | Smart home users, Home Assistant |
| Micro-ESPectre (Micro Python) | R&D | Features + Filters for research | Researchers, developers, academics |
ESPectre focuses on core motion detection for Home Assistant integration.
Micro-ESPectre provides features (variance, skewness, kurtosis, entropy, IQR, spatial_, temporal_) and advanced filters (Butterworth, Wavelet, Savitzky-Golay) for research/ML applications.
New Architecture:
- Native ESPHome component: Full C++ implementation as ESPHome external component
- Home Assistant auto-discovery: Automatic device and sensor registration via Native API
- YAML configuration: All parameters configurable via simple YAML files
- OTA updates: Wireless firmware updates via ESPHome
Implementation:
components/espectre/: Complete ESPHome component with Python config and C++ implementation- Modular C++ architecture:
calibration_manager,csi_manager,sensor_publisher, etc. - Binary sensor for motion detection
- Movement score sensor
- Adjustable threshold (number entity) - controllable from Home Assistant
๐ Micro-ESPectre
R&D Platform for Wi-Fi CSI Motion Detection - Pure Python implementation for MicroPython
Micro-ESPectre is the research and development platform of the ESPectre project, designed for rapid prototyping, algorithmic experimentation, and academic/industrial research. It implements motion detection algorithms in pure Python, enabling fast iterations without compilation overhead.
Key Features:
- โก Instant Deploy: ~5 seconds to update code (no compilation)
- ๐ง MQTT Integration: Runtime configuration via MQTT commands
- ๐งฌ Auto Calibration Algorithm: Automatic subcarrier selection (F1=97.1%)
- ๐ Analysis Tools: Complete suite for CSI analysis and algorithm optimization
- ๐งฎ Feature Extraction: Statistical features (variance, skewness, kurtosis, entropy, IQR)
- ๐ฏ Confidence Score: Experimental motion detection confidence estimation
- ๐พ NVS Persistence: Persistent configuration on filesystem
Advanced Applications (ML/DL ready):
- ๐ฌ People counting
- ๐ Activity recognition (walking, falling, sitting, sleeping)
- ๐ Localization and tracking
- ๐ Gesture recognition
Dependencies:
micropython-esp32-csi- Custom MicroPython fork with native CSI support for ESP32 family- MQTT broker (e.g., Mosquitto)
๐งช Test Suite Refactoring
Migration from Unity (ESP-IDF) to PlatformIO Unity for ESPHome consistency
The test suite has been migrated from ESP-IDF's Unity framework to PlatformIO Unity, aligning with the ESPHome ecosystem and enabling native (desktop) test execution without hardware.
Complete test suite with 68 test cases organized in 5 suites and Memory leak detection:
| Suite | Tests | Focus |
|---|---|---|
test_csi_processor
| 19 | API, initialization, validation, memory management |
test_hampel_filter
| 16 | Outlier removal filter behavior |
test_calibration
| 21 | NBVI algorithm, variance, percentile calculations |
test_calibration_file_storage
| 9 | Calibration persistence and file I/O |
test_motion_detection
| 3 | MVS performance with real CSI data (2000 packets) |
# Run tests locally
cd test && pio test -e native๐ CI/CD Pipeline
GitHub Actions integration for automated quality assurance
- Automated testing: Runs on push to
main/developand pull requests - ESPHome build verification: Compiles
espectre.yamlto validate component - Status badge: Real-time CI status displayed in README
- Path filtering: Only triggers on changes to
components/espectre/ortest/