Giter Club home page Giter Club logo

waveplus_exporter's Introduction

waveplus_exporter

Prometheus exporter for the Airthings Waveplus air sensor, based on their library

Raspberry Pi Setup

This worked for me on a raspberry pi 3.

System Setup

$ sudo systemctl start hciuart
$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# show
...
	Powered: yes
...

Python Setup

$ sudo apt install python3 python3-pip libglib2.0-dev python3-venv
$ export VENV=/opt/venv
$ sudo python3 -m venv $VENV && $VENV/bin/pip3 install python-dotenv prometheus_client bluepy
$ export PATH="$VENV/bin:$PATH"
$ sudo pip3 install bluepy prometheus_client

Prometheus Setup

A raspberry pi has more than enough compute to run a prometheus instance, this exporter, and plenty more. See the example config file.

$ prometheus --config.file example_prometheus_config.yml

Usage

usage: python3 waveplus_exporter.py [-h] [--port [PORT]] [--bind [BIND]] [--periodseconds [PERIODSECONDS]] --serialnumber [SERIALNUMBER]

optional arguments:
  -h, --help            show this help message and exit
  --port [PORT]         The TCP port to listen on (default: 9744)
  --bind [BIND]         The interface/IP to bind to (default: 0.0.0.0)
  --periodseconds [PERIODSECONDS] number of seconds to wait between sampling (default: 60)

Dashboard

Grafana dashboard

License

The original reader from Airthings uses the MIT License, and so does this.

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.