This project is a smart lock based on the ESP8266 microcontroller. It integrates with the Home Assistant smart home system, allowing control through its interface. Additionally, the lock supports unlocking with RFID cards via a built-in RFID module with an antenna.
- Integration with Home Assistant for controlling the lock via a mobile app or web interface.
- MQTT Support for interaction with other smart home systems.
- RFID Card Unlocking for convenient access.
- Remote Control for locking and unlocking over the internet.
- Custom Automation Scenarios for tailored smart home functionality.
- Over-the-Air (OTA) Firmware Updates for seamless firmware updates over Wi-Fi.
- ESP8266: The microcontroller managing the lock's operations.
- KY-012: Simple buzzer for sound feedback.
- 125Khz RFID Reader with antenna: For reading RFID card data for authentication.
- LY-03: Solenoid locker for 12v which operates over a relay.
- SRD-05VDC-SL-C: A simple 5v relay (you can use any that operates under 3-12v).
- Home Assistant: The smart home automation system.
- MQTT Broker: For message exchange between devices.
- Connect the RFID module to the ESP8266 according to the wiring diagram.
- Ensure the device is powered according to the required specifications.
- Download the project repository.
- Setup your personal data within sketch file:
- Your Wi-Fi network credentials (L28-L29).
- The MQTT broker address (L33-L36).
- Flash the firmware to the ESP8266 using Arduino IDE or PlatformIO.
- Long single beep will indicate that WiFi and MQTT broker has been connected successfully.
- The first RFID card or chip will be remembered as a master.
- Start Home Assistant.
- Install Mosquitto with the MQTT broker and start it.
- Add MQTT integration which connects to your broker.
- Start the ESP device.
- The device will send a discovery message and a new device will appear in your HA interface.
- Register cards by touching the antenna with your card or implanted chip.
- Add unique card IDs for authorization via Home Assistant interface.
- Use the built-in OTA feature to update firmware without physical access.
- Access <ip-address_of_devices>:88/firmware to upload the firmware updates.
- Access <ip-address_of_devices>:88/restart to reboot the device remotely.
Control the lock via:
- The Home Assistant interface.
- Automation scenarios (e.g., unlock when arriving home).
- By presenting an RFID card or implanted chip to the module.
- 12v with a DC power supplier to 5v output or a direct USB 5v output.
- ESP8266 (NodeMCU or equivalent with WiFi).
- 125Khz RFID Reader module (or you can use your own).
- Home Assistant with a configured MQTT broker.
- Wi-Fi Network.
- Ensure the device is protected against unauthorized access.
- Regularly update the firmware to fix potential vulnerabilities.
This project is licensed under the Apache 2.0 License.
If you have questions or suggestions, feel free to open an Issue in the repository.