This is what the yellow LED was always intended to be, and I think
making this change helps simplify the code.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
I can easily cut out a function call to verify / validate keys. I also
added in a check for if the key is alphanumeric, to cut down on
exceptions caused by garbage data.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
We're getting a "bad request" error, but it's not clear how that request
is bad. Let's add this message to the log, and also clean up the code
to generate the request.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
We're printing "No tag read" many, many, MANY times each second to the
log. Let's cut back a bit to make debugging easier.
We should also print when we're clearing the cache in case we need to
find that in the logs later.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Rather than processing the entire list at once, handle each key one at a
time to give priority to incoming scans.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Right now we cache keys until the server tells us that the key is
invalid. This might be a problem, because a newly invalid key will
be allowed entry the first time it is scanned.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
- Move blink_leds() to be next to other LED handling code
- read_rfid() should handle exceptions
- Rename main() -> loop()
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This file contains configuration data for the door controllers that way
the script doesn't need to be changed on every new device.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>