SETUP · 7 MIN READ

Flash and set up your device

Install ESPectre from the browser, connect the board to Wi-Fi, and check that it detects movement.

Sections

What you need

An ESP32 board connected to a laptop for browser flashing
Connect the board directly to the computer with a USB data cable before you open the installer.

Step 1 — Choose your firmware

Pick the row that matches how you want to use the sensor. You can reflash later.

Which ESPectre firmware type to install
If you...InstallYou get
Want a standalone sensor, the browser tools, MQTT, or Home Assistant through an MQTT brokerNativeUSB Wi-Fi setup, browser monitoring without a broker, optional MQTT, Home Assistant discovery, and browser games
Want the fullest Home Assistant integration and YAML configurationESPHomeA device that Home Assistant finds on its own, with motion, movement level, a threshold slider, and a recalibrate button
Use a controller that supports Matter occupancy sensorsMatterA standard occupancy sensor. Controller testing is still limited: check the current status
Want raw CSI data for researchNative, ESPHome, or MatterRaw CSI capture from the browser tool or with ./espectre collect
Not sure? Pick Native. It works on its own, supports Home Assistant through MQTT, and works with every tool on this website. The installer also picks it when it does not find ESPectre on the board. Pick ESPHome if you want YAML configuration and every control in Home Assistant.

Step 2 — Install ESPectre

Recommended: install from the browser

  1. Plug the board in

    Connect the ESP32 to your computer over USB. Close anything else that may be using the serial port, such as another installer tab, the Arduino IDE, or a serial monitor.

  2. Open the installer

    Go to Install ESPectre and select Connect USB device.

  3. Pick the port

    Choose the port that appears when you plug the board in: COMx on Windows, or a name with usbserial, usbmodem, or ttyACM on macOS and Linux. The installer detects the chip and any ESPectre firmware already on it.

  4. Choose and install

    If the installer recognizes the firmware, choose Update or Reinstall to keep the device's settings. To switch to another firmware type, or to replace firmware it does not recognize, you must confirm a full erase. Keep the page open until the board restarts.

If the port never appears or the connection fails right away, hold the BOOT button while you plug the cable in, release it, and select Connect USB device again. This puts the chip in download mode.
For integrators: build from source with the CLI

Build, flash, and monitor

You need Python 3.14. Native and Matter build with ESP-IDF 5.5.3 or later when it is installed, or with the project's Docker image otherwise. Checked builds include 5.5.3 through 5.5.5, 6.0.3, and 6.1.0. The project's firmware uses 5.5.5. Hardware checks on ESP-IDF 6.x are still pending. Flashing still needs local serial tools. ESPHome installs its own toolchain.

Prepare the repository once:

git clone https://github.com/francescopace/espectre.git
cd espectre
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

The examples target ESP32-C3. For another board, replace c3 with c5, c6, s2, s3, or esp32. ESP32-S2 works with ESPHome, Native, and Micro-ESPectre, but not Matter.

--clean is only needed after a configuration or toolchain change. Flashing restarts the board, so there is no separate run step. You don't need to name the port: the CLI uses the only connected device, or shows a menu if there are several.

--reset restarts the board once so the monitor shows the full startup log:

./espectre native build --chip c3 --clean
./espectre native flash --chip c3
./espectre monitor --chip c3 --frontend native --reset

Run ./espectre devices to list the ESPectre devices on your network; add --frontend to show only one firmware type. On Windows, use espectre.cmd instead of ./espectre. The CLI reference covers build prerequisites, port selection, --clean-all, and build options.

Step 3 — Connect it to your network

Select the firmware you installed and follow only that path. Once the device is online, Find devices in the browser tools can locate it on your network.

  1. Set up Wi-Fi over USB

    After flashing, the installer checks the board. If it has no Wi-Fi settings yet, a Wi-Fi form opens in the page; otherwise the installer finishes directly.

  2. Open Device settings

    Go to Device settings. Enter the device IP address if the installer showed one, or use Auto-discovery. There you can rename the device, check its Wi-Fi connection, choose an access point, and set up MQTT.

    To change the Wi-Fi network or password, use the installer over USB. Resetting Wi-Fi disconnects the device until you set it up again over USB. To reset Wi-Fi without a browser, hold BOOT for 3 seconds.

  3. Start sensing

    Open Live motion and connect to the same device to see detection without a broker. Set up MQTT only if you need Home Assistant or another automation system.

Tune from the MQTT shell

Run the shell on your computer with your broker's address. It picks the device on its own, or shows a menu if several are online. Type help for the command list, then change the motion threshold or start a new calibration:

./espectre mqtt --broker 192.168.1.20
espectre> help
espectre> update_sensing threshold=0.35
espectre> recalibrate

Integrators can also build Wi-Fi and MQTT defaults into a Native image. Keep generated sdkconfig files and credentials out of version control; the Native reference lists the options.

Matter controller compatibility

ESPectre reports motion as a standard Matter occupancy sensor. Our hardware benchmark pairs every build with CHIP Tool, the Matter reference controller, connects to it over Direct HTTP, checks that its access-point choice survives a restart, and measures detection with both profiles. It does not test motion reports or automations in a consumer app.

No end-to-end test has been recorded yet for Google Home, Amazon Alexa, Apple Home, Samsung SmartThings, or Home Assistant. A controller that supports occupancy sensors may still fail to pair ESPectre or to trigger automations. Wider controller testing is planned for v3.1.0; follow it on the roadmap.

Before choosing Matter: the firmware is not certified yet and uses development IDs and test credentials. Your controller may ask you to confirm that you want to add an uncertified device, or may require its developer mode.
For integrators: how browser discovery works

Automatic LAN discovery and browser support

A web page cannot list the services on your network, but it can look up a single .local name. The portal looks up a name that Native, ESPHome, and commissioned Matter devices answer. Micro-ESPectre does not answer it. The device that answers searches the network for the other ESPectre devices, including Micro-ESPectre, and sends back their addresses. Each attempt uses a new random name, so cached answers from earlier attempts never get in the way.

Everything stays on your local network: no app, no browser extension, and no address scanning. Discovery is optional and works over IPv4 only. It needs at least one ESPectre device that can answer, even if you then pick another one. You can always enter a device's IP address instead.

Browser compatibility and validation status for automatic LAN discovery
Browser environmentStatusDiscovery requirements
Chrome 151 or later on macOSValidatedTested on real hardware, including several devices and a device going offline.
Chrome 151 or later on Windows 10/11Validation pendingWindows must resolve .local names through mDNS, the network and firewall must allow multicast UDP port 5353, and Local Network Access must be allowed for the portal.
Chrome 151 or later on LinuxValidation pendingThe system must resolve .local names through mDNS (for example with systemd-resolved or Avahi), the network and firewall must allow multicast UDP port 5353, and Local Network Access must be allowed.
Edge, Firefox, Safari, mobile Chrome, and WSLCompatibility not guaranteedUse Chrome 151 or later on a desktop computer, or connect with the device's IP address.

Step 4 — Let it calibrate, then test

The movement level is a score from 0.0 to 1.0 that depends on your room. There is no universal threshold: if the sensor reacts too much or too little, adjust the threshold a little at a time. The detection guide explains what the score means.

Troubleshooting

These cards cover installation. For calibration that never finishes, false or missed motion, or a device you cannot reach, see the troubleshooting guide.

No serial port appears

  • Try another USB cable; charge-only cables are a common cause.
  • Try another USB port, ideally one directly on the computer.
  • Hold BOOT while plugging in, then retry.

Flashing fails midway

  • Close other tabs or programs that use the port, and retry.
  • Use a rear USB port or a powered hub: unstable power interrupts flashing.
  • Use the erase-and-reinstall option to start from a clean board.

The installer says the board is not supported

  • There is no published image for this chip with the selected firmware and channel.
  • The Install ESPectre page lists the chips that have firmware.
  • ESP32-S2 is available in the browser for ESPHome and Native, but not Matter. Micro-ESPectre is installed from the CLI only.

The device does not join Wi-Fi

  • Check the network name and password; both are case-sensitive. Native and ESPHome accept them over USB; Matter gets them from your controller during pairing.
  • If a preferred access point is unavailable and you can still reach the device, select automatic access-point selection in Device settings. Otherwise, follow the recovery steps for your firmware.
  • Move the board closer to the access point for the first connection.

You need to recover or roll back

  • Native: hold BOOT for 3 seconds to clear the Wi-Fi settings, then set up Wi-Fi again over USB.
  • ESPHome: configure Wi-Fi over USB or through the ESPectre Fallback hotspot.
  • Matter: remove the reachable device from all paired controllers to reopen commissioning. If you cannot reach it, a full erase and reinstall clears pairing data and creates new setup codes; pair it again with your controller.
  • If an over-the-air update cannot finish, reflash the full image over USB. Matter always uses USB for updates.
  • To move from official firmware to your own build or an ESPHome Device Builder image, flash it once over USB: official Native and ESPHome firmware only accepts signed updates over the air.
  • Install an older version only if its release notes allow the downgrade, and erase the board if its saved settings are not compatible.

Matter pairing times out

  • Keep the phone within a meter of the board while pairing.
  • Check that the phone's Bluetooth is on and the board has power.
  • Unplug and replug the board to reopen pairing, then retry.