Web accessible DB

Hello friends..

I'm working on a course that does IoT with Highschool students...

Tools

  1. Raspberry Pi Python App
  2. Website via Repl.it
  3. MIT App Inventor

I would like to have a central repository for all three "things" to share data..
Functions

  1. Rpi writes/reads to/from DB
  2. Website shows status of Rpi via the DB
  3. App sends commands to Rpi via the DB

I was hoping to keep it simple and use the CloudDB component for a demo, however, I don't think I can access the data outside of the MIT app inventor environment (though I could be wrong). I want to avoid having the DB reside on the Rpi and keep that as a client. I know traditionally databases are housed at the website, but connection options via MIT app inventor, and DB options on Repl, are limited. Furthermore, whatever service I use needs to be compatible with Google SSO, since students don't always have access to email to register.. Any suggestions?

Thanks!!

Not seen repl.it (replit.com) before, but reading their site they appear to offer php and sqlite (DB) and some form of free hosting. If this all means you can run an internet facing website or address (that would accept php requests) then you could use sqlite as your DB and php to do the rest. (I might be wrong though, would have to sign up and have a play to fully understand things)

A while back I wrote a howto on using Appinventor over the web to sqlite via php

[EDIT]

Just had a quick look around, seems it does everything you might need to do. The built-in replit database can be queried from Appinventor using the web component (convert the curl commands)

also

2 Likes

Thanks.. This might be the solution. I was looking at Firebase, but considering the API for MIT AI is not mature, and it's ANOTHER tool, I was shying away from it. I will mess around with CURL commands and the Repl DB to see how it works. I know this wouldn't be a "production ready" solution, but I fear overloading students with too many different tools will get them confused for an intro to the subject. Perhaps and advanced module that uses SQL/PHP would be ideal.

I do wish the MIT APP Inventor DB solution was a bit more robust and versatile, but I really can't complain when it's free.

I will report back and let you know how it comes together. The high level idea is to have an Rpi with a SenseHat and RGB light strip to act as a web accessible/controllable light controller for your home/room/holidays/etc..

Thanks again!

Not sure what you mean ? Which AI2 DB ?

Any of the on platform App Inventor 2 Database options is what I was getting at (CloudDB, TinyWebDB). Wishful thinking in a DB solution that was conveniently outside accessible for demo purposes (similar to the REPL idea). But like I said, I cannot be picky since it's all free.

Thanks again.