Skip to content

draychev/phidgets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Measure Humidity and Temperature of your home with Phidgets and Prometheus

Here is how to build a Prometheus Dashboard showing the temperature and humidity in your home. This projcet leverages Phidgets (single-board computer + sensors) and another computer running Debian.

Hardware

  1. Phidgets Humidity/Temperature Sensor - the sensor that will measure temperature and humidity
  2. PhidgetSBC4 - an armhf Debian Bullseye running on a tiny Allwinner A20 Dual-Core ARM Cortex-A7

Python packages

  • flask
  • prometheus_client
  • Phidget22

Run

The prom.py file stitches the Promethous gauge and the Phidgets libraries. This exposes a /metrics endpoint from where a Prometheus server can scrape metrics.

Prometheus

Prometheus is a free software application used for event monitoring and alerting. Install it on a server (more powerful than the Phidgets SBC), which is on the same network (tailscale) as your Phidgets SBC. This machine will be performing periodic HTTP GET calls to the Phidgets SBC box.

  1. Install Prometheus
  2. Configure it:
$ cat /etc/prometheus/prometheus.yml
global:
  scrape_interval: 15s
  evaluation_interval: 15s
scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets:
        - 1.2.3.4:5000
  1. Connect to the Prometheus server: http://your-prometheus-server:9090/
  2. Query for Humidity and Temperature
  • Show a graph of humidity_gauge{location="SJC"} prom-humidity
  • Show a graph of temp_gauge{location="SJC"} prom-temperature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published