My goal is to have a RFID card reader which could log card IDs and time stamps, do couple verification steps once card is read, sync data with back end database.
Back-end should have a Web app to review, parse add/edit data, calculate time spent for each card.
----------- Equipment -----------
- Raspberry Pi 3, currently running jessie, if required could be changed to other distro.
- RC522 card reader - [url removed, login to view] Reader already connected to a raspberry and is able to read the cards - python based script.
- Few LEDs and a buzzer ([url removed, login to view]), already connected and triggered by python script module.
- Back-end server. I will be able to provide a VM with desired OS to host a database (MySQL, MSSQL or any other desired) and the website.
----------- Programming details-----------
Once raspberry boots up it starts a script which waits for cards;
Once card is detected - unique ID is read (uid - etc: [6, 186, 170, 133, 147] ) verification executed.
1.1. if uid is known; Check against ID list which was defined in database earlier;
1.2. check if card was logged before on the same device, assign state value (IN or OUT) opposite to latest entry (Boolean value will work here).
1.3 if above checks success - log stamp - uid, timestamp, state, device name.
Submit logged entries to back-end.
Raspberry should be able to operate with out internet for couple of days and sync data afterwards.
#Comment. I was experimenting with local .txt files for storing known id list, in/out table and log (have coded those parts successfully separately , but i'm not able to perform verification successfully in one script loop pass in python.). Thinking about local MySQL instance on a raspberry to store that data and do another script to sync local MySQL to back end MySQL. Pull known IDlist table and push Log.
Database plan: (can be changed if required)
Back-end database will be running on a VM will have few tables such as:
uid, cardnumber, card_owner, active;
uid; date; time; state; device;
Web app requirements:
To a be able to assign values to certain uid, such as card owner name, card number, set card as active, etc.
To pull report for time spent in last 1 day, 7 days, 1 month and so on, query based on specific card or specific device which collected the data or overall.
Edit certain entries in datalog table if required if those does not make sense.
I will be able to provide direct access to the raspberry via ssh with all components connected and to the VM on the same Vlan.
I'm looking for a person who has competence to code all above or in parts.
Part 1. Rasberrypi reader with database
Part 2. Web app.
PM for more details.