Android App for Aquarium data stored in Firebase Database – app created with MIT APP Inventor
Overall “idea”
The app will open showing the most recent tank data (SHOW BUTTON)
The app will allow new values entered and stored (Enter & Update Button)
The Firebase will receive values from APP and/or Arduino sensors on aquarium (have this part working)
Button on app will show graph of test values (Graph Button).
Data to be captured in database can be temperature, pH, chemical tests such as Calcium ppm, iodine etc.
Questions:
What is the “best” or “most efficient” firebase design.
a. Current – Key/Tag – Date/Time/Parameter example YYYYMMDDHHMMSSXXX Year, Month,Day, Hour, Minute, Second, 3 character parameter name.
b. Value – 99999.999, some parameters can be in the thousands and others are three point decimals. All are positive values and numeric
Any tutorials or examples that show similar data logging. My current test project is just a list of labels and then text boxes. The Update button is giving me an error “Previous value was empty”
I am thinking of manually entering a set of data so all parameters have an entry to initialize the database.
This is what I am thinking the firebase database will look like
What I do not understand is what is ProjectBucket?
How do I code on App Inventor to step to the first level "Calcium" and then create a tag of YYMMDDHHMM
I have been trying to understand the layout parts of the app.
The top of the app label - Three Tenths Data the background is not showing across the full width of the app
TIMAI2 - I should use systemTime instead of .now? What I see from systemTime is that it returns mills since 1970? What I do not see how it returns the value?
Did we forget to mention that the slash (/) character used in date formatting has a side effect in Firebase tags of creating subtrees?
Though it has a beneficial side effect of making your key/value trees short, unordered and bushy for performance, it interferes with any attempts to grab multi-day ranges .
What looks good to the eye does not work best behind the scenes in a database.
ABG thank you. That makes sense.
In times, I hope to be able to graph the data and "unordered and bushy" tags seem like they would be difficult and much more effort.
I am working now on a simple task of refreshing the last values on the app and reading back last value even from a saved key has been challenging. is there a book or manual that would be more efficient than my try,fail,try, fail, try search google, try, fail approach.?