Skip to content

ArnavKakani/HAVEN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HAVEN

An offline-first, mesh-networked wearable for unhoused individuals. It runs on a cheap ESP32-C3, shows nearby shelter and resource info with no internet connection, counts steps, watches for a fall, and calls for help when you hold the button. Built at Milpitas Hacks 2026.

Image Gallery

The HAVEN watch home screen showing steps, battery, and mesh status

The watch showing a fall alert: tap for I'm fine, hold to send SOS

The HAVEN fleet admin dashboard with a live map, heat layer, AI analyst, and watch table

Soldering the watch board under a helping-hands clamp

Close-up of soldering the board with a magnifier

How it Works

The watch is an ESP32-C3 SuperMini with a small OLED, an MPU-6500 accelerometer, a PN532 NFC module, and one button, all packed into a 3D-printed case on a fabric strap. Tap the button to move between screens and hold it to act. You can page through a home screen (steps, battery, mesh status), a live motion readout, a resources screen, a food-stamp screen, an SOS screen, and a host-mode screen. The watch knows which way it's facing, so turning it face-up wakes the screen and face-down powers it off. If the accelerometer sees a sharp drop and then an impact, a fall screen takes over and gives you ten seconds to tap "I'm fine" before it sends an SOS on its own. Steps and falls are both computed in software during the awake window, since this accelerometer has no built-in pedometer.

Shelters were meant to run ESP32 beacons that broadcast bed and meal counts over ESP-NOW, with repeaters flooding those frames farther out. That firmware still builds, and every frame carries an HMAC-SHA256 tag keyed by a shared secret so nobody can forge a resource update or spoof an SOS. For the demo a laptop stands in for the beacon, because ESP-NOW can't reach a computer and a laptop is easy to bring to a table. The node-gateway build joins WiFi and talks to a small Flask server over HTTP: the watch pulls live resource numbers from /beacon, posts an SOS to /sos, and checks in with telemetry every fifteen seconds.

That telemetry feeds a fleet dashboard, the screenshot above. Every watch shows up as a dot on a live map with a heat layer, and an AI analyst called HAVEN-OPS reads the location history to tell staff where people are gathering and where to stage resources before a cold night. It runs on Groq by default, or any OpenAI-compatible endpoint, including a local Ollama model if you want it fully offline. With no hardware around, web/simulate_watches.py drives a couple dozen fake watches so the map and the analyst still have something to chew on.

Running Everything

Two scripts at the repo root do most of the work. ./run-host.sh starts the computer side, and ./flash-gateway.sh flashes the watch and points it back at your machine. Run them in order:

# 1. Computer side: builds a venv, loads keys from web/.env, and starts the
#    server (dashboard + beacon + SOS + telemetry) at http://<your-ip>:8000/
./run-host.sh

# 2. Watch side: prompts for WiFi, detects the serial port and your IP, then
#    builds and flashes node-gateway pointed at the server above
./flash-gateway.sh

# 3. No hardware? Drive a couple dozen fake watches so the map + AI look alive
python web/simulate_watches.py --host http://<your-ip>:8000

# Open the dashboard at http://<your-ip>:8000/  and the wearer app at /fs

To flash the interactive watch build by hand and watch its serial log:

pio run -e node-bench -t upload --upload-port /dev/cu.usbmodem1101
pio device monitor -e node-bench      # run this in your own terminal

Two things to get right: HAVEN_PSK has to match on the server and the firmware or the food-stamp tokens won't verify, and the watch needs a phone hotspot or a shared connection because captive-portal WiFi traps its traffic before it reaches the server.

HARDWARE.md has the full wiring, the parts, and a bench-test checklist.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors