Go to file
JayWll bbad48ee90 Added handlers to set flags when a new reading is received
- Reset the 'low' and 'alert' flags if the reading is greater than high-trigger
- Set the 'low' flag if it isn't set, and the reading is less than low-trigger
- Send an alert and set the 'alert' flag if the 'low' flag is more than 5 days old
2020-04-13 11:04:27 -06:00
arduino/Houseplant Removing GCP app publishing from the arduino app 2020-01-04 12:16:26 -07:00
fritzing Rotating circuit diagram 90 degrees to improve readability 2020-01-04 11:59:04 -07:00
nodeapp Added handlers to set flags when a new reading is received 2020-04-13 11:04:27 -06:00
.gitignore Adding .env parsing for development environment 2020-04-11 12:25:20 -06:00
.glitch-assets 🚠📙 Checkpoint 2019-10-23 17:47:22 +00:00
README.md Adding link to live app to README.md 2020-01-04 12:13:44 -07:00
package.json Adding .env parsing for development environment 2020-04-11 12:25:20 -06:00
shrinkwrap.yaml 🎷 Checkpoint 2019-12-21 00:25:44 +00:00

README.md

Houseplant Hackathon

What Is This?

This project is the result of an afternoon hackathon we ran where I work, the objectives of which were two fold:

  • Learn how to write a NodeJS app and deploy it to Google AppEngine
  • Connect the plant I have on my desk to the internet

Since creating it I've migrated the project away from AppEngine and on to Glitch instead.

How Does It Work?

The hardware is built around a NodeMCU, which is an Arduino-compatible microcontroller with integrated WiFi. This is connected to a simple analog soil moisture sensor that's inserted into the soil itself. The moisture sensor came with a little circuit to convert the analog signal to a digital one, but it never worked so we threw it away.

Circuit Diagram

The arduino code takes a reading every hour and sends it to the app on Glitch, where it gets stored in a SQLite database. Once a week a cleanup job is triggered by cron-job.org to remove readings older than 90 days from the database.

Both the creation of a new reading and the cleanup cronjob expect that a secret key be included in order to authenticate the request.