Giter Club home page Giter Club logo

chili-metrics's Introduction

chili-metrics

Very simple planter monitoring

Disclaimer

This is a quick-and-dirty toy project meant to run on a secured home network.

Pictures

dashboard screenshot Hardware setup

Hardware

Hardware Setup

  1. Connect the USB webcam to the raspberry pi
  2. Connect the humidity sensor to the raspberry pi (3-pin)(4-pin)

Installation

  1. Raspberry Pi OS Lite
  2. Grafana
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install -y grafana
sudo /bin/systemctl enable grafana-server
sudo /bin/systemctl start grafana-server
sudo grafana-cli plugins install pierosavi-imageit-panel
sudo /bin/systemctl restart grafana-server

  1. Prometheus
mkdir -p pics prometheus/data
wget https://github.com/prometheus/prometheus/releases/download/v2.25.0/prometheus-2.25.0.linux-armv7.tar.gz
tar xfz prometheus-2.25.0.linux-armv7.tar.gz
mv prometheus-2.25.0.linux-armv7/prometheus prometheus/
cp prometheus.yml ~/prometheus/

sudo cp prometheus.service /etc/systemd/system/
sudo systemctl enable prometheus.service 
sudo systemctl start prometheus
curl localhost:9090/
  1. Humidity Exporter
chmod 755 humidity.py
sudo cp humidity_exporter.service /etc/systemd/system/
sudo systemctl enable humidity_exporter.service 
sudo systemctl start humidity_exporter
curl localhost:9817
  1. Webcam
chmod 755 take_picture.sh
sudo apt install fswebcam
crontab -e
* * * * * /home/pi/take_picture.sh 2>&1 >> /dev/null
  1. File Server
sudo cp python_http_server.service /etc/systemd/system/
sudo systemctl enable python_http_server.service 
sudo systemctl start python_http_server
  1. Grafana Setup
    1. Log into grafana (raspberry pi's ip:3000) with admin/admin. Change the password.
    2. Left panel -> Gearbox -> Data Sources -> Add Data Source -> Prometheus -> http://RPI_IP_ADDRESS:9090/ -> Save & Test
    3. Left panel -> + sign -> Import -> Upload JSON file -> Chili_Metrics.json
    4. Live Cam -> edit -> Panel -> Display -> Image URL: Change 192.168.1.116 to RPI_IP_ADDRESS -> Save

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

chili-metrics's People

Contributors

jeremybz avatar

Stargazers

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