satya@web:
/docs/iiitkota/nfc-main-gate/querying
$
/

πŸ” Querying Entry & Exit Logs

This guide explains how to view the records of who has entered and exited the premises.

πŸ“Ί Real-Time Monitoring

The easiest way to see recent activity is by looking at the Entry Log and Exit Log panels on the main Kiosk screen. These show the last 20 people who tapped their cards.

πŸ“ Historical Data (Old Logs)

The system saves all taps into database files. These files are organized by month and year.

1. Where are the logs kept?

Logs are stored in: /var/lib/iiitk-nfc/databases/

2. Log File Names

  • Entries (IN): in-YYYY-MM.db (e.g., in-2023-10.db for October 2023).
  • Exits (OUT): out-YYYY-MM.db (e.g., out-2023-10.db).
  • System Logs: logs-YYYY-MM.db (Contains internal system messages and warnings).

3. How to read these files

Since these are SQLite databases, you can open them with DB Browser for SQLite to see a spreadsheet-like view of all taps.

Each entry record contains:

  • TIMESTAMP: The exact date and time of the tap.
  • STUDENT_ID: The ID of the person who tapped.
  • CUIDV2: A unique code for each transaction.

πŸ“Š Generating Reports

Currently, reports must be generated by opening the database files and exporting the data to Excel or CSV using a tool like DB Browser for SQLite.

  1. Open the .db file.
  2. Go to File > Export > Table(s) as CSV file…
  3. Select the entries table and save the file.