Giter Club home page Giter Club logo

aranet4-exporter-go's Introduction

aranet4-exporter-go

aranet4-exporter-go is a Prometheus exporter for the Aranet4 environmental sensing devices. Use this to add the CO2, temperature, and humidity readings from your Aranet4 devices to your Prometheus dashboards.

Requirements

aranet4-exporter-go should work on most modern Linux system with Bluetooth support.

It has been tested on these platforms:

  • x86 Ubuntu 22.04
  • Raspberry Pi / Raspbian 3b 32-bit

Installing

Debian-based distributions can download .deb packages from the releases.

Setup

These instructions assume you are on a system using systemd and bluetoothctl.

  1. Use bluetoothctl to pair with your Aranet4 device as follows:

    $ bluetoothctl
    > power on
    > scan on
    > scan off
    # find the MAC address of the Aranet4 device in the output.
    > pair XX:XX:..
    # ... enter passcode shown on Aranet4 ...
    > trust XX:XX:..
  2. If bluetoothctl is not installed, you may need to install it:

    # Raspbian
    $ sudo apt-get install --no-install-recommends bluetooth pi-bluetooth bluez
    # Other distros
    $ sudo apt-get install --no-install-recommends bluetooth bluez
  3. Add the MAC address and optional nickname of your devices to /etc/default/aranet4-exporter.

  4. Run systemctl restart aranet4-exporter.

  5. Run journalctl status aranet4-exporter to get the port that the daemon was started on, and add the URL to your Prometheus collector. Example: TODO(ryansouze)

Releasing

Building release with goreleaser

To add a new versioned release:

$ git tag -a v0.1.0 -m "v0.1.0"
$ git push origin v0.1.0

Building snapshot release with goreleaser

Snapshot build:

$ podman run --rm --privileged \
    -v $PWD:/go/src/github.com/user/repo \
    -w /go/src/github.com/user/repo \
    -e GITHUB_TOKEN \
    docker.io/goreleaser/goreleaser release --snapshot --rm-dist

aranet4-exporter-go's People

Contributors

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