Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.33 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.33 KB

Enviro pHAT Plant Monitor

A lightweight plant monitor server for the Pimoroni Enviro pHAT, written in Django.

Before you start

Installation

# 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

Run the server

python manage.py runserver 0:8000

The server will be available at http://localhost:8000/monitor/graph