ckoever / micropython-firebase-realtime-database Goto Github PK
View Code? Open in Web Editor NEWFirebase implementation for Micropython optimized for ESP32
License: MIT License
Firebase implementation for Micropython optimized for ESP32
License: MIT License
Hello , I am trying your code on Wokwi ESP32 Micopython simulator .
while executing facing issue "Do not make to many sockets".
Can you please check it once .
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.
Problem with the library running it in an esp32 module. Simple code that captures data through the Inventor App that turns a led on and off. The application works wonderfully but after a while (40-60 seconds) the connection is terminated and the following error appears.
Traceback (most recent call last):
File "<stdin>", line 21, in <module>
File "ufirebase.py", line 124, in get
File "urequests.py", line 116, in get
File "urequests.py", line 60, in request
OSError: [Errno 113] ECONNABORTED
When I run a script containing this I am getting "ImportError: no module named '_thread'". Can't figure out how to install _thread.
import ufirebase
Traceback (most recent call last):
File "", line 1, in
File "ufirebase.py", line 4, in
ImportError: no module named '_thread'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.