I taught my Wi-Fi to watch over my grandmother (no cameras), built with Kiro for Kiroween 2026

2026-12-02来源 dev.toEnglish
I taught my Wi-Fi to watch over my grandmother (no cameras), built with Kiro for Kiroween 2026

I wrote this post as part of the Kiroween 2026 hackathon. My entry, Poltergeist: Grandma Ghost, is in the Costume Contest category.

My grandmother, Ba, is in 80s, and her memory isn't what it used to be. Recently she collapsed in the washroom, and the cameras we had set up for her safety saw nothing, because no family would put a camera in a washroom or a bedroom. That blind spot is exactly what worries families like mine. So I went looking for a way to watch over Ba without watching her, and found it in the Wi-Fi signals already filling her room.

Many elders are alone at home for most of the day while the family is at work. If one of them falls, nobody may know for hours.

So I started with a proof of concept that measured Wi-Fi packets between the router and an ESP32. Then I found ESP-NOW, which let the boards talk directly to each other with no router at all. That made the design clutter free and accurate enough for exactly the rooms cameras can't go: bedrooms and washroom.

The fall alert in the public replay demo

How a room can "feel" you through Wi-Fi

A Wi-Fi frame is spread over dozens of small frequencies called subcarriers. When it crosses a room, the walls, the furniture and your body reflect and absorb each subcarrier a little differently. Wi-Fi chips measure this so they can decode the frame, and the ESP32 will hand you those measurements: the channel state information, or CSI.

In an empty room the CSI is steady. When someone walks between two boards, it starts to shake. That shaking is all I measure. I never see an image, a shape or a face.

The hardware

The ESP32 boards

Four cheap ESP32 boards sit in the corners of the room. Every 30 ms each board sends a one-byte ESP-NOW broadcast, and the other three measure its CSI. That makes 12 links criss-crossing the room. The boards send their readings over the home Wi-Fi to a small Python hub on a laptop.

For each link the hub computes a motion score: the variance of CSI amplitudes across subcarriers, compared with that link's empty-room baseline. Before a session I "exorcise the room": 60 seconds of calibration with nobody inside. A link above its baseline by more than the threshold counts as disturbed.

A fall is not a special signal. It is a pattern over time, and the whole rule fits in a few lines of config:

motion_threshold = 0.17 # how much a link must shake to count as disturbed fall_burst_secs = 0.5 # at least this long of strong motion... fall_links_min = 2 # ...on at least two links at once fall_still_secs = 10.0 # then this long of stillness: "possible fall" fall_confirm_secs = 15.0 # and this much more: "fall", Telegram goes out 

No trained model. Every number is a threshold you can read, argue with and tune.

A haunted room where the alarm is never spooky

The Costume Contest asks for a haunting interface, so the room is a dark 3D floor plan. A pale wisp floats where the person is. Glowing threads between the four lanterns ripple on the links the person disturbs. Every event is engraved on a tombstone.

I set one rule early: the room can be creepy, but the alarm must always be the clearest thing on the screen. On a fall, the wisp drops to the floor, the screen pulses red, the ambient drone cuts to silence and a siren plays. A big banner says "Ba has fallen · 0:12 ago" ("Ba" is Gujarati for grandmother) with an "I'm on my way" button. The family gets a Telegram message.

How Kiro shaped the build

I built the product in the Kiro IDE over 16 agent sessions between Nov 20 and Nov 30. Everything is in the repo's .kiro/ folder. Here are the four moments where Kiro changed how I worked, not just how fast.

1. Steering: the mistake I only made once

My ESP32 boards have a nasty habit. Open a serial port with DTR or RTS asserted and the board sits in reset, silent, looking dead. Worse, Windows gives a board a different COM port number when you move it to another USB socket. I wrote two lines into .kiro/steering/tech.md:

- Always open serial ports with **DTR=False and RTS=False**. Asserting either line holds these boards in reset. - Never identify a board by its COM port number. COM ports change when the USB socket changes. Use the MAC address printed on boot. 

Steering files are read in every session. No later session repeated either mistake, including the flashing tool and the debug scripts Kiro wrote afterwards. A privacy steering file did the same for "raw CSI never leaves the hub": every new feature, from the public demo to the Telegram message, carried only scores and event text.

2. Specs for structure, chat for taste

The firmware, the signal pipeline, the state machine and the app each got a spec. The haunted UI had full requirements, design and tasks, and I ran the tasks one at a time with a review after each. Specs made "done" checkable: each acceptance criterion is something I could test.

Visual polish was different. "Make the room look realistic" is not an acceptance criterion, so I did those as chat requests. Afterwards I asked Kiro to fold the changes back into the spec as an amendment. The spec still describes what is actually built, which matters when the next session reads it.

3. A hook that guards the one thing that must not break

The scariest change in this project is a threshold tweak. Raise motion_threshold a little to silence the ceiling fan, and you might stop seeing falls. So a hook replays every labelled recording (empty room, walking, sitting, a fall, the fan) whenever I save anything in core/:

{ "name": "Replay regression on core/ save", "trigger": "PostFileSave", "matcher": "core/", "action": { "type": "command", "command": "uv run --with pytest --with numpy python -m pytest core/tests/test_state.py -x -q --tb=short" } } 

I watched it go red on a bad threshold and green again when I put the value back. After that, tuning stopped being risky.

4. MCP: asking the room questions from chat

I wrote an MCP server, the "spirit box", with five tools: get_live_stats, list_recordings, replay, get_thresholds and set_thresholds. With the hub running, I can ask Kiro "what does the spirit box see right now?" and get an answer from the live boards. One evening the answer was: live hub, room empty, all 12 links reporting, scores between 0.03 and 0.09, well under the 0.17 threshold. It also noticed the room was not calibrated yet. The log also showed a fall-and-acknowledge sequence from a few minutes earlier, and Kiro pointed out that uncalibrated links could produce false alarms.

Before this, checking the detector meant reading log files. Now it is a conversation.

On top of the server sit two more Kiro pieces. ghost-hunter is a custom agent that can read and run tests but cannot edit files, so asking it "did anything break?" can never change a threshold by accident. A Kiro power bundles two skills: read-the-room explains the live view in plain words, and tune-thresholds changes one value at a time and restores the old value if a fall would be missed.

The first time I ran ghost-hunter, it ran all 36 tests and replayed the five recordings: fall caught, no false alarm from the fan. It also told me two things I had not written down, which brings me to the honest part.

What it can't do yet

  • Standing still mid-walk looks like a fall. In the walking recording, long standing pauses raise two short "possible fall" alerts that clear on their own. That's why walking is not in the public demo.
  • Sitting very still can look like an empty room. The sitting recording never reaches "present". That matters for the inactivity alert, which needs to know someone is there.
  • One room, one person, tested by me. All recordings come from my own test room. Different rooms and bodies will need different thresholds, which is exactly why they are in a config file and tunable from chat.
  • The public replay stops at "possible fall". The recorded fall is shorter than the confirmation window. The confirmed alert and the Telegram message happen on the live hub, as in the video.

Privacy and consent

Raw CSI never leaves the hub. The screen and Telegram get only scores, room states and event text such as "Fall detected near bed, 14:02". The hub refuses Live mode and calibration until the page records that the person being monitored has agreed, and withdrawing consent stops monitoring at once. The public demo holds only derived scores and events from my own test recordings.

What I'd tell you if you build hardware with Kiro

  • Put every physical gotcha in steering the day you hit it. The hardware never changes its mind, and steering means no future session has to rediscover the same mistake.
  • Write a hook for the one behaviour that must never break. For me it was "never miss a fall". It made every other change cheap.
  • Give the agent eyes on the running system. A small MCP server turned "edit config, rerun, squint at logs" into asking a question.

Try it

Open the demo, let the fall recording play and watch the alert appear: https://sachin-uvera.github.io/poltergeist-wifi/

The code, specs, hooks, steering and the spirit-box MCP server are at https://github.com/sachin-uvera/poltergeist-wifi.

原文:https://www.a8q9.cn/en/article/i-taught-my-wi-fi-to-watch-over-my-grandmother-no-cameras-built-with-kiro-for-ki-15ef92.html

相关文章