Mobile-first HTML/CSS/JS that talks straight to my MQTT broker over WebSockets. No app store, no account, no vendor lock-in — pin it to the phone home screen and it behaves like a native app.
↳ mqtt.js over WSS · TLS · dm mono throughout
Commercial smart locks have three problems: they phone home, they brick on low battery in a way that locks you out instead of leaving you a manual option, and their radios are mostly undocumented. I wanted the opposite — a lock that defaults to safe, that I can inspect, and that keeps working when the internet doesn’t.
Constraints were self-imposed:
Two physical devices, two radios, one broker. Command flows down; status flows up; everything else sleeps.
Enclosure · exterior
Cutaway · servo + bevel drivetrain
PCB · assembled board (rev 1)
PCB · 2D layout (top + bottom)
Perfboard worked for the prototype but the door unit carries ten signal lines plus a power loop with servo current spikes. Trace placement matters — a noisy ground at the wrong moment resets the ESP32 mid-actuation. A real PCB collapses that whole class of bugs.
Designed in EasyEDA, fabricated through JLCPCB. Two-layer board, signal traces on top, solid GND pour on bottom.
| QTY | PART | ROLE | EST. $ |
|---|---|---|---|
| 1 | Heltec WiFi LoRa 32 V3ESP32-S3 · SX1262 · WALL UNIT | Always-on MQTT⇄LoRa bridge | $22.00 |
| 1 | ESP32 DevKitCWROOM-32 · DOOR UNIT MCU | Deep-sleep controller on the door | $7.50 |
| 1 | RFM95 / SX1276 module868/915 MHz LoRa · DOOR UNIT | LoRa transceiver for door unit | $9.00 |
| 1 | 20 kg·cm digital servoDS3225 / DS3218 class · METAL GEAR | Turns the deadbolt latch | $14.00 |
| 2 | Roller-lever limit switchSPDT · 5 A · MICROSWITCH | Confirms latch position | $2.40 |
| 1 | Logic-level N-ch MOSFETIRLZ44N · LOW-SIDE GATE | Cuts servo power between moves | $0.80 |
| 1 | 4×AA battery holderWITH ON/OFF SWITCH | Door unit power | $2.50 |
| 1 | 3D-printed housing · door + wallPETG · CUSTOM ENCLOSURE | Everything mechanical | ~$4.00 |
| — | Screws, wires, headersM3 fasteners · jumper wire · misc | Glue | ~$2.00 |
| TOTAL (± $5 depending on where you shop) | ≈ $61.70 | ||
Pick both radios from the same silicon family up front. Heltec was convenient for the wall unit but the SX1262/SX1276 mismatch cost me a week of firmware debugging before the link came up.
Do the power measurements before the mechanical design. I moved the battery holder twice because my first sleep-current numbers were wrong by an order of magnitude.
Design the mechanical override first, before any electronics. A smart lock that can’t be opened by hand is just an expensive paperweight the first time firmware crashes.