Door Access Pi: Difference between revisions
(Create stub page) |
(Add details) |
||
Line 1: | Line 1: | ||
[[Category:Infrastructure]] | [[Category:Infrastructure]] | ||
The door access Pi interfaces with the Arduino that controls the main entrance door, allowing membership card data to be synced onto it. | |||
== Purpose == | |||
Store a list of valid membership cards and syncs them onto the door access Arduino (documented in [[Marvin P Droid]]). | |||
== Usage/maintenance == | |||
Only committee members may access the door Pi due to it containing membership data. | |||
It is accessible on the network as the DNS entry <code>door-pi.lan</code>. SSH credentials are known by committee. | |||
=== Common Tasks === | |||
==== Edit the list of cards ==== | |||
The cards list is located at <code>/opt/notdoord/cards.dat</code>. Use the text editor of your choice to make changes; be sure to adhere to the file format accurately. | |||
<code> | |||
nano /opt/notdoord/cards.dat | |||
sudo systemctl restart notdoord | |||
</code> | |||
==== Restart the notdoord daemon ==== | |||
Restarting the daemon may fix issues if the door appears to be acting weirdly. | |||
<code> | |||
sudo systemctl restart notdoord | |||
</code> | |||
==== View notdoord's logs ==== | |||
Since notdoord runs as a systemd unit, the logs are available in the journal: | |||
<code> | |||
sudo journalctl -fu notdoord.service | |||
</code> | |||
==== Update notdoord's code ==== | |||
The codebase is checked out as a git repo, so pulling any changes and restarting the daemon should suffice: | |||
<code> | |||
cd /opt/notdoord | |||
git pull | |||
sudo systemctl restart notdoord | |||
</code> | |||
==== Reload systemd after changing the notdoord service definition ==== | |||
This should only be necessary if you modify <code>/etc/systemd/system/notdoord.service</code>; there should be very few reasons why this is necessary. | |||
<code> | |||
sudo systemctl daemon-reload | |||
sudo systemctl restart notdoord | |||
</code> | |||
== Software == | |||
The door Pi is running a Python 3 daemon [https://github.com/leedshackspace/notdoord notdoord] which interfaces with the door Arduino via a USB-to-serial adapter. See the GitHub repo README for more information on how it works. | |||
== Setup == | |||
The Pi is running Raspbian Lite based on Debian Jessie, and just runs the notdoord daemon, the code for which is checked out as a git repo at <code>/opt/notdoord</code>. | |||
The daemon is configured to run by a systemd service, running under the user/group notdoord. The notdoord user has no login shell, a random password, and no other permissions. | |||
The definition of the systemd service is at <code>/etc/systemd/system/notdoord.service</code>. |
Revision as of 18:42, 6 August 2017
The door access Pi interfaces with the Arduino that controls the main entrance door, allowing membership card data to be synced onto it.
Purpose
Store a list of valid membership cards and syncs them onto the door access Arduino (documented in Marvin P Droid).
Usage/maintenance
Only committee members may access the door Pi due to it containing membership data.
It is accessible on the network as the DNS entry door-pi.lan
. SSH credentials are known by committee.
Common Tasks
Edit the list of cards
The cards list is located at /opt/notdoord/cards.dat
. Use the text editor of your choice to make changes; be sure to adhere to the file format accurately.
nano /opt/notdoord/cards.dat
sudo systemctl restart notdoord
Restart the notdoord daemon
Restarting the daemon may fix issues if the door appears to be acting weirdly.
sudo systemctl restart notdoord
View notdoord's logs
Since notdoord runs as a systemd unit, the logs are available in the journal:
sudo journalctl -fu notdoord.service
Update notdoord's code
The codebase is checked out as a git repo, so pulling any changes and restarting the daemon should suffice:
cd /opt/notdoord
git pull
sudo systemctl restart notdoord
Reload systemd after changing the notdoord service definition
This should only be necessary if you modify /etc/systemd/system/notdoord.service
; there should be very few reasons why this is necessary.
sudo systemctl daemon-reload
sudo systemctl restart notdoord
Software
The door Pi is running a Python 3 daemon notdoord which interfaces with the door Arduino via a USB-to-serial adapter. See the GitHub repo README for more information on how it works.
Setup
The Pi is running Raspbian Lite based on Debian Jessie, and just runs the notdoord daemon, the code for which is checked out as a git repo at /opt/notdoord
.
The daemon is configured to run by a systemd service, running under the user/group notdoord. The notdoord user has no login shell, a random password, and no other permissions.
The definition of the systemd service is at /etc/systemd/system/notdoord.service
.