espectre README

项目的 README,来自 github.com/francescopace/espectre。合并为一个 markdown 文件:README.md。

ESP-IDF component Arduino library C++ coverage Python coverage Web coverage

ESPectre ESPectre logo

Turn an ESP32 into a private, local Wi-Fi motion sensor.

When someone moves through a room, they change the way Wi-Fi signals travel through it. ESPectre reads those changes and reports motion in real time. No camera, no microphone, no wearable, and no dedicated radar hardware: just a supported ESP32 and the Wi-Fi network already in the room.

ESPectre is an open-source platform that brings together ready-to-flash firmware, an embeddable C++ SDK, an Arduino library, a MicroPython implementation, browser tools, a host CLI, an open dataset, open model weights, and the research workflow used to build and validate the detectors.

Flash from your browser · See the live tools · Read the documentation · Explore the SDK

Applications and integrations

Use ESPectre to turn on lights or a display when someone walks in, adjust heating when a room is in use, or send an alert when there is movement where nobody should be. It works with Home Assistant (through ESPHome or MQTT), appears as a standard Matter occupancy sensor, offers a local HTTP API, and can be built into your own ESP32 firmware with the C++ SDK or an Arduino-ESP32 sketch.

Everything runs on the device: it measures the Wi-Fi channel (channel state information, or CSI) and reports motion and a movement score. Nothing needs to go to the cloud. One board covers one area, so plan on one board per room.

ESPectre detects changes in the radio environment. It does not identify people, count them, prove that a room is empty, or replace a safety-certified security, medical, or emergency system.

Supported hardware

Choose a firmware path

Path Best for Start here
Native Standalone sensors, MQTT integrations, including Home Assistant MQTT Discovery, and custom applications Native frontend
ESPHome Home Assistant users who want native entities, ESPHome provisioning, and Device Builder updates ESPHome frontend
Matter Matter controllers with occupancy-sensor support; tested with Google Home, Apple Home, and Home Assistant Matter frontend
Micro-ESPectre Lightweight sensing in MicroPython with local, read-only Direct HTTP monitoring Micro-ESPectre README

Quick start

The quickest way needs only a browser. Use desktop Chrome 151 or later; Edge can flash, but Device settings and Monitor may not work in it.

  1. Open Flash in desktop Chrome or Edge.
  2. Connect a supported ESP32 over USB, then choose a firmware and release channel.
  3. Complete on-screen Wi-Fi provisioning, or commission Matter with a supported controller.
  4. Optionally, open Device settings to pin a preferred access point or set up MQTT.
  5. Open Monitor to watch motion, tune detection, and inspect the device.

To find your devices on the network, use Find devices in the browser tools or ./espectre devices. See the discovery reference for requirements and limits.

ESPectre Monitor

Matter status: pairing, occupancy updates, and automations are tested with Google Home, Apple Home, and Home Assistant. Amazon Alexa and Samsung SmartThings are not tested yet. Google Home needs a one-time Developer Console setup. See Matter controller compatibility for the current matrix.

Local setup

To build and flash from this repository, start with the setup guide. To see all available commands, run:

./espectre --help

Documentation

Topic What it covers Guides
Install and operate Device setup, CLI workflows, and troubleshooting Setup guide, CLI reference, Troubleshooting guide
Understand and integrate Runtime architecture, CSI acquisition, API, discovery, algorithms, and the C++ SDK Architecture overview, CSI guide, API reference, Discovery reference, Algorithms reference, SDK guide
Research and direction Roadmap, architecture decisions, and release history Roadmap, ADR index, Changelog
Frontend reference Guides for each firmware, Micro-ESPectre, and the Arduino library ESPHome, Native, Matter, Micro, Arduino
Contributing Contributions, release procedures, and project discussions Contributing guide, Release guide, GitHub Discussions

Datasets, models, and validation

ESPectre publishes the research assets and validation evidence behind its detectors:

Asset What it gives you Start here
CSI dataset Real recordings for empty rooms, static presence, and motion, with catalog and provenance in dataset_info.json Data collection guide, Data/
Model weights Trained weights in C++ and Python, plus the training, export, and validation workflow ML training guide
Feature analysis Features that were tested, promoted, or rejected, including unsuccessful experiments Feature analysis
Reports Generated detector metrics and dataset quality checks Performance report, Dataset quality report
Literature External Wi-Fi sensing research and what transfers to ESPectre Literature review

Security, privacy, and transparency

A sensor that can reveal presence should not be a black box. Wi-Fi sensing records no images or audio, but motion data can still reveal routines, sleep, or when nobody is home. ESPectre treats that risk as part of the design:

Use ESPectre only where you have the right to. Tell the people affected, get consent where required, protect access to the device and its data, and follow privacy laws.

Acknowledgments

License

ESPectre first-party code is available under GPLv3, and eligible parts also under a separate commercial license:

Third-party terms and build-specific compliance artifacts are described in the third-party notices.

espectre (francescopace/espectre)

正在搜索数据库…

这是做什么的?ESPectre 能把受支持的 ESP32 变成一个私有的本地 Wi-Fi 人体移动传感器:它通过感知移动如何改变房间里的 Wi-Fi 信号来检测移动,并实时报告运动状态——不需要摄像头、麦克风、可穿戴设备,也不需要专门的雷达硬件。
不用摄像头和雷达,它是怎么检测移动的?它读取 Wi-Fi CSI(信道状态信息):当有人在房间里走动时,会改变 Wi-Fi 信号的传播方式,检测器直接在 ESP32 上处理这些变化,输出运动状态和移动分数。
第一个传感器怎么设置?直接在浏览器里刷入:在桌面版 Chrome 151+ 中打开 Flash,用 USB 连接受支持的 ESP32,选择固件和发布通道,然后按屏幕提示完成 Wi-Fi 配网。本地编译和命令行工作流请从 SETUP.md 开始。
需要什么硬件和网络?需要一块受支持的 ESP32 开发板(C6、C5、C3、S3、S2 或经典款)和一个普通的 2.4 GHz Wi-Fi 4(802.11n)网络。使用浏览器在线刷写的话,建议用桌面版 Chrome 151+;Edge 也能刷,但不保证 Device settings 和 Monitor 的兼容性。
它有哪些局限?一块板子只能覆盖一个感应区域,所以要做整个房间的覆盖,通常需要每个房间放一块板子。它只能检测无线电环境的变化:无法识别或统计人数,无法证明房间里没人,也不能替代经过安全认证的安防、医疗或紧急报警系统。
移动数据会传到哪里?默认不会传到任何外部地方:CSI 在设备上处理,移动检测完全在本地进行,不需要连接云端。采集原始 CSI 是可选功能,仅供研究和调试使用。
可以在闭源固件里使用吗?官方代码采用 GPLv3。如果想在专有闭源固件中嵌入 ESPectre 而不承担开源义务,需要购买单独的商业授权(见 LICENSING.md);注意 ESPHome 的 C++ 前端仅支持 GPLv3。
它支持 Home Assistant 吗?支持——可以通过 ESPHome 获得原生的 Home Assistant 实体,也可以通过 MQTT 配合 Home Assistant 的 MQTT Discovery 使用。它还提供标准的 Matter 占用传感器(控制端验证仍有限)以及一个本地的 Direct HTTP API,方便自定义集成。
有哪些固件方案可以选择?四种:Native,用于独立传感器和 MQTT 集成;ESPHome,适合想要原生实体的 Home Assistant 用户;Matter,面向 Matter 控制器;以及 Micro-ESPectre——一个轻量的 MicroPython 版本,带本地只读 HTTP 监控。
除了固件,这个项目还包含什么?包含可嵌入的 C++ SDK、覆盖设备完整生命周期的主机端 CLI、浏览器工具(Flash、Device settings、Monitor),以及一个开放的 CSI 数据集(包含空房间、静态有人和移动状态的录制数据),还有训练好的模型权重和完整的训练与验证流程。
它到底能自动化什么?任何由移动驱动的场景都行:房间里有人活动时打开显示屏或电灯,根据房间活动调节暖气和空调,或在不该有人的地方出现移动时触发警报或通知——通过 Home Assistant、Matter、MQTT 或 HTTP API 实现。
大小
430.6 MB
星标
9.8K
时长
1年
提交 · 90 天