Giter Site home page Giter Site logo

ckoever / micropython-firebase-realtime-database Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 19.0 120 KB

Firebase implementation for Micropython optimized for ESP32

License: MIT License

Python 100.00%
micropython micropython-esp32 firebase-realtime-database micropython-lib firebase

micropython-firebase-realtime-database's People

Contributors

ckoever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

micropython-firebase-realtime-database's Issues

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.

ESP32: OSError: ECONNABORTED

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

_thread issue

When I run a script containing this I am getting "ImportError: no module named '_thread'". Can't figure out how to install _thread.

No Module _thread

import ufirebase
Traceback (most recent call last):
File "", line 1, in
File "ufirebase.py", line 4, in
ImportError: no module named '_thread'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.