A lightweight plant monitor server for the Pimoroni Enviro pHAT, written in Django.
- Install the Envirophat dependencies using the Pimoroni Enviro pHAT installation guide
- Install virtualenv
# Clone the repository
git clone git@github.com:AlanCunningham/envirophat-plant-monitor.git
# Create a python virtual environment
virtualenv --system-site-packages -p python3 venv
# Activate the virtual environment
source venv/bin/activate
# Install the python dependencies using the requirements.txt file provided
pip install -r requirements.txt
# Create a cronjob to get data from the Enviro pHAT sensor once an hour
crontab -e
# m h dom mon dow command
0 * * * * {path to virtualenv}/bin/python {path to project}/manage.py get_sensor_data
python manage.py runserver 0:8000
The server will be available at http://localhost:8000/monitor/graph