Turn a tiny ESP32-S3 board into a camera-free motion sensor that reads changes in your existing Wi-Fi signal. Flash ESPectre through ESPHome, place it well, power it from 5 V or a 12 V supply, and switch lights from Home Assistant.
Most motion sensors in South African homes are PIRs: the alarm passives in the corners, and maybe a few Wi-Fi or Zigbee ones for lights. They work, but they only see what is in front of them, they need a clear line of sight, and they are another battery or another camera-like object on the wall.
There is another way. When someone moves through a room, they change the way Wi-Fi signals bounce around it. A cheap ESP32 board can measure those changes, called channel state information (CSI), and turn them into a motion sensor. The open-source project that does this well is ESPectre. In this post we flash it onto a small ESP32-S3 board with ESPHome, place it properly, power it from 5 V or from a 12 V supply, and use it to switch lights in Home Assistant.
What ESPectre is (and what it is not)
ESPectre is an open-source Wi-Fi motion-sensing platform for the ESP32. Everything runs on the board: it measures CSI and reports motion and a movement score, with nothing sent to the cloud. It works with Home Assistant through ESPHome or MQTT, and there is also a Matter firmware that shows up as an occupancy sensor.
The project is honest about its limits, and you should be too:
- It detects movement, not people. It cannot count people, tell who is there, or prove that a room is empty. Someone sitting very still may not register.
- One board per area. The project suggests planning on one board per room.
- It is not an alarm. ESPectre says it does not replace a certified security system. Keep your alarm passives; use this for lights, comfort and extra awareness.
- 2.4 GHz Wi-Fi 4 (802.11n). It needs a normal 2.4 GHz network.
What you need
- A supported ESP32 board. ESPectre supports the ESP32-C6, C5, C3, S3, S2 and the classic ESP32. This post uses an ESP32-S3, for example the Waveshare ESP32-S3-Zero: a thumb-sized board with USB-C, an onboard ceramic antenna, 4 MB flash and 2 MB PSRAM. Similar S3-Zero-style boards from local shops or AliExpress work the same way; just check how much flash yours has. ESPectre's hardware guide notes that Espressif ranks the C5 and C6 ahead of the S3 for CSI, but treats that as a vendor ranking, not a measurement.
- A USB data cable (not a charge-only one) for the first flash.
- Home Assistant with ESPHome, either the ESPHome Device Builder add-on or ESPHome on your PC. The built-in espectre component is part of ESPHome, so use a current release (the ESPectre guide covers ESPHome 2026.11).
- Power: a 5 V USB-C supply, or a 12 V supply with a 12 V to 5 V buck converter (more on that below).

