Doorservice opens the door.
As is customary, the lowest ranking member of any office is to open the door when the bell chimes.
As of now, this tradition is no more.
We now live in an era of machines and computers, with the mere press of an oversized button, the door will open itself.
The wait is over, the captives are free. Ne'er again will man obey the chime.
Button pressing is now virtual.
Note: This setup requires a Raspberry Pi, a relay controlled by said Raspberry Pi and for the relay to be connected to the door control.
These packages are required on the Raspberry Pi before you can run scripts/build.sh
.
- Node.js
sudo apt-get install nodejs
- Virtualenv
sudo apt-get install python-virtualenv
- GPIO on the Raspberry Pi
sudo apt-get install python-rpi.gpio
- Clone this repository.
- Run
scripts/build.sh
. - Set all your settings in the
doorservice/settings.py
file. (An example is provided) - Move all the files in the directory onto the Raspberry Pi.
- Set up a server.
scripts/install.sh
. - Run
FLASK_APP=doorservice flask run
.
Now you can access the button by connecting to the server you set up in step 4.
An authentication pop-up should appear, enter your username and password as set
in doorservice/settings.py
.
After successfully authenticating, you should see a large blue button.
Press the button. Go on, press it.
That's it.
If it's green, it means the door should be open. If it's red, it means something went wrong.
Everything is probably working just fine. All the code executed without error.
You aren't authenticated and will be unable to operate the button.
Something went wrong, horribly wrong.