IoT door lock with open source firmware, 3d models, and web controller
firmware — ESP32 firmware
models — 3D printable parts
web-controller — Go + React web UI
| Part | Notes | Link |
|---|---|---|
| Servo — MG995 Metal Gear | Main actuator for the lock | Amazon |
| ESP32 WROOM-32U | Microcontroller | Amazon |
| M3 screws | Structural fasteners | — |
| M2 tapered screws | PCB/servo mount fasteners | — |
| 10,000 mah Lipo Battery | main power source | Amazon |
| Spark Fun Battery Babysitter | charge module + fuel gauge | SparkFun |
| XL63020 module | Buck Boost module (for esp lipo input) | Amazon |
| wlaniot PCI antenna | U.FL internal antenna module | Amazon |
| (optional) INA219 module | detects high servo current | — |
See firmware/README.md for setup, configuration, and flashing instructions.
Add the flake input and import the module in your flake.nix:
inputs.open-lock.url = "github:canavan-a/open-lock";
outputs = { nixpkgs, open-lock, ... }: {
nixosConfigurations.mymachine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
open-lock.nixosModules.default
{
services."open-lock" = {
enable = true;
httpAddr = ":8080";
mqttPort = 1883;
pollInterval = "2s";
};
}
];
};
};This starts the web controller as a systemd service and manages a local mosquitto broker automatically.
Reference the local path instead of GitHub:
inputs.open-lock.url = "path:/path/to/open-lock";nix build github:canavan-a/open-lock#web-controller
./result/bin/web-controllernix develop github:canavan-a/open-lock
# provides: go, nodejs, mosquitto
