Skip to content

revanthvijaychandra-creator/E-FiSpectre-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

E-fiSpectre

๐Ÿ‘ป E-fiSpectre: Wi-Fi Spectre Analysis Motion Detection ๐Ÿ›œ A spooky-smart motion detection system leveraging Wi-Fi CSI (Channel State Information) with seamless Home Assistant integration via ESPHome ๐ŸŒ

๐Ÿ›œ E-fiSpectre ๐Ÿ‘ป

Advanced Motion Detection via Wi-Fi Spectral Analysis (CSI)

License Platform

E-fiSpectre is a non-invasive motion detection system that leverages Channel State Information (CSI) from standard Wi-Fi signals. By analyzing signal fluctuations on the edge, it turns a standard ESP32 microcontroller into a highly sensitive presence sensorโ€”without cameras, microphones, or wearables.


๐Ÿ“‘ Table of Contents


๐Ÿš€ Project Overview

E-fiSpectre solves the privacy and cost issues associated with traditional home security systems. Instead of using video feeds or expensive PIR sensors (which often fail to detect stationary subjects), this system monitors the physical "disturbance" of Wi-Fi waves caused by human movement.

Why E-fiSpectre?

  1. Privacy First: No cameras or microphones. It only "sees" signal waves.
  2. Edge Analytics: Data is processed locally on the ESP32 using efficient mathematical algorithms.
  3. Cost-Effective: Runs on standard hardware (~$10 ESP32-S3/C6).
  4. Through-Wall Detection: Unlike PIR sensors, Wi-Fi signals can detect motion through obstacles.

๐ŸŒŸ Key Features

  • Real-time Detection: Immediate response to movement within the Wi-Fi field.
  • Auto-Calibration: Uses the NBVI (Normalized Baseline Variability Index) algorithm to automatically select the best Wi-Fi subcarriers for the specific room environment.
  • Home Assistant Native: Seamless integration via ESPHome API.
  • Adjustable Sensitivity: User-configurable thresholds to filter out noise vs. actual human motion.

๐Ÿงฎ Mathematical Model

This project moves away from heavy Machine Learning training models, opting instead for a pure signal processing approach for efficiency on low-power devices.

  1. CSI Data Extraction: Captures the raw Channel State Information from the Wi-Fi packets.
  2. NBVI Algorithm: Automatically selects the most sensitive subcarriers while ignoring noisy ones.
  3. MVS (Moving Variance Segmentation): Calculates the variance of the signal amplitude over a sliding window to distinguish between IDLE states and MOTION states.
  4. Hampel Filter: Removes outliers caused by signal packet loss or sudden RF interference.

๐Ÿ›  Hardware Requirements

To replicate E-fiSpectre, you need:

Component Recommendation Notes
Microcontroller ESP32-S3 or ESP32-C6 S3 is recommended for better AI/DSP instruction sets.
Wi-Fi Router Any 2.4GHz Router Standard home router works; no special config needed.
Power Supply 5V USB-C Standard phone charger or power bank.
Host System Raspberry Pi / PC To run Home Assistant (optional but recommended).

๐Ÿ— System Architecture

The data pipeline runs entirely on the "Edge" (the ESP32 device):

graph TD
    A[Raw CSI Data] --> B[Gain Lock AGC]
    B --> C[Auto-Calibration NBVI]
    C --> D[Normalization]
    D --> E[Hampel Filter]
    E --> F[MVS Algorithm]
    F --> G{Motion Detected?}
    G -->|Yes| H[Trigger Home Assistant Binary Sensor]
    G -->|No| I[Standby]

Loading

Optimal Placement

For best results, place the ESP32 sensor 3 to 8 meters away from the Wi-Fi router, elevated at table height (approx 1-1.5m).


๐Ÿ“ฅ Installation & Usage

  1. Clone the Repository:
git clone https://github.com/revanthvijaychandra-creator/E-fiSpectre
  1. Configure YAML: Update the secrets.yaml with your Wi-Fi credentials and API keys.
  2. Flash the Device: Use ESPHome to compile and upload the firmware to your ESP32.
esphome run espectre.yaml
  1. Integration: The device will be auto-discovered by Home Assistant. Add it to your dashboard to see real-time motion data.

๐Ÿ”ฎ Future Scope

This project lays the foundation for advanced wireless sensing. Future updates aim to include:

  • Gestures Recognition: Detecting hand swipes to control smart devices.
  • Fall Detection: Identifying sudden drops in signal patterns for elderly care.
  • People Counting: Estimating the number of occupants based on signal density.
  • Cloud Analytics: Offloading historical data for long-term pattern analysis.

๐Ÿ“„ License

This project is licensed under the GNU General Public License v3.0 (GPLv3). You are free to use, modify, and distribute this software in compliance with the license.


๐Ÿ‘จโ€๐Ÿ’ป Author

Vijay Chandra B.Tech Student | IoT & Data Analytics


*Based on the open-source research and concepts of Wi-Fi Sensing.

About

About ๐Ÿ‘ป E-fiSpectre: Wi-Fi Spectre Analysis Motion Detection ๐Ÿ›œ A spooky-smart motion detection system leveraging Wi-Fi CSI (Channel State Information) with seamless Home Assistant integration via ESPHome ๐ŸŒ

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors