The firmware enables individuals, organizations, or homeowners to configure and control a Smart Safe Locker System using an ESP32. They can connect to the ESP32 hotspot and access a web page to authorize users via email. Authorized users can then unlock their respective lockers using the Smart Link app.
- Remote Setup and Control: Configure the locker via web pages accessed through the ESP32 hotspot.
- Wi-Fi Configuration: Enter home Wi-Fi details through the web interface.
- User Authorization: Add authorized user emails for locker access.
- Security: Secure login for web interface access.
- Customizable Login and Hotspot: Change the web interface login password and ESP32 hotspot SSID and password.
- Firebase Integration: Allows developers to block entire organizations, preventing users within those organizations from accessing their lockers.
- Create a project on Firebase.
- Get the Firebase Web API key and Realtime Database (RTDB) URL.
- Add these to the
config.hpp
file.
// Cloud Configuration . . .
#define FIREBASE_WEB_API_KEY "Your Firebase API key"
#define FIREBASE_RTDB_REFERENCE_URL "Your Firebase RTDB Reference URL"
To register the ESP32 with Firebase authentication, set REGISTER_ESP_ON_FIREBASE
to true
in config.hpp. Then, compile and run the code to complete the registration with Firebase Auth. Afterward, set REGISTER_ESP_ON_FIREBASE
back to false
so that it performs a login operation instead of registering the app again.
To serve web pages from the ESP32:
- Install the arduino-littlefs-upload library.
- Place HTML files in the data directory.
- Upload the data directory to ESP32.
- Connect to the ESP32 hotspot.
- Open a web browser and go to
192.168.4.1
. - Login and enter your home Wifi SSID and password.
- Save & Reboot.
- Reconnect to the hotspot again after the restart.
- Login and enter user emails.
- Save and Reboot.
- Users have to download the Smart Link app and sign in with their Google account. Then Admins need to add the email that the user used to create their Smart Link account in Esp32 for authorization. Initially, users must connect to the Smart Lock network. Each time they want to open their locker, they must authenticate themselves with their phone's fingerprint. If successful, their respective locker will be unlocked.
-
Admin (Organizations, homeowners or individuals) can manage smart lock access by authorizing users by adding their email. The Firebase feature allows developers to block entire organizations, preventing users within those organizations from accessing their lockers. Admins can still manage local ESP32 settings, such as changing ESP32 hotspot SSIDs, login passwords etc.
-
If admin enters incorrect home wifi details, the authorised users won't be able to access the locker system.