Imagine what life would be like without our inanimate green friends.. Flowers, beyond the fact that they are excellent items for decoration of various environments, are actual stress reducers and nature maintainers ( producing oxygen through photosynthesis).
We all know how busy the modern life of a programmer can get, especially with the chaotic schedules the pandemic times brought upon us, therefore we thought of automating the process of checking how 'healthy' a plant is at the current moment of time.This small project is all about monitoring a flower using a soil moisture sensor and a DHT 11 temperature & humidity sensor. A buzzer is also included since 'singing' to flowers is scientifically proven to accelerate their growth.
Once started, a Python server runs continuously on the Raspberry Pi 3 that hosts a website on which an user can see the parameters of the followed sensors.
If the flower is being watered too much/little or the room temperature/air humidity is not optimal, the user gets a warning on his e-mail with a clear message:
Emails about soil moisture or temperature/humidity have a cooldownperiod of onehour after being sent in order to avoid unnecessary spam.
The user might also use the Raspberry Pi in order to sing to the flower, using a simple buzzer by pressing the button found on the website. The played song is 'The Final Countdown'.
Credits to gumslone on Github for providing the code to play songs on a simple buzzer.
Note:The Arduino Uno was used in order to get an analogue value of the moisture sensor reading. In order to achieve the same goal, one might use an Analogue to Digital Converter with the Raspberry Pi 3. In our project, the Arduino was used to allow further scaling of the project in the future.Make the future visible!
Installation & use instructions- Install the required Python modules
python3 -m pip install requirements.txt
- Make sure to upload the Arduino sketch to your board.
- Connect the sensors/actuators as indicated in the schematic found here
- Create a new email address or use an already existent one to send warning emails from.
- Modify server.py 'email' variable with your email of use.
- Set the email password as an enviornment variable
sudo vim ~/.bashrc
Add following line to your.bashrc
export iot_password="<Your_password_here>"
Execute in the current shell environment.
source ~/.bashrc
- Run the Flask web server
python3 server.py
Comments