Skip to content

Repository files navigation

Open Lock

IoT door lock with open source firmware, 3d models, and web controller

Open Lock Open Lock

firmware — ESP32 firmware

models — 3D printable parts

web-controller — Go + React web UI

Hardware

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

Firmware

See firmware/README.md for setup, configuration, and flashing instructions.

Nix

NixOS module (recommended)

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.

Local development

Reference the local path instead of GitHub:

inputs.open-lock.url = "path:/path/to/open-lock";

Run using dev shells

nix build github:canavan-a/open-lock#web-controller
./result/bin/web-controller

Dev shell

nix develop github:canavan-a/open-lock
# provides: go, nodejs, mosquitto

About

3d printable IoT deadbolt lock

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages