/grow

Environmental monitor, control, view, alert python script

Primary LanguagePython

Grow

Sample output

Features:

  • Monitor the enviroment
  • Optionally control temperature with Wemo switches (edit the script to control other devices)
  • Optionally report soil moisture on a per-plant basis (up to 8)
  • E-mail alerts when enviroment exceeds alarm values

Requires:

Optional:

See my full grow list.

As an Amazon Associate I earn from qualifying purchases.

Installation

  1. Prepare linux host with working MySQL and python3.
  2. Place files under the web root and make sure .py files execute as CGI
  3. Create a database called grow and create tables with mysql> create database grow and mysql grow < schema.mysql.
  4. cp myconfig.sample myconfig.py and edit cofiguration.
  5. Configure Ecowitt GW1000 to post data to ecowitt.py (Use "WS View" app, go to "Weather Services -> Customized", enter server address, /ecowitt.py as path, upload interval 60.
  6. Copy grow.service to /etc/systemd/system and edit to make the grow-control.py run at boot, and restart on crash. systemctl daemon-reload once in place, then systemctl enable grow then service grow start then service grow status.

Wemo automation:

  1. Install ouimeaux
  2. Test command line: wemo list
  3. Make sure device names match those in grow-control.py.

Webcam setup:

  1. Edit get-image.bash to fetch an image from your webcam so the python script can add to it.
  2. Create a cronjob to run the above script every minute: * * * * * /path/to/get-image.bash
  3. Run the script by hand to test it creates output as expected
  4. Fetch out.jpg via your webserver
  5. Optionally speciy location (x,y coordinates with 0,0 at top left) of pots/soil sensors in config file