ESP8266IoT Projects

RFID Based Attendance System Using NodeMCU with PHP Web App

Overview

The RFID based attendance system is developed using PHP, CSS, and Javascript. An RFID Based Attendance System Using NodeMCU is a modern attendance system. Hence, is a very interesting project. It can be useful in different places like schools, Colleges, industry and private organizations to register the attendance of students, teachers, employees, etc. to tabulate monthly/daily working hours automatically. When the person with the correct RFID card swipes his/her RFID tag, His/Her arrival time will be stored in system Log. Usually, when the same person swipes his/her RFID tag again, the system will save it as his/her leaving time. 

RFID Based Attendance System Using NodeMCU with PHP web app
RFID Based Attendance System Using NodeMCU with PHP Web App

The RFID attendance system is developed with the IoT platform. We have used NodeMCU ESP8266 development board with MF-RC522 Module to send the card UID to the PHP Web app and store data into the website database. Basically, the admin plays an important role in the management of this system.

Also Read: IoT based RFID Attendance System Using ESP32, OLED Display, and RFID Module

Features:

-Secured Login System
-Admin Panel
-User Entry Log
-User Management System
-Multiple Device Management System
-Filter the Log Data by Date, Time-In, Time-Out, and Department
-Export those filtered data to Excel

Functionality Performed by users

Now, talking about the features of the RFID based attendance system using NodeMCU.The home page displays the admin login page. Unless You login to the system, you won’t be able to browse other available options. Hence the system is secured. Basically, the design of the RFID attendance system project is pretty simple. Hence the user won’t find any difficulties while enrolling his/her attendance. The user needs to swipe his/her card or a keychain to maintain attendance that includes the entry time as well. The major functions provided to admin are mentioned below:

RFID Based Attenance System Using NodeMCU
Admin Panel Login System
  • Admin Login/Logout System 
  • Forgot Password for admin
  • Edit and Update admin profile
RFID Based Attenance System Using NodeMCU Admin account reset
Reset Admin Account Password

Manage Users

RFID Based Attenance System Using NodeMCU Users
View and Manage Users
  • View users
  • Add New User
  • Edit and update the existing users
  • Remove Users
Manages Users for RFID Based Attenance System Using NodeMCU
User Management System

From the admin panel, the admin can enroll new users, update and remove users from the user management system. Further, the admin can view all the attendance records.

User Manager on RFID Based Attenance System Using NodeMCU
Enroll New Users/Update/Remove

Manage Device

RFID based Device Management System
Device Management System
  • Add new device
  • Update existing device
  • Delete device
  • Update New token to the device
  • Change the device mode (Enrollment mode: to register new users to the system, Attendance Mode: To record attendance of registered users)
Add New RFID Scanner Device
Add New RFID Scanner Device

Actually, from the devices section admin can add a new device, update the device, and remove the device. To add a new device you need to enter a device name and its department. Furthermore, you can also update the device token from the device UID Section.

View Users Log

View Users log on RFID Based Attenance System Using NodeMCU
View Users log on RFID Based Attenance System

From the user log menu, you can navigate to all the user’s logs data. You can view their arrival and Leaving time as well. Furthermore, It has more functions to filter your logs by user, date, arrival time, leaving time, and filter by different departments, etc. Hence, you can also export those data to excel. 

Filter Users Log on RFID Based Attenance
Filter Users Log to export

Hardware Components Required

S.NComponents NameDescriptionQuantityGet Products from Amazon
1NodeMCUESP8266 12E Board1https://amzn.to/3mTuL95
2RFID ModuleRFID-RC522 Module1https://amzn.to/3pOPpb4
3Jumper WiresMale to Male Jumper Wires4https://amzn.to/2JWSR44
4BreadboardSolderless Breadboard MIni1https://amzn.to/3n33uRT

Technology Used in RFID attendance System Using NodeMCU

Here we are listing all the major required software components for this project to develop the user interface.

  1. Embedded C: All the hardware interface coding has been done in embedded C Language.
  2. PHP: All the Logics and web interface is written in PHP Language.
  3. MYSQL: For database, MYSQL Database is used.
  4. Apache 2: To run the web interface over the Apache 2 server.
  5. Javascript and CSS: To Style web Interface with animation and validate the form.

RFID Based Attendance System Network Topology

