https://github.com/n0-computer/iroh-smart-fan
A smart fan example project using iroh on ESP32
https://github.com/n0-computer/iroh-smart-fan
Last synced: 18 days ago
JSON representation
A smart fan example project using iroh on ESP32
- Host: GitHub
- URL: https://github.com/n0-computer/iroh-smart-fan
- Owner: n0-computer
- Created: 2026-07-01T09:31:33.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2026-07-01T10:01:01.000Z (18 days ago)
- Last Synced: 2026-07-01T12:04:55.985Z (18 days ago)
- Language: Rust
- Size: 51.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iroh-smart-fan
An [iroh](https://iroh.computer) echo endpoint running on a **PSRAM ESP32**, dialed
from a desktop CLI. Both speak standard QUIC, so a stock desktop iroh and the ESP32 talk to each other over the internet (via an n0 relay) or locally with nothing
in between.
This is the foundation for a smart-fan project; for now it's the smallest thing
worth shipping: **echo**.
## Two crates (deliberately not a workspace)
| crate | what |
|-------|------|
| [`smart-fan-cli/`](smart-fan-cli) | native CLI that dials the ticket and echoes a message |
| [`smart-fan-esp32/`](smart-fan-esp32) | the ESP32 firmware (echo server) |
They can't be one workspace: the firmware needs a different toolchain and a patched
iroh, while the client uses released iroh. Conflicting dependency graphs → two
standalone crates.
## Target boards
Anything ESP32 (Xtensa LX6) **with PSRAM** — e.g. an ESP32-WROVER (4 MiB) or an
M5StickC (2 MiB). PSRAM is what gives the iroh heap room to breathe; the firmware
uses iroh's default buffers, no frugal tuning.
## Quick start
1. **Flash the firmware** (needs the esp Rust toolchain — see [`smart-fan-esp32/`](smart-fan-esp32)):
```bash
cd smart-fan-esp32
WIFI_CONFIG='SSID:PASSWORD' cargo run --release
```
It prints an **endpoint ticket** on the serial console.
2. **Run the client** with that ticket:
```bash
cd smart-fan-cli
cargo run --
```
You should see `Echo OK — iroh <-> ESP32!`.