An IOT + Android project to provide notification alerts in an android phone when detecting movements through a door or a passage.
- ESP8266 microcontroller
- HCSR04 ultrasonic sensor
- Android App
- A PC with firebase Admin SDK as a helper server to mimic Firebase Cloud Function
The NodeMCU microcontroller communicates with firebase backend through andmin REST API endpoints. Whenever movement is detected by microcontroller through the ultrasonic sensor, a new movement record is added with timestamp to the Firebase RTDB. If the helper server is online, it moniters the RTDB and triggers a push notification when a new movement record appears. When the android app is online, it copies the movement records that appears (or already existed) to local storage and displays the records. The sensor state can be activated or deactivated through the android app by updating a boolean field in the RTDB to notify the microcontroller
- OkHttp (Android)
- ESP8266WiFi (Arduino)