This is the simple network topology designed to run this project over a Local Area Network. The Project Device and Computer server are connected to the same network through WiFi. 

RFID Based Attendance System Network Topology
RFID Based Attendance System Network Topology

Now before getting started with this project, let’s learn What is RFID? with its specifications and Features.

RFID RC522 Module

What is RFID RC522 Module?

At first, let’s learn a little bit about RFID. RFID is the short form of Radio Frequency Identification. RFID modules use electromagnetic fields for transferring data between the card and the reader. Different RFID tags are attached to objects like Keychain, cards, etc. and whenever we place that object in front of the RFID reader, the reader reads that tags. The next benefit of RFID is that it doesn’t require to be in a straight line to get detected. Unlike a barcode, in RFID there’s no such restriction. So, here are some features of RFID RC522.

Interface RFID to PHP & MySQL Database with NodeMcu ESP8266
RFID MF-RC522 Module

Features:

– Module Name: MF522-ED
– Working current:13—26mA/ DC 3.3V
– Standby current:10-13mA/DC 3.3V
– Sleeping current:<80uA
– Peak current:<30mA
– Working frequency:13.56MHz
– Card reading distance :0~60mm(mifare1 card)
– Protocol:SPI
– Data communication speed:Maximum 10Mbit/s
– Card types supported:mifare1 S50、mifare1 S70、 Mifare UltraLight、mifare Pro、 Mifare Desfire
– Dimension:40mm×60mm
– Working temperature:-20—80 degree
– Storage temperature:-40—85 degree
– Humidity:relevant humidity 5%—95%
– Max SPI speed: 10Mbit/s

Specifications & Pin Details

The simple specifications of RC522 module from left to right first pins are as follows:

Pin Name Details
1. 3.3V +3.3V Power Supply
2. RST Reset
3. GND Ground Pin
4. IRO Not Connected
5. MISO Serial Communication
6. MOSI Serial Communication
7. SCK TX/RX with ESP8266
8. SDA TX/RX with ESP8266
Connect RFID to PHP & MySQL Database with NodeMcu ESP8266
NodeMcu ESP8266 Pinouts

Interfacing RFID RC522 with NodeMcu ESP8266 Module

NodeMCU ESP8266/ESP12E RFID MFRC522 / RC522

D2 <———-> SDA/SS

D5 <———-> SCK

D7 <———-> MOSI

D6 <———-> MISO

GND <———-> GND

D1 <———-> RST

3V/3V3 <———-> 3.3V

Connect RFID to PHP & MySQL Database with NodeMcu ESP8266
Interfacing RFID RC522 with NodeMcu ESP8266 Module

How to run a server?

Actually, we can Deploy this PHP Web App on Hosting Server as well. But, you will need Public IP from Your Broadband connections to send data to the hosting server.

However, we are using the XAMPP server. It can be used both in Windows and Linux. Basically, Ubuntu users can use LAMP it’s better than XAMPP. But, I am using Windows so I am going to use the XAMPP server. So you can download the XAMPP server from this link.

Deploying our PHP Web App

  • Start your Mysql and Apache from XAMPP Control Panel.
Xampp server for windows
  • Download the PHP web app and the Arduino IDE Program code.
  • Extract the file.
  • Copy the rfidattendance folder (Main Project folder).
  • Paste the folder in C:\>xampp/htdocs/ folder.

Now let’s connect the database to the RFID attendance system.

Database
  • Create a database name “rfidattendance” and then click on the import tab.
create rfidattendance database
  • Click on the browse file and then choose the “rfidattendance.sql” file located inside the rfidattendance folder.
select rfidattendance sql file
  • Click on Go.

After creating a database, open a browser and go to the URL “http://localhost/rfidattenddance/”. Now, the admin login panel will be displayed.

RFID Based Attenance System Using NodeMCU
Admin Panel Login System
  • Enter the admin email and password to enter the system.
  • The default admin credentials is: email= [email protected], and password= 123.

Setting Up Arduino IDE for NodeMCU ESP8266

We need to add the esp8266 board to our Arduino IDE. Open up your IDE then go to “File -> Preferences” or simply hit “Ctrl + comma”.

Connect NodeMcu ESP8266

Paste http://arduino.esp8266.com/stable/package_esp8266com_index.json in additional board manager URLs. 

Go to “Tools -> Board -> Boards Manager” search and install esp8266.

