I'm revisiting this old topic that I got started on a long time ago but had set aside.
Back then I had the Motes reading the key cards and sending the card id to the gateway just fine. The Mote pretty easily interacts with RFID shields using I2C, reads cards and sends the data to the gateway.
The problem I had back then was figuring out how to get the gateway to properly react to the various card IDs. I was hacking away at metrics files but it never seemed like a great fit for the job.
Hence, I set the project aside.
Now I am revisiting it again.. for another project I had created a sms_gateway side-app that would interact with SMS messages through Twilio and let users send sms commands to the gateway for actioning. It was basically a side-loaded app that made socket connections to the real gateway and listened for metrics and sometimes send commands through the socket.
This scenario is very similar. I could quickly replicate the side-loaded app that listens for RFID metrics. I could use this side-load app to have a nedb database of valid card IDs and do a quick lookup. Depending on the result I can send a command back to the gateway to open the door or not. I could also use one of the quick web-ui for the database file to add or delete card ids to manage which cards are enabled.
I'll post the results here shortly.
Plan -
- create a basic RFID UID metric that is just a textified 7 byte hex id.
- use the same sms_gateway framework to build a side-load app that connect to the gateway and listens for RFID metrics.
- In that side-load app, lookup each RFID UID in the nedb and either deny or
- for valid cards, send back a command to the gateway to open the door
- use one of the nedb or mongodb web ui tools to manage the list of valid cards.