|
| 1 | +--- |
| 2 | +title: ESPectre - WiFi CSI Motion Detection |
| 3 | +date-published: 2024-12-10 |
| 4 | +type: sensor |
| 5 | +standard: global |
| 6 | +board: esp32 |
| 7 | +difficulty: 1 |
| 8 | +made-for-esphome: true |
| 9 | +project-url: https://github.com/francescopace/espectre |
| 10 | +--- |
| 11 | + |
| 12 | +## Description |
| 13 | + |
| 14 | +ESPectre is a motion detection system based on **WiFi spectrum analysis** with native Home Assistant integration via ESPHome. |
| 15 | + |
| 16 | +Unlike traditional PIR sensors, ESPectre detects movement by analyzing changes in WiFi signals. |
| 17 | +No cameras, no microphones, no wearables required. |
| 18 | + |
| 19 | +### Features |
| 20 | + |
| 21 | +- **WiFi-based detection**: Uses CSI (Channel State Information) from existing WiFi signals |
| 22 | +- **Privacy-preserving**: No cameras, no audio, no identifying data |
| 23 | +- **Through-wall detection**: WiFi signals penetrate walls and obstacles |
| 24 | +- **Auto-calibration**: Automatically selects optimal subcarriers |
| 25 | +- **Adjustable sensitivity**: Threshold control from Home Assistant |
| 26 | +- **Multiple platforms**: ESP32-C6, ESP32-S3, ESP32-C3, ESP32-C5, ESP32-S2, ESP32 |
| 27 | + |
| 28 | +### Entities Created |
| 29 | + |
| 30 | +- **binary_sensor.espectre_motion_detected** - Motion state (on/off) |
| 31 | +- **sensor.espectre_movement_score** - Movement intensity value |
| 32 | +- **number.espectre_threshold** - Detection threshold (adjustable) |
| 33 | + |
| 34 | +## Supported Hardware |
| 35 | + |
| 36 | +| Platform | Status | WiFi | |
| 37 | +|----------|--------|------| |
| 38 | +| ESP32-C6 | ✅ Tested | WiFi 6 | |
| 39 | +| ESP32-S3 | ✅ Tested | WiFi 4 | |
| 40 | +| ESP32-C3 | ✅ Tested | WiFi 4 | |
| 41 | +| ESP32-C5 | ⚠️ Experimental | WiFi 6 | |
| 42 | +| ESP32-S2 | ⚠️ Experimental | WiFi 4 | |
| 43 | +| ESP32 | ⚠️ Experimental | WiFi 4 | |
| 44 | + |
| 45 | +## Setup |
| 46 | + |
| 47 | +1. Flash the device using ESPHome Dashboard or CLI |
| 48 | +2. Configure WiFi via: |
| 49 | + - **BLE**: ESPHome app or Home Assistant Companion |
| 50 | + - **USB**: [web.esphome.io](https://web.esphome.io) |
| 51 | + - **Captive Portal**: Connect to "ESPectre Fallback" AP |
| 52 | +3. Device auto-discovers in Home Assistant |
| 53 | + |
| 54 | +## Configuration |
| 55 | + |
| 56 | +Download the example configuration for your platform from [GitHub](https://github.com/francescopace/espectre/tree/main/examples). |
| 57 | + |
| 58 | +```yaml |
| 59 | +external_components: |
| 60 | + - source: |
| 61 | + type: git |
| 62 | + url: https://github.com/francescopace/espectre |
| 63 | + ref: main |
| 64 | + components: [ espectre ] |
| 65 | + |
| 66 | +espectre: |
| 67 | + id: espectre_csi |
| 68 | + # Optional parameters: |
| 69 | + # segmentation_threshold: 1.0 # Motion sensitivity (0.5-10.0) |
| 70 | + # traffic_generator_rate: 100 # CSI packets/sec (0-1000) |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +## Important Notes |
| 76 | + |
| 77 | +- **Calibration**: Keep room still for 10 seconds after boot |
| 78 | +- **Traffic Generator**: Required for CSI packet generation (enabled by default) |
| 79 | +- **Optimal Distance**: 3-8 meters from WiFi router |
| 80 | + |
| 81 | +## Support |
| 82 | + |
| 83 | +- [Documentation](https://github.com/francescopace/espectre#readme) |
| 84 | +- [Setup Guide](https://github.com/francescopace/espectre/blob/main/SETUP.md) |
| 85 | +- [Tuning Guide](https://github.com/francescopace/espectre/blob/main/TUNING.md) |
| 86 | +- [GitHub Issues](https://github.com/francescopace/espectre/issues) |
| 87 | +- [Discussions](https://github.com/francescopace/espectre/discussions) |
| 88 | + |
| 89 | + |
0 commit comments