Connect RFID to NodeMcu ESP8266

Selecting Port and Board

Go to Tools -> Port and select the COM Port of your NodeMCU. If you are not sure what port your NodeMcu is plugged in, go to Device Manager -> Ports (COM & LPT).

selecting esp8266 board and COM Port

Now select NodeMcu 1.0 (ESP-12E Module) by clicking Tools -> Board. Scroll down until you find it.

Install the MFRC522 library to your Arduino Libraries folder – Download RFID Library

Program/Sketch Code

//*******************************libraries********************************
//RFID-----------------------------
#include <SPI.h>
#include <MFRC522.h>
//NodeMCU--------------------------
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
//************************************************************************
#define SS_PIN  D2  //D2
#define RST_PIN D1  //D1
//************************************************************************
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
//************************************************************************
/* Set these to your desired credentials. */
const char *ssid = "Alsan Air WiFi 4";
const char *password = "[email protected]";
const char* device_token  = "2c4f3c61aa79d533";
//************************************************************************
String URL = "http://192.168.1.8/rfidattendance/getdata.php"; //computer IP or the server domain
String getData, Link;
String OldCardID = "";
unsigned long previousMillis = 0;
//************************************************************************
void setup() {
  delay(1000);
  Serial.begin(115200);
  SPI.begin();  // Init SPI bus
  mfrc522.PCD_Init(); // Init MFRC522 card
  //---------------------------------------------
  connectToWiFi();
}
//************************************************************************
void loop() {
  //check if there's a connection to Wi-Fi or not
  if(!WiFi.isConnected()){
    connectToWiFi();    //Retry to connect to Wi-Fi
  }
  //---------------------------------------------
  if (millis() - previousMillis >= 15000) {
    previousMillis = millis();
    OldCardID="";
  }
  delay(50);
  //---------------------------------------------
  //look for new card
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;//got to start of loop if there is no card present
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;//if read card serial(0) returns 1, the uid struct contians the ID of the read card.
  }
  String CardID ="";
  for (byte i = 0; i < mfrc522.uid.size; i++) {
    CardID += mfrc522.uid.uidByte[i];
  }
  //---------------------------------------------
  if( CardID == OldCardID ){
    return;
  }
  else{
    OldCardID = CardID;
  }
  //---------------------------------------------
//  Serial.println(CardID);
  SendCardID(CardID);
  delay(1000);
}
//************send the Card UID to the website*************
void SendCardID( String Card_uid ){
  Serial.println("Sending the Card ID");
  if(WiFi.isConnected()){
    HTTPClient http;    //Declare object of class HTTPClient
    //GET Data
    getData = "?card_uid=" + String(Card_uid) + "&device_token=" + String(device_token); // Add the Card ID to the GET array in order to send it
    //GET methode
    Link = URL + getData;
    http.begin(Link); //initiate HTTP request   //Specify content-type header
    
    int httpCode = http.GET();   //Send the request
    String payload = http.getString();    //Get the response payload

//    Serial.println(Link);   //Print HTTP return code
    Serial.println(httpCode);   //Print HTTP return code
    Serial.println(Card_uid);     //Print Card ID
    Serial.println(payload);    //Print request response payload

    if (httpCode == 200) {
      if (payload.substring(0, 5) == "login") {
        String user_name = payload.substring(5);
    //  Serial.println(user_name);

      }
      else if (payload.substring(0, 6) == "logout") {
        String user_name = payload.substring(6);
    //  Serial.println(user_name);
        
      }
      else if (payload == "succesful") {

      }
      else if (payload == "available") {

      }
      delay(100);
      http.end();  //Close connection
    }
  }
}
//********************connect to the WiFi******************
void connectToWiFi(){
    WiFi.mode(WIFI_OFF);        //Prevents reconnection issue (taking too long to connect)
    delay(1000);
    WiFi.mode(WIFI_STA);
    Serial.print("Connecting to ");
    Serial.println(ssid);
    WiFi.begin(ssid, password);
    
    while (WiFi.status() != WL_CONNECTED) {
      delay(500);
      Serial.print(".");
    }
    Serial.println("");
    Serial.println("Connected");
  
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());  //IP address assigned to your ESP
    
    delay(1000);
}
//=======================================================================

Program Code Explanation

Include RFID Library

#include <SPI.h>
#include <MFRC522.h>

