This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os, sys, requests, json, curses, time, signal, urllib3, subprocess, getopt | |
from filelock import FileLock, Timeout | |
""" Usage: batch_enroll_nfc.py [-h|-r "Reader Name"|-t ["NFC Cards"|"NFC Keyfobs"]] | |
This script opens a card enrollment session with the Unifi Access API on a card reader. As cards are | |
read, they are added to Unifi Access. Multiple cards can be read in a session, each will be assigned | |
a sequential numeric "display_id" by Access. The cards can then be assigned to users at a later date. | |
When all cards have been read, press Ctrl+C to terminate the enrollment session. |