Skip to content

gregsadetsky/recurse-rfid-visits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is this

a project that lets people attending the Recurse Center to sign in by high fiving an octopus with their door fob

272737436-dd08b368-d220-4d54-8d68-a3a9fa558a7b

how does it work

  • an rfid reader is mounted on a plush octopus
  • the rfid reader sends the scanned door tag id over usb to a raspi
  • the raspi pings the main web server (see source code here)
  • the web server responds with audio url(s) to play back. if the door tag is already known, the server signs the person in using the hub visits api
  • the raspi plays the audio file(s) over speakers mounted near the plush octopus

where is the code

  • the oauth/web/UI server is here
  • the hardware raspberry pi code is in this repo

Production environment

We use a raspberry pi that is located at the hub and connected to the network via wifi the pi hostname, ssh credentials, API token and physical location can be found in recurse wiki

Installation

  1. install raspbian on a a raspberry pi
  2. ssh to it and clone this repo
  3. sudo ./install.sh
  4. in install.sh there will be a prompt asking you from the API access token - put it in
    1. in case you configured this key already you can just press [ENTER] and skip this step
  5. ???
  6. profit

Installation notes

be aware that everything runs without a virtualenv and with root permissions

Update / deploy new code

  1. ssh to the running rpi
  2. go to the cloned repo
  3. git pull
  4. sudo ./install.sh
  5. skip the API access token input by pressing enter (unless you need to change it)
  6. that's it! -> the installation process reloads the code and restarts the service and therefore no more actions are needed

why root?

keyboard library requires us to use root in order to read from /dev/input

why without venv?

because we install here a python and launch it from a service it will be harder to do it when there is a virtualenv

how to overcome these problems in the future?

dockerize it. it will solve both problems don't forget to pass the relevant device to the container

Troubleshooting

  1. check the service status: sudo service octopus status
  2. restart the service in case something goes wrongs: sudo service octopus restart
  3. read the logs easily journalctl -u octopus.service if you want to troubleshoot it in live you can use the -f flag to get changes: journalctl -u octopus.service -f
  4. volume is too weak: reinstalling the service adjusts the volume, and this config should be preserved between reboot in case you are concerned with the volume not being on max you can reinstall the service by following the update process to check if it's 100% you can type the following command: sudo amixer one last thing to check - the physical knob at the speaker. you can adjust it if it's too strong / weak

TODO rename project/repos

additional docs

reference

misc

  • there's no way to check out from the hub - except by deleting your hub visit object, as noted by Nick here. we'll probably leave it as is i.e. this (just like V.A.L.E.T. and the ipad) will be a check-in-only system. everyone gets checked out automatically at midnight by the 'Account Sync Bot'
  • what is rfid/nfc/etc.?

contributors

This project was made by 1

Footnotes

  1. EAAFA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published