How it works in one paragraph
By default, the board pings your Wi-Fi gateway and measures the CSI on the replies it gets back. The detector expects about 100 packets per second. The signal reaches the board directly and through reflections off walls, furniture and people, so when someone walks through those paths, the CSI changes and the movement score goes up. When the score stays above a threshold for a few evaluations in a row, the motion sensor turns on. The default lightweight detector calibrates its threshold to your room at start-up; a high_accuracy option runs a small on-device neural network instead.
Step 1: The quick way, or the ESPHome way
ESPectre has a browser installer: plug the board into a desktop computer, open the installer in Chrome, pick a firmware and flash. Its guide suggests Native firmware for a standalone sensor or MQTT, and ESPHome for the fullest Home Assistant integration. If the port does not show up, hold the BOOT button while you plug in the cable. The S3-Zero has no USB-to-serial chip, so Waveshare says to do the same when flashing it.
If you already run ESPHome, the cleanest route is your own YAML with the built-in component, because you choose the entities and it updates with ESPHome. That is what we do next.
Step 2: The ESPHome configuration
Create a new device in ESPHome and use something like this. The esp32 block matches a 4 MB S3-Zero; ESPHome warns that setting a flash size larger than your board has will stop it booting. ESPHome normally adds an API encryption key and fallback hotspot when it creates a device, so keep those lines.
esphome:
name: lounge-csi
friendly_name: Lounge CSI
esp32:
variant: esp32s3
flash_size: 4MB
framework:
type: esp-idf
logger:
api:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
espectre:
binary_sensor:
- platform: espectre
motion:
name: Motion
calibrating:
name: Calibrating
sensor:
- platform: espectre
movement:
name: Movement
filters:
- throttle: 1s
- platform: wifi_signal
name: WiFi Signal
update_interval: 60s
number:
- platform: espectre
threshold:
name: Threshold
button:
- platform: espectre
name: Recalibrate
A few notes from the ESPHome docs:
- The plain espectre: line is enough. The defaults suit most rooms, so tune placement first and settings last.
- The movement score publishes every 250 ms by default. The throttle filter stops that from flooding the Home Assistant database. Leave the movement sensor out completely if you only need motion.
- The component turns Wi-Fi power saving off, pauses roaming scans and disables frame aggregation for the whole firmware, so OTA updates may be slower than usual. That is normal.
- ESPectre does not report signal strength itself, which is why the WiFi Signal sensor is in the config.
Flash it over USB the first time, then over Wi-Fi after that. Home Assistant should discover the device; accept it under Settings > Devices & services. With the friendly name above, the motion entity is binary_sensor.lounge_csi_motion. Check the real names on your device page.
Step 3: Placement matters more than any setting
ESPectre measures the link between your access point and the sensor, so the route people actually walk must cross that link. The placement guide's starting points:
- Put the board in the area you want to monitor, about 3 to 8 m from the access point if the layout allows.
- Aim for a Wi-Fi signal of -40 to -70 dBm. Above -40 dBm the board may be too close; below -80 dBm expect noise. Stronger is not always better.
- Keep the antenna end open to the room, away from metal, TVs and electronics. Waveshare also says not to cover the S3-Zero's ceramic antenna.
- Mount it firmly. A board or cable that swings, or something moving nearby like a fan or curtain, causes false motion.
- Avoid metal cabinets, the space behind the TV, and putting the board right next to the router.
If your router is in the wrong corner, two ESPectre boards can measure the link between each other instead, for example across a doorway. Both must be on the same Wi-Fi channel; the docs cover the setup.
Step 4: Calibrate and walk-test
After the board joins Wi-Fi, keep the room still for about half a minute while it calibrates. Lightweight calibration collects about 10 seconds of quiet data and extends it if there is movement, up to about 30 seconds. Then do the project's ten-minute test:
- Watch the empty room for a minute or two. The score should stay low and steady.
- Walk the real routes, including the far side of the room. Waving a hand next to the board is not a real test.
- Walk in the passage and the rooms next door, and run the fans or appliances that are normally on. Note any motion you did not want.
- Change one thing at a time: move or rotate the board, restart it so it calibrates again, and repeat.
Only then touch the threshold, in small steps. There is no universal value; the score is 0 to 1 and depends on your room. Press Recalibrate after rearranging furniture, and restart the board if you move it. If short bursts set it off, raise motion_on_hits (default 4, about one second).
Step 5: Power it from 5 V or 12 V
The simplest option is a decent 5 V USB-C phone charger. Waveshare's FAQ says the S3-Zero needs at least 500 mA at 5 V, and its 5 V pin accepts 3.7 to 6 V. ESPectre's hardware guide adds a useful tip: if readings stay erratic in a good spot, try another power adapter.
If you already have 12 V where you want the sensor, for example from a 12 V DC supply or the 12 V line you run to cameras or LED strips, use a small 12 V to 5 V buck converter:
- Pick one rated comfortably above 500 mA at 5 V.
- If it is adjustable, set it to 5 V with a multimeter before you connect the board.
- Feed the board through a USB-C lead, or solder to the 5 V and GND pads. Do not feed 5 V into the pads and plug in USB at the same time.
- Do not hang it off your alarm panel's auxiliary output unless the panel's manual says it has the spare current. The alarm comes first.
Load shedding note: a sensor on battery-backed 12 V keeps running when the power goes, but it is useless if the router is off, because it needs Wi-Fi traffic. Put the router on backup power too. Our UPS and NUT guide (https://meshnest.co.za/blog/diy-ups-nut-home-assistant-load-shedding) covers that side.
Step 6: Lights that follow you
This automation switches the lounge light on when there is motion after sunset, and off after five minutes without motion. mode: restart means new motion restarts the wait.
alias: "Lounge lights on Wi-Fi motion"
mode: restart
triggers:
- trigger: state
entity_id: binary_sensor.lounge_csi_motion
to: "on"
conditions:
- condition: state
entity_id: sun.sun
state: below_horizon
actions:
- action: light.turn_on
target:
entity_id: light.lounge
- wait_for_trigger:
- trigger: state
entity_id: binary_sensor.lounge_csi_motion
to: "off"
for: "00:05:00"
- action: light.turn_off
target:
entity_id: light.lounge
The ESPHome docs point out that the motion sensor is unknown while the board warms up, calibrates or loses usable CSI, and that unknown does not mean no motion. The triggers above use exact on and off states, so an unknown state will not switch the light by itself.
Step 7: Movement while you are away
If you set up away mode with our presence guide (https://meshnest.co.za/blog/diy-presence-away-mode-home-assistant), the CSI sensor makes a nice extra layer: no camera inside the house, and it can sit in a passage or room the alarm does not cover.
alias: "Movement while we are away"
mode: single
max_exceeded: silent
triggers:
- trigger: state
entity_id: binary_sensor.lounge_csi_motion
to: "on"
for: "00:00:10"
conditions:
- condition: state
entity_id: input_boolean.away_mode
state: "on"
actions:
- action: notify.mobile_app_your_phone
data:
title: "Movement in the lounge"
message: "The Wi-Fi motion sensor picked up movement while away mode is on."
- delay: "00:10:00"
The ten-second delay and the ten-minute pause at the end are our own starting values to avoid a flood of messages, not official numbers. Remember that reflections can carry movement from outside the room, and pets move too, so test before you rely on it.
Troubleshooting
- Motion stays unknown. The board is still calibrating or not getting enough traffic. Add the ESPectre diagnostic sensors; the docs say detection needs at least 70% CSI occupancy.
- Constant false motion. Check for fans, curtains, a swinging cable or a board that is too close to the router. Fix placement before raising the threshold.
- It misses people. The walking route probably does not cross the link. Move the board, or try two boards.
- Mesh Wi-Fi. Pin the board to the strongest access point with bssid in the ESPHome Wi-Fi settings. The board then only connects to that access point.
- Flashing fails. Try another USB cable or port, and hold BOOT while plugging in.
Sources
- ESPectre on GitHub: https://github.com/francescopace/espectre
- ESPectre, Use the component built into ESPHome: https://espectre.dev/guides/esphome/
- ESPectre, Flash and set up your device: https://espectre.dev/guides/setup/
- ESPectre, Choose your hardware: https://espectre.dev/guides/hardware/
- ESPectre, Place your sensor: https://espectre.dev/guides/placement/
- ESPHome, ESPectre Wi-Fi Motion Detection: https://esphome.io/components/espectre/
- ESPHome, ESP32 platform: https://esphome.io/components/esp32/
- Waveshare, ESP32-S3-Zero wiki: https://www.waveshare.com/wiki/ESP32-S3-Zero
- Home Assistant, ESPHome integration: https://www.home-assistant.io/integrations/esphome/
- Home Assistant, Scripts (wait for trigger): https://www.home-assistant.io/docs/scripts/