Hi! I made this small project with ESP32 development board, RC522 RFID reader, hall senor and IFTTT.
You will receive notification or SMS on smart device if someone opens Your door and doesn`t put correct RFID tag in 10 seconds.
2. RC522 RFID
3. Wires
4. Hall Sensor
5. Magnet (I used neodymium but any magnet would be fine)
Links are just for reference. You can get these parts much cheaper from e-bay ;)
1.Go to IFTTT.com and register (if You haven`t already, basic version is for free);
2.Create Applet -> go to "My Applets" -> "New Applet" ;
3.Press "this";
4.Search for "webhooks"';
5.Enter name : "DoorAlarm" //this will be added in our ESP32 programm
6.Press "that";
7.Search for "notification" (You can also search for SMS or e-mail);
8.Choose action: "Send a notification from the IFTTT app".
9.Complete action fields: enter message that will be delivered to Your smart device.
10.Press "Finish".
1.prepere arduino IDE: ESP32 With Arduino IDE
2.download code;
3.Go to: https://ifttt.com/maker_webhooks and press "Documentation" and get Your key. Copy key to ESP32 code;
4.Change Your network credentials;
5.Read Your RFID cards UID and change these lines for Your card:
if (rfid.uid.uidByte[0] == 61 &&
rfid.uid.uidByte[1] == 102 &&
rfid.uid.uidByte[2] == 14 &&
rfid.uid.uidByte[3] == 194 )
5.Programm ESP and in Arduino IDE open Serial Monitor to check how it works.
If everything works as expected solder all connections and put it close to doors (You can also hide it somewhere). Attach magnet to doors and put hall sensor close to it. When doors will be opened hall sensor will detect that and it will send signal to ESP32. ESP32 then connects over wireless to IFTTT and IFTTT sends You notification or SMS.
Things to improve:
1.Implement some kind of device heart beat so You can be notified if device is not working properly;
2.Make 3d printed case for this;
3.Attach alarm or audio notifications: ESP32 audio project
Useful links:
Installing the ESP32 Board in Arduino IDE (Windows instructions)