HOWTO Program a key

From i3Detroit
Jump to: navigation, search

RFID Tags

Our RFID entry system uses EM4100 125khz RFID tags.

Programming new keys

Since April 2020 adding new keys and changing the status of existing ones is handled through a remote interface on McClellan, a server which we administer on site.

The code is at github.com/i3detroit/door-management.

  1. Get a key from where we store them.
  2. Go to one of our doors and swipe it and press enter.
  3. Open a terminal and SSH into mcclellan.
  4. Enter tail /var/log/mqtt-door.log which will show you the list of door swipes. The last row in that output is the key you just swiped. Copy the uuid.
  5. Alternatively, the number printed on the key should be the uuid.
  6. Open the source of truth spreadsheet in the shared drive titled "Membership VP" on Google Drive.
  7. Go to the bottom to the last person's name and make a new row under that. Make sure you make a new row for each new key, if you try to reuse a row by replacing the key ID with a new key ID, it might not actually update.
  8. For the new person who you're making a key for, fill out the appropriate columns with their ID from the CRM ("CID" means CRM ID), their name, and their desired PIN, and paste the key (DEC) number. Optionally, put the spare key number in the comment column.
  9. Export the Google Sheet with File > Download > Comma separated values (csv).
  10. Open a new terminal tab and navigate to your Downloads folder. Copy the spreadsheet CSV to the mcclellan server with this command: scp [whatever your file is named].csv [your username on mcclellan]@10.13.0.26:
  11. To configure the entry system with the CSV file, go back to the terminal tab where you SSH'ed into the mcclellan server and run this command: /opt/door-management/setAccess.js ~/"whatever your file is named.csv" You can add a space and "a" or "b" to the end of the command. The "a" option means "set only the door to A side", "b" means "set only the door to B side", and neither option means to set both.
    • if it stops printing status from one of the doors, (like says it logged in but nothing else, or it parsed page 1 of 19 but no others) reboot that door and try that one again.
      • To reboot a door run (for example b) /opt/door-management/rebootdoor b
      • Then try programming the failed door again /opt/door-management/setAccess.js $yourCSV b