This Android, Python, and Raspberry-Pi project is meant to provide a visualization of household or outdoor soil moisture and temperature levels.
This is a work in progress.
This app WILL NOT WORK without setting up a firebase account and linking it to the app.
Android Studio
Firebase Realtime Database
Optional: Adafruit IO Account
Raspberry Pi (Any type)
Pyrebase on your Raspberry Pi
Stemma Soil Sensor
JST I2C Cable
- Set up your raspberry pi with pyrebase and connect your stemma device.
- Set up your firebase realtime database.
- Clone this repository into the directory of your choice.
- Open the repo in android studio and link your firebase to the application.
- The python scripts in the root directory of the repo (stemmaAIO.py and stemmaFirebase.py) should be placed somewhere on the reaspberry pi.
- Set up the scripts with your Adafruit IO (optional) and your firebase accounts.
- Set up crontab:
- Open crontab with "sudo crontab -e"
- For my stemmaAIO.py I run it every minute with this crontab line:
* * * * * python3 ~/Documents/Stemma/stemmaAIO.py >> ~/Documents/Stemma/AIOlog.txt 2>&1
- For my stemmaFirebase.py I run it every hour on the hour:
0 * * * * python3 ~/Documents/Stemma/stemmaFirebase.py >> ~/Documents/Stemma/Firebaselog.txt 2>&1
- For more info on crontab look at its documentation
- These crontab lines run the script and output any errors into separate log files.
- The firebase script is set to delay for 5 seconds on purpose in order to avoid simultaneous IO reading errors.
- You are now uploading stemma information to Arduino IO and Firebase.
- The java programming on the Android side of things is set up to give a baseline of moisture levels over 7 days.
- Wait for the stemma data to come in over time to get a better idea of how the moisture and temperature levels fluctuate in your particular plant and soil.
- Check out my dashboard and feeds on Adafruit IO for an example: Dashboard, Moisture, Temperature]. An example for the firbase side can be seen in the progress image above.
- 24 Hour Chart
- Seven Day Chart
- Month Chart
- Plant Details Fragment
- Add more instructions to Readme
- Multiple Stemma connections with multiplexer
- Cards for each Stemma connection
- Renaming of Stemma connections
- Plant type suggestions
- UI updates
- Refactor HomeFragment
- Create classes for chart generation