micropython-firebase-realtime-database
micropython-firebase-realtime-database copied to clipboard
Firebase Security - Add Credentialized Setup
First, thank you for creating this project. How difficult would it be to add the ability to run the DB connection secured. In your setup the connection is established in "TEST" meaning that FB will reset the security to AUTH every 30 days. It would be nice to have the ability to use email/password connection security so that a project could be used more permanently. If I understand FB for Python there is a firebase-admin library that uses API Keys. The values are stored in a .env and then used as the initial connect routine. Given the credentials and URL path are all that is required the additional memory should be almost zero. ESP32-WROVER-E has 4MB flash and the WROVER -IE has 8MB. Plenty of room.
What makes FBRTDB so interesting to me is the serverless aspect allowing for easy data collection on the MC and easy dashboard creation for control and monitoring using almost any web framework... ie.. React, Angular, Flask, Vue, etc.. Within maybe one hour you can have all the ESP32 side and a hosted dashboard up and running.
You could have an async set up to read the DB on the ESP every so often to check for commands pushed into the DB from the hosted dashboard. Based on my experience with FB you could do so with latency under 100ms(my best was 18ms). This makes it almost possible to get a realtime(almost as RT would be < 10ms) roundtrip. ORM connections take too long for such low latency.
I would be willing to work on creating the required additions to your library to allow for the secured connection. Let me know if there are any hurdles that cannot be crossed and this is why you have chosen to stop at open connection protocols.
Again, thank you for the effort.