Skip to content

RavingSmurfGB/Lock

Repository files navigation

PiLock

This project is designed to be a smart lock that can be opened via NFC.

  • The status of this project is unknown and unfinished

Installation:

  1. Ensure to enable SPI interface via
    1. Entering sudo raspi-config
    2. Select option 5 Interfacing Options
    3. Then enable P4 SPI
  2. Install any requirements via pip3 install -r requirements.txt

Wiring Diagram:

Raspberry Pi Pinout:

Installing a Service:

Create the dervice file by typing sudo nano /etc/systemd/system/lock.service Enter the following: (be sure to change the directories if needed)

[Unit]
Description=Lock Service
After=multi-user.target

[Service]
User=pi
Group=pi
Type=simple
WorkingDirectory=/home/pi/Lock/
ExecStart=/usr/bin/python3 /home/pi/Lock/nfc.py

[Install]
WantedBy=multi-user.target

Other Info:

nfc.py is the main program while importing motor controls from lock.py

Logs will enter in to the same directory as the repro as DoorLock.log

For redundancy reasons once the device has lost power and is in a locked state, on next run it will unlock.

If you would like a simple command to alternate the lock, then simply type this in to a terminal and when "lock" is written it will alternate the lock echo "alias lock='cd /home/pi/Lock && python3 /home/pi/Lock/alternate_lock.py && cd -' " >> ~/.bashrc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages