Skip to content

Embark on a journey of secure access control with our Smart Access Control System. This project seamlessly integrates ESP8266 RFID card detection with a Telegram-based management system. Manage user access, receive notifications, and enhance security effortlessly. Explore the future of IoT-driven access control.

Notifications You must be signed in to change notification settings

lily-osp/SACCET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

SACCET : Smart Access Control System ESP8266 and Telegram Collaboration

Table of Contents

  1. Overview
  2. Usage
  3. Troubleshooting
  4. System Flowchart

1. Overview

The Smart Access Control System project comprises two main components: the ESP8266 code for RFID card detection and server communication, and the Python code for a Telegram-based access control system.

1.1.1 Requirements

  • ESP8266 board
  • MFRC522 RFID reader
  • 16x2 I2C Liquid Crystal Display
  • WiFi connection

1.1.2 Setup

  1. Replace placeholders in the ESP8266 code (your_wifi_ssid, your_wifi_password, your_cloud_server_address) with your WiFi credentials and server details.
  2. Adjust buttonPin, lcd, and rfidReader pin configurations based on your hardware setup.

1.1.3 Functionality

  • Detects RFID cards using the MFRC522 reader.
  • Sends RFID card data and action (enter/exit) to a server via HTTP POST.
  • Displays user messages on the LCD screen based on server responses.
  • Supports turning off the LCD backlight after a specified delay.

1.2.1 Requirements

  • Python environment
  • Flask web framework
  • SQLite database
  • Telegram bot token and chat ID

1.2.2 Setup

  1. Install required Python packages: flask, python-telegram-bot.
  2. Replace your_database.db with the desired SQLite database filename.
  3. Set your_telegram_token and your_chat_id with your Telegram bot credentials.
  4. Run the Python script on a server accessible from the ESP8266.

1.2.3 Functionality

  • Manages user data in an SQLite database (name and RFID card).
  • Uses a Telegram bot to grant or revoke access.
  • Sends notifications to the admin when access is granted or revoked.
  • Provides a list of users with access.

2. Usage

  1. Upload the ESP8266 code to your device.
  2. Run the Python script on your server.
  3. Use Telegram commands (/grant_access, /revoke_access, /list_users) to manage access.

3. Troubleshooting

  • Check the serial monitor for ESP8266 debugging information.
  • Ensure the server is running and accessible.
  • Verify Telegram bot credentials and chat ID.

4. System Flowchart

graph TD
  subgraph cluster_ESP8266
    RFIDCardDetected(RFID Card Detected?)
    ServerResponse(Server Response?)
    LCDMessage(Display LCD Message)
    TurnOffLCD(Turn Off LCD?)
    ServerRequest(Send RFID and Action to Server)
    AccessGranted(Display Welcome Message on LCD)
    AccessDenied(Display Access Denied Message on LCD)
    Loop

    RFIDCardDetected --> |Yes| ServerRequest
    RFIDCardDetected --> |No| Loop

    ServerRequest --> ServerResponse
    ServerRequest --> |Error| Error

    ServerResponse --> |Access Granted| AccessGranted
    ServerResponse --> |Access Denied| AccessDenied

    AccessGranted --> TurnOffLCD
    AccessDenied --> TurnOffLCD

    TurnOffLCD --> |Yes| Loop
    TurnOffLCD --> |No| Loop

    Loop --> RFIDCardDetected
  end

  subgraph cluster_TelegramBot
    UserCommand(User Command Received?)
    DatabaseQuery(Query Database)
    Notification(Send Notification to Admin)
    GrantAccess --> RFIDCheck
    RevokeAccess --> RFIDCheck
    ListUsers --> DatabaseQuery
    RFIDCheck(Check RFID in Database)
    AccessUpdate(Update Access)
    GrantAccess --> Loop
    RevokeAccess --> Loop
    ListUsers --> Loop
    Loop --> UserCommand
  end

  subgraph cluster_Common
    Error(Error Handling)
    Error --> LoopCommon
    LoopCommon --> Error
  end
Loading

About

Embark on a journey of secure access control with our Smart Access Control System. This project seamlessly integrates ESP8266 RFID card detection with a Telegram-based management system. Manage user access, receive notifications, and enhance security effortlessly. Explore the future of IoT-driven access control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published