A full-stack React + Node.js application allows you to monitor the humidity level of your plants.
The Plower app is running on Raspberry Pi, which communicates with moisture sensors.
- Raspberry Pi 3 B
- Analog-to-digital converter ADS1115
- Capacitive Soil Moisture Sensors v1.2
To set up Plower, run the following commands in your Terminal:
git clone [email protected]:ksdenisova/Plower.git
cd Plower
To build the Plower app, run the following commands in the Terminal:
cd client
npm run build
-
Set up Raspberry Pi 3 with balenaOS using this official guide. It is important to choose a device type that supports 64bit OS to be able to use MongoDB.
-
Connect Sensors to ADS1115 using this diagram:
- Install ADS1115 to Raspberry Pi.
After all setups, your hardware should look like this:
To check if Raspberry Pi sees the ADS1115, run the following command in the Balena Terminal:
i2cdetect -y 1
If everything is set up correctly, you will see the following (48 address set by default):
You should calibrate sensors when they dry first.
Open the Terminal in Balena Cloud and run the following command:
npm start calibrate dry
Then place sensors in water and run the following command:
npm start calibrate wet
Open Balena Dashboard, copy local/global IP Address or public device URL (if enabled), and open it in your browser.
To run the Unit tests for the React app, run this command in the Terminal:
npm test
To deploy the Plower app to Raspberry Pi locally, run this command in the Terminal:
balena push Plower
- The Plower app's home page displays the list of your plants.
- Last added plants displayed first.
- The humidity updates when the app starts and every half an hour.
- The color of the humidity bar depends on the humidity level.
- When the last updated humidity increased by 10 % and more, the last watered date and time will be updated.
- To create a new plant, click on
+
button, enter the name of the plant, and press Enter/click+
. - If there are available sensors, the first one will be assigned to your plant.
- Place the assigned sensor in your plant's pot.