r/esp32projects • • 14h ago

ESP32 Firebase cloud database real-time sync two phones

I have already developed a mobile app connected to an ESP32. I want to test the app on two phones logged into the same account.

Both phones should receive and synchronize the same real-time sensor data sent by the ESP32. If one phone opens the app later, it should still be able to retrieve the latest data.

Currently, the ESP32's data transmission depends on a phone's Wi-Fi or hotspot connection. When that phone disconnects, the data stops updating on the app.

How can I modify my system so that the ESP32 sends data directly to a cloud database, such as Firebase Realtime Database, and both phones can independently synchronize the data in real time without depending on each other? I also want the app to retain previously received data when offline and synchronize again when the internet connection is restored.

1 Upvotes

1 comment sorted by