Giter Club home page Giter Club logo

ruuvitag-gollector's Introduction

ruuvitag-gollector

Collects data from RuuviTag sensors to InfluxDB and other databases.

Supports the RAWv2 format emitted by RuuviTags with 2.x firmware.

Setup

Compile and install the ruuvitag-gollector binary:

git clone https://github.com/niktheblak/ruuvitag-gollector.git
cd ruuvitag-gollector
make build
make install

Then copy the example configuration file configs/example-config.yaml to $HOME/.ruuvitag-gollector/config.yaml or /etc/ruuvitag-gollector/config.yaml if you're installing the collector globally. and fill your preferred configuration values. For reference of possible configuration values, run ruuvitag-gollector -h.

At the very least you need to add the MAC addresses and human-readable names of your RuuviTags into the config file under the ruuvitags key:

ruuvitags:
  "CC:CA:7E:52:CC:34": Backyard
  "FB:E1:B7:04:95:EE": Upstairs
  "E8:E0:C6:0B:B8:C5": Downstairs

If you want to save data to InfluxDB (local or remote), add the following options to your config file:

influxdb:
  enabled: true
  addr: http://localhost:8086
  database: ruuvitag
  measurement: ruuvitag
  username: root
  password: root

For a complete configuration example, see example config.

The following exporters are supported for sending measurements:

  • InfluxDB
  • PostgreSQL
  • Webhook, meaning a URL that accepts an HTTP POST request with the measurement as JSON in the request body
  • AWS DynamoDB
  • AWS SQS
  • GCP Pub/Sub
  • MQTT

See the command-line help for the arguments needed by each exporter:

ruuvitag-gollector -h

Running

Now you can try to run it manually (you typically need to run as root to allow the collector process access to Bluetooth hardware):

sudo ruuvitag-gollector collect

To collect values continuously, run:

sudo ruuvitag-gollector daemon

Complete Example Configuration

interval: 0m

ruuvitags:
  "CC:CA:7E:52:CC:34": Backyard
  "FB:E1:B7:04:95:EE": Upstairs
  "E8:E0:C6:0B:B8:C5": Downstairs

influxdb:
  enabled: true
  host: http://localhost:8086
  database: ruuvitag
  measurement: ruuvitag_measurement

aws:
  access_key_id: MYAWSAKKESSKEY
  secret_access_key: "my+aws+secret+key"
  region: us-east-2
  dynamodb:
    enabled: true
    table: ruuvitag
  sqs:
    enabled: true
    queue.url: "https://us-east-2.queue.amazonaws.com/321667262165/measurements"

postgres:
  enabled: true
  conn: "postgres://postgres:mysecretpassword@postgres/postgres?sslmode=disable"
  table: measurements

http:
  enabled: true
  url: https://my-api.herokuapp.com/receive
  token: MyHerokuToken
  
mqtt:
  enabled: true
  addr: "ssl://localhost:8883" # tcp://localhost:1883 for non-TLS connections
  client_id: ruuvitag-gollector
  username: mqtt_user
  password: my_secret_password
  ca_file: root_ca.pem
  auto_reconnect: true
  reconnect_interval: 30

ruuvitag-gollector's People

Contributors

dependabot[bot] avatar henkru avatar niktheblak avatar renovate[bot] 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.