Include NodeMCU ESP8266 Library files.

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

Define RFID MF-RC522 Module Pin.

#define SS_PIN  D2  //D2
#define RST_PIN D1  //D1

Create MFRC522 instance.

MFRC522 mfrc522(SS_PIN, RST_PIN);

Set your desired WiFi credentials.

const char *ssid = "Alsan Air WiFi 4";
const char *password = "[email protected]";

Copy the Device token from devices section and paste it over here.

const char* device_token  = "2c4f3c61aa79d533";

Place your computer IP or the server domain.

String URL = "http://192.168.1.8/rfidattendance/getdata.php";

Init SPI bus and MFRC522 card

SPI.begin(); 
mfrc522.PCD_Init();

check if there’s a connection to Wi-Fi or not.

if(!WiFi.isConnected())
  

Retry to connect to Wi-Fi

 connectToWiFi();

look for new card

if ( ! mfrc522.PICC_IsNewCardPresent()) {

go to start of loop if there is no card present

if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;

Select one of the cards. If read card serial(0) returns 1, the UID struct contains the ID of the read card.

if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;

Send the Card UID to the website.

void SendCardID( String Card_uid ){
  Serial.println("Sending the Card ID");
  if(WiFi.isConnected()){
    HTTPClient http;    //Declare object of class HTTPClient
    //GET Data
    getData = "?card_uid=" + String(Card_uid) + "&device_token=" + String(device_token); // Add the Card ID to the GET array in order to send it
    //GET methode
    Link = URL + getData;
    http.begin(Link); //initiate HTTP request   //Specify content-type header
    
    int httpCode = http.GET();   //Send the request
    String payload = http.getString();    //Get the response payload

//    Serial.println(Link);   //Print HTTP return code
    Serial.println(httpCode);   //Print HTTP return code
    Serial.println(Card_uid);     //Print Card ID
    Serial.println(payload);    //Print request response payload

    if (httpCode == 200) {
      if (payload.substring(0, 5) == "login") {
        String user_name = payload.substring(5);
    //  Serial.println(user_name);

      }
      else if (payload.substring(0, 6) == "logout") {
        String user_name = payload.substring(6);
    //  Serial.println(user_name);
        
      }
      else if (payload == "succesful") {

      }
      else if (payload == "available") {

      }
      delay(100);
      http.end();  //Close connection
    }
  }
}

connect to the WiFi

void connectToWiFi(){
    WiFi.mode(WIFI_OFF);        //Prevents reconnection issue (taking too long to connect)
    delay(1000);
    WiFi.mode(WIFI_STA);
    Serial.print("Connecting to ");
    Serial.println(ssid);
    WiFi.begin(ssid, password);
    
    while (WiFi.status() != WL_CONNECTED) {
      delay(500);
      Serial.print(".");
    }
    Serial.println("");
    Serial.println("Connected");
  
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());  //IP address assigned to your ESP
    
    delay(1000);
}

Video Tutorial of RFID Based Attendance System


Thank You so much Electronics Tech Channel for this awesome Project. Please help him to grow his channel. Your one subscribe can motivate him to create more projects like this on future.

Conclusion

Finally, we have completed the RFID based Attendance system using NodeMCU with a Website and Database. We hope you found this project useful! Drop a comment below if you have any doubts or queries. We’ll do our best to answer your questions

Alsan Parajuli

I am a WordPress enthusiast, a hardworking and highly positive person. I always believes in practicality rather than theoretical knowledge. With my curiosity and fast learning skills, I managed to learn everything on my own. I love coding, editing, writing and rummaging around Internet. I am passionate about IoT Projects, Digital marketing, website designing, and reviewing. Moreover, I had been contributing to WordPress Biratnagar as an active member since 2018.

Related Articles

147 Comments

  1. Hi I ran everything as described in the guide but, when I pass the rfid card in front of the reader the code is not transmitted to the ‘getdata.php’ script I tried multiple strings in ‘string url’ but without success (wireshark sees the transmission and the answer ), I have no more ideas, thanks

    1. RFID is SPI module sometimes loose connection to the NodeMCU cause the Problem. Next Thing Make sure you have updated your IPV4 address in the code. Try Running Some RFID example code in Arduino IDE. To make sure your RFID don’t have any hardware issue.

      1. Hi Alsan, I tried with another rfid reader connected to a wemos D1 R1 but I get the same result on screen I don’t see any card code, but with wireshark I see that as soon as I pass the card on the reader there is a transmission to the ip of the machine server, I think ipv4 is right, I tried both with http://192.168.1.60/getdata.php and with ddns address and port but nothing happens, should I read the card code in serial mode or not? thanks for assistance

          1. hi Alsan, I have disabled the windows firewall but I don’t get any results, I have also installed rfidattendance on debian buster (lampp) but also the graphical interface does not receive the card_uid, sorry if I steal your time.

          2. I have tested it with NodeMCU V3 and ESP32 board. It’s working fine. It would be great if I can help you out. Due to lockdown my all testing equipment are left at hostel room. If I had one i would test it and figure out the actual issue.

  2. hi Alsan, I have disabled the windows firewall but I don’t get any results, I have also installed rfidattendance on debian buster (lampp) but also the graphical interface does not receive the card_uid, sorry if I steal your time.

    1. hi Alsan, I solved it, it was a simple problem: I just had to adapt the Sda / ss and Rst pins in the arduino sketc, now everything works perfectly even if I don’t know how to change the Admin password since it is encrypted in the db, thanks and sorry for the time I made you lose, congratulations for the work

  3. hi great Alsan, one last thing, rfid attendance is now operational ? ​​but I would like to change the admin password to make it stronger but I don’t know how to do it, plus if I press on ‘recover password’ or ‘reset password’ it gives me an error because the link of the button leads to reset_pass.php that does not exist, how can I solve it if possible? thanks and good day

  4. Hi Alsan
    When i go to serial monitor to check if is running doesn´t appear nothing and when i press RST this appear “⸮⸮⸮⸮/⸮⸮⸮⸮⸮⸮” why is this happening?

  5. Hello Alsan.
    Couldn’t find reset_pass.php file. How to add new admin?. I tried to insert new admin in SQL but the password always wrong. Thanks

  6. Hi, thank you for your project. I found and error (in my case) wherein the user_logs are not saving in mysql,
    and found that line 6 $t = date(“H:i:sa”); is at am/pm, changed it to $t = date(“H:i:s”); and the project worked fine.

  7. wow! I really like this project now working with my project hope will be successfully completed thanks for this awesome IoT project

  8. Hi there I have some error message during uploading to my NodeMCU board : Invalid library found in C:\Program Files (x86)\Arduino\libraries\examples: no headers files (.h) found in C:\Program Files (x86)\Arduino\libraries\examples
    Invalid library found in C:\Program Files (x86)\Arduino\libraries\doc: no headers files (.h) found in C:\Program Files (x86)\Arduino\libraries\doc

    Please help Thank you

  9. Francesco, I have the same problem just like you so can you please send me the part of the code which you edited…?

  10. while entering admin email and password i am getting database error what should i do please help asap

  11. Hello Alsan, in the part of arduino code, at the moment that I read the target, show me the rfid number but appears a message: Not found!, and didnt sent to the database.

  12. Hello Alsan, let me know how to get the device token? I know this is a stupid question because i have just learned arduino for a month.

  13. Alsan ti ringrazio comunque la password da mySQL non si imposta. Magari se hai il file reset_pass.php posso dare un okkiata io per la funzione. Il software è bellissimo sensa l’impostazione della password perde il suo valore. Fammi sapere grazie.

  14. Alsan forse sblagli crittografata non è MD5 ed è impossibile sostituirla. Controlla fai le prove in piu’ ti lascio un link
    dove puoi cittografare on-line.

    http://www.md5online.it/index.lm?key_decript=%242y%2410%2489uX3LBy4mlU%2FDcBveQ1l.32nSianDP%2FE1MfUh.Z.6B4Z0ql3y7PK

    123 non corrisponde a questa Pass MD5 $2y$10$89uX3LBy4mlU/DcBveQ1l.32nSianDP/E1MfUh.Z.6B4Z0ql3y7PK

    123 corrisponde a 202cb962ac59075b964b07152d234b70 in MD5

    Puoi chiarirmi la mente grazie.

  15. hello Alsan ,Thank you for such good project,
    I am having error while login,
    the login and password i try to enter/change , but i didnt get any solution.
    it is keep showing data base error. Kindly share any video or anything for the solution, Thank you

  16. HI ALSAN, WHEN I WANT TO ADD DEVICE APPEARS ERROR = “FATAL ERROR: CALL TO UNDEFINED FUNCTION RANDOM_BYTE” AT DEVICE_CONFIG.PHP. PLEASE EXPLANATION. THANK YOU

  17. Hiya,

    Thanks for this great project, It is working fine for me (I am at development stage to setup up a rfid attendance logging system for my school).

    Now, I got my hand on a stock of 125Khz rfid cards,and RDM6300 modules, as my coding skills are not that strong, can you show me the right direction to adapt your code?

    Thanks!

  18. Hello Alsan , From my esp8266 i am not able to connect to the php server , i am getting -1 response from server .i did everything from above steps i am using xampp server. When i send the send the same get request that you are sending from sendCard function from postman it works. What must me the problem and how should i solve it

  19. I have mutiple rfid cards. Which device token do i use in the arduino code? Plus i am still having trouble capturing the cards on the rfid and displaying the data on the php web app. Do i first create a new device, take the token number and put it in the arduino code, scan the card then change the mode to attendance so that the web app registers the card uid?

  20. @Alsan, I am almost giving up:(… The RFID wont simply capture the tag details and send them to the php web app. I am using your amazing knowledge to do my final year project and I am stuck and do not know where I am going wrong. I really need your help

  21. i got a website now thank you.

    If compile i got the next

    GPIO was not declared in this scope

    mooirfid_met_interface:9:17: error: ‘GPIO’ was not declared in this scope
    #define SS_PIN GPIO D2 //D2
    ^
    C:\Users\hanss\Documents\Arduino\mooirfid_met_interface\mooirfid_met_interface.ino:12:17: note: in expansion of macro ‘SS_PIN’
    MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
    ^
    mooirfid_met_interface:10:17: error: ‘GPIO’ was not declared in this scope
    #define RST_PIN GPIO D1 //D1
    ^
    C:\Users\hanss\Documents\Arduino\mooirfid_met_interface\mooirfid_met_interface.ino:12:25: note: in expansion of macro ‘RST_PIN’
    MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
    ^
    exit status 1
    ‘GPIO’ was not declared in this scope

    #define SS_PIN GPIO D2 //D2 (was first the same error but now good i think)
    #define RST_PIN GPIO D1 //D1 (is now in error)

    ============================================================
    Bellow is original code from you
    #define SS_PIN D2 //D2
    #define RST_PIN D1 //D1

  22. //#define SS_PIN D2 //D2
    //#define RST_PIN D1 //D1
    #define RST_PIN 15 // RST-PIN for RC522 – RFID – SPI – Modul GPIO15
    #define SS_PIN 2 // SDA-PIN for RC522 – RFID – SPI – Modul GPIO2

    No more errors strange

  23. Thanks for the reply.I was able to register the cards but when I scan them, I do not get the log times

  24. @Alsan I was able to register the cards but when I scan them, I do not get the log times. What could be the problem?

  25. hi, alsan, great project, i’m trying it on a web server on nodemcu everything works i read the cards but when i go to the web page to insert a user it doesn’t read the cards
    thanks

    1. If you are using Hosting then you should go with HTTPS GET and POST request instead of HTTP. It is only for LocalHost.
      Also, check the status on the serial monitor. To post the data to the webserver it should show the status 200.

  26. ok thanks, in any case everything is ok locally beautiful project, I would like to insert a buzzer, where I should change https and Post thanks

  27. I am using localhost and my my serial monitor shows 200. Despite that, it still doesnt send the data to the php web app. Is there a way I can send you the images so that you can see?

    1. One thing…. Did you change the device mode to Attendance mode? Before reading logs. I think you have missed this step. Here we have two modes Enrollment is used for registering user and Attendance mode for taking Attendance.

  28. @Alsan I was able to register the cards but when I scan them, I do not get the log times. What could be the problem? Off course that’s excellent project . I’m run in host not local server

  29. Great work! But can we use MQTT protocol instead of http in this project ? If yes then can you please explain as how to use.

  30. i cannot register new user the system because i get -1 whenever i tag my card. I have also tried removing the http from the url and still the same. I am using the enrollment option to register it is not working. Anyone can help?

  31. Hi Alsan Parajuli, the password you suggest is not 123. Is impossible for me to enter and change de password from database also using MD5. What can I do?

  32. hello sir mein try kar raha hun aapki encrypted technique ko samajhne ki main sare comments ko pada but mujhe lag raha hai ki yah md5 main encrypted nahin hai kya bata sakte hai . Ki aapne konsa algorithm use kiya hai..(Which algorithm have you used to encrypt the password? ) Which folder have you saved in and which is the code of the line, please tell

  33. Hi brother,
    Can you post the link to the needed library because is hard to get it work with the good ones.
    Please

  34. Hello … I just follow the procedures with photo buy i was stock in finding rfidattendance.sql but instead its .opt

  35. Hi Alsan,

    I have tried everything, but when I try to add a user to manage user (http://localhost/rfidattendance/ManageUsers.php) I keep getting the error: There’s no selected Card! ”

    When I start NodeMCU_RFIDv2.0 in arduino, and hold a card in front of the reader, I see in the serial monitor:

    Connecting to Ziggo
    …….
    Connected
    IP address: 192.168.178.61
    Sending the Card ID
    -1
    2019817543

    So that seems to be working.

    I connected D2 from ESP12F to SDA / SS
    and D1 to RST so that seems to match the sketch NodeMCU_RFIDv2.0

    I Use in the sketch
    String URL = “http: //localhost/rfidattendance/getdata.php”; // computer IP or the server domain

    I use Wemos D1 (ESP-12F) and RC522

    thanks in advance for your time and wonderful script.

    Stay healthy.

  36. I forgot to say that I created a device and entered the relevant UID code in the sketch:
    const char * device_token = “870230263fa323f2”;

    Unfortunately, I really don’t know what to do anymore.

  37. Same problem when using:
    String URL = “http://localhost/rfidattendance/getdata.php”;
    String URL = “http://127.0.0.1/rfidattendance/getdata.php”;
    String URL = “http://192.168.178.61/rfidattendance/getdata.php”;
    String URL = “http://92.108.235.147/rfidattendance/getdata.php”;

    How to find the propper IP adress?

  38. IT’s WORKING,

    Stupid me.
    Indeed it was the IP adres.
    I found the correct adres by using ipconfing in command line from windows.
    It seemed that IPv4 Address was 192.168.178.21

    Now I can continue.
    Cheers

  39. Hello Alsan ,
    I`m facing a issue “call to ‘HTTPClient’::begin declared with attribute error:obsolete API,use ::begin(WifiClient,url)”

    can you pls tell whats the issue ?

  40. Hello Alsan, we’re having a trouble in reading a card, All was set up and connected, in Arduino GUI, it was displayed as connected, but the RFID doesn’t read or doesn’t have any feed back in arduino GUI

  41. void SendCardID( String Card_uid ){
    Serial.println(“Sending the Card ID”);
    if(WiFi.isConnected()){
    HTTPClient http; //Declare object of class HTTPClient
    //GET Data
    getData = “?card_uid=” + String(Card_uid) + “&device_token=” + String(device_token); // Add the Card ID to the GET array in order to send it
    //GET methode
    Link = URL + getData;
    http.begin(Link); //initiate HTTP request //Specify content-type header

    int httpCode = http.GET(); //Send the request
    String payload = http.getString(); //Get the response payload

    how can I solve this error

    rfid:78:15: error: call to ‘HTTPClient::begin’ declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
    78 | http.begin(Link); //initiate HTTP request //Specify content-type header
    | ~~~~~~~~~~^~~~~~
    exit status 1
    call to ‘HTTPClient::begin’ declared with attribute error: obsolete API, use ::begin(WiFiClient, url)

  42. Hi @Alsan!
    I have a problem.
    When wipe card , i see on serial monitor
    “Sending the Card ID
    -1
    2019817563”
    Server not respone. Could you to help me? Please!

  43. Hi, I have also the same problem as @Dlee
    what i see on serial monitor is

    Sending the Card ID
    -1
    1035598180

    and that it.. nothing appear on website… I am unable to add card… also device mode is enrollment

    and I have also check ipv4 by ipconfig

  44. Sir I really like this project. Thank you very much. I have a problem, is there a way to delete user logs?

  45. Hi Alsan Parajuli

    Works as a charme i only have 1 question is the a posibility to generate the output in the monitor to a lcd2 ore something else?

Leave a Reply

Back to top button