Houseplant management system using Raspberry PI coding with Python.
And Also Graphing metrics for Zabbix external scripts.
GitHub is here!!
I grow a banyan tree at home, but I forgot to water it and almost died.
To prevent such a mistake, I have created a module that automatically measures the timing of watering.
Buy in advance below.
sudo apt-get update
sudo apt-get install build-essential python3-dev
curl https://raw.githubusercontent.com/sunfounder/Sunfounder_SensorKit_Python_code_for_RaspberryPi/master/ADC0832.py
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT
sudo python3 setup.py install
pip3 install -r requirements.txt
Enter command below, run API server.
python3 main.py
- GET /temperature
Response
{
"key": "temperature",
"value": 20.2
}
- GET /humidity
Response
{
"key": "humidity",
"value": 60.5
}
- GET /light
Response
{
"key": "light",
"value": 175
}
- GET /moisture
Response
{
"key": "moisture",
"value": 0
}
If you use Zabbix, you can collect metrics for external scripts.
collect_zabbix.sh
to Zabbix's external scripts.git clone https://github.com/tubone24/raspi_plant_checker.git
cp raspi_plant_checker/src/collect_zabbix.sh /usr/lib/xabbix/externalscripts/
chmod +x /usr/lib/xabbix/externalscripts/collect_zabbix.sh
zbx_export_templates_plant_checker.xml
Setup my Raspberry PI and check my banyan!