Giter VIP home page Giter VIP logo

h2o-monitor's Introduction

H2O-monitor

A Python script for a Raspberry Pi running Raspian counting the waterflow of valves with reed pulse switches.

Reports readings to a DB (InfluxDB) and visualizes them with a Grafana Dashboard

alt text alt text

project setup

on a raspberry pi with raspian

install database server

echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt update
sudo apt install influxdb
sudo systemctl enable influxdb
sudo systemctl start influxdb

influx

CREATE DATABASE h2oflow


install grafana visualization

sudo apt-get install -y adduser libfontconfig sudo wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.4.0_armhf.deb sudo dpkg -i grafana_5.4.0_armhf.deb


edit grafana config to run on port 80
sudo nano /etc/grafana/grafana.ini

http_port = 80


sudo setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server

sudo systemctl daemon-reload sudo systemctl enable grafana-server sudo systemctl start grafana-server


clone this repo 

cd /opt sudo apt-get install git sudo git clone https://github.com/planet-winter/H2O-monitor.git cd /opt/H2O-monitor


install requirements

sudo apt-get install python3-pip sudo pip3 install --upgrade -r requirements.txt


Setup grafana dashboard.
* open the systems IP address or hostname in a browser
* log in with admin and password admin
* in a new dashboard settings tab enter the dashboard.json content

Setup grafana Postgres data source
* goto configureation > data souces
* choose PostgreSQL
* enter Host: localhost and h2o as credentials and db name


autostart service 

sudo cp ./h2o-monitor.service /etc/systemd/system/ sudo systemd daemon-reload sudo systemd enable h2o-monitor sudo systemd start h2o-monitor




## Web Overview

open the systems IP address or hostname in a browser

h2o-monitor's People

Contributors

planet-winter avatar

Stargazers

 avatar

Watchers

 avatar  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.