Git Product home page Git Product logo

pirrigo's Introduction

PirriGo

Irrigation and garden management application, in Go and Angular. Based on Pirri.

login/password are demo / demo

Screenshots

Login page

Login page

Main / Stations

Stations

Calendar

Calendar

Station Scheduler

Scheduler

History of Activity

History

Charted Run Stats

Run Stats

Usage

Usage

Hardware

Hardware

Features

  • Activate irrigation zones on a schedule, or manually
  • Track total seconds spent watering by zone, day of the week, and other metrics
  • Estimate monthly costs to operate your irrigation system
  • Using WeatherUnderground, leverage current weather data to automatically regulate watering (increase in heat waves, reduce when rain will do the job for you)

Setup

Clone repository to your Pi

git clone https://github.com/vacoj/pirrigo.git

Installing Go in Raspbian

wget https://storage.googleapis.com/golang/go1.7.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.7.linux-armv6l.tar.gz
export PATH=/usr/local/go/bin:$PATH

Install required Go packages

go get "github.com/davecgh/go-spew/spew"
go get "github.com/jinzhu/gorm"
go get "github.com/jinzhu/gorm/dialects/mysql"
go get "github.com/newrelic/go-agent"
go get "github.com/stianeikeland/go-rpio"
go get "github.com/streadway/amqp"
go get "go.uber.org/zap"

Install javascript libraries for web

cd pirrigo/src/pirri/static
bower install

Setting up SQL for testing

docker run --name sqldumpster -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:8
create database pirritesting;
GRANT ALL PRIVILEGES ON *.* TO 'pirritesting'@'%' IDENTIFIED BY 'pirritesting';
FLUSH PRIVILEGES;

Configuration file (example)

{
    "pirri": {
        "welcome_message":"L/P is demo/demo",
        "utc_offset": -8,
        "monitor_interval": 60,
        "rain_skip": true,
        "use_rabbit": false,
        "date_format": "2006-01-02 15:04:05"
    },
    "rabbitmq": {
        "server": "192.168.111.50",
        "port": "5672",
        "user": "rabbit",
        "secret": "bunnyrabbit!!",
        "task_queue": "pirri_go_work_dev"
    },
    "sql": {
        "dbtype": "mysql",
        "server": "localhost",
        "user": "pirritesting",
        "secret": "pirritesting",
        "db": "pirritesting",
        "port": "3306"
    },
    "newrelic": {
        "active": false,
        "license_path": "../../../nr_key"
    },
    "redis": {
        "host": "localhost",
        "port": "6379"
    },
    "web": {
        "port": "8001",
        "user": "demo",
        "secret": "demo"
    },
    "weather": {
        "wunderground_key": "",
        "state_abbreviation": "CA",
        "city": "Atascadero",
        "units": "imperial",
        "station": "KCAATASC69"
    },
    "debug": {
        "pirri": true,
        "gorm": false,
        "settings": false,
        "simulate_gpio": true,
        "log_path": "pirrigo.log"
    }
}

Running app

cd pirrigo/src/pirri
./pirri /path/to/config.json

Notes

TODO

  • Provide hardware assembly instructions
  • Better automate initial stand-up of database
  • Finish making the front end less offensive.
  • Make the calendar interactive (like in the original version, but prettier and more functional)

Manual submission of a station run with curl

(when not using authentication)

curl -X POST -d "{\"StationID\": 2, \"Duration\": 60}" http://localhost:8001/station/run
In case you're feeling generous

Bitcoin address: 17FC2XP5phFFupAn2w4dGCwQuDUWRXE4EQ

pirrigo's People

Contributors

vacovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.