Small and Cheap Attendance Node - ESP8266, PyQt5, MQTT, and MongoDB

PREVIEW

The tool to be designed is in the form of attendance system multi-node with a centralized database, that is, there are many devices as data retrieval points but with centralized storage and management and monitoring from one device only. The system to be designed consists of 3 components, namely Local MQTT Server, Monitor and Database Client, and Node Client on a local network or communication without going through an ISP or external network.

   Local MQTT Server to function as a server MQTT used between the Client for MQTT communication or place where the function "publish" and "subscribe" to be processed and regulated by the Server MQTT.

   Monitor and Database Client functions to monitor each Node Client connected to the same MQTT server and record and manage data checking for each node and employee on the database. On client side this will also run GUI application that has been designed with PyQt5 to establish functions monitor and as a bridge with database.

   Client node has the main function as an attendance point. Client nodes cannot operate if Client Monitor and Database are not running even though Client Nodes are connected to the server. Optional function is as a door locking system as well as reading the condition of the door open or closed. These two functions will also be monitored by the Client Monitor and Database. To support these two functions the user can choose whether to use the mode to open the door (by default) or use attendance mode.

   In open door mode, will not be carried out data updates to the database, but only the authentication process will occur. As for the attendance system, the data will be updated to the database and recorded based on a 2-time pattern, namely coming and going home per day for each user. The controller part Node Client will be installed indoors, while the interface and scanner part will be outside. This is to support the function of the Node Client as a security system for a room. But most importantly the client node must be able to reach the access point nearest.

   To make it easier to understand and realize the system, several block diagrams will be made including the hardware block diagram (Figure 1) and the communication system tool (Figure 2).

Figure 1. Hardware Block Diagram


Figure 2. Communication System Block Diagram


Attendance Node Machine

Hardware: ESP8266 Wemos D1 Mini - Software: Arduino C/C++

Feature and library used:

  •  Dual Mode: Tap to Unlock Door and Attendance Mode
  •  Scheduler.h (Multitask) from Here
  •  PubSubClient.h (MQTT protocol client)
  •  LiquidCrystal_I2C.h (LCD16x2 I2C)
  •  MFRC522.h (RFID SPI module 13.56MHz)
  •  ArduinoOTA.h (wireless/no-usb programming)
  •  Reed/magnetic sensor for Door state
  •  solenoid door lock port max. 12V/1A (12W)
  •  5V/3A (15W) power supply input

Recommended ESP8266 Wemos D1 Mini Arduino Configuration:

arduino config


  • Mechanic Documentation Photo:
  • Acrylic Case for LCD, RFID sensor, button, and buzzer. Install it outside the room. img img img
  • Acrylic case for controller part, reed/magnet sensor and solenoid port. Install it inside the room. img img
  • Solenoid port and small hole for reed/magnet sensor wire img img img


GUI (Node Monitor & Employee Manager)

Tested on Windows 10 PC and Ubuntu Mate 18.04 64bit on Raspberry Pi 3 (Should be supported with Ubuntu 64bit on PC)

Main file: "SCAN_node_monitor.py" ("karyawan.py", "icons", and "images" need to be in the same folder)

Feature:

  •  Manage & monitor all Node Machine that connected to the same MQTT server.
  •  Using MongoDB database for Node & Employee Manager.
  •  Unlock door on every Node Machine remotely.

Python 3.7 module/library used:

  •  Pyqt5 (for GUI)
  •  PyMongo (for MongoDB Database driver)
  •  Paho-Mqtt (MQTT client)
  •  Threading (Multitasking using Multithreading, 1 thread per 1 Attendance Node Machine)


Apply for sponsorship >>
13800+ Projects Sponsored
Oct 15,2020
2,454 viewsReport item
  • Comments(0)
  • Likes(1)
Upload photo
You can only upload 5 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000