Skip to content

AlanCunningham/envirophat-plant-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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