Home

Awesome

RuuviCollector

RuuviCollector is an application for collecting sensor measurements from RuuviTags and storing them to InfluxDB. For more about how and for what this is used for, see this post.

Do you have a Ruuvi Gateway? You might be insterested in RuuviBridge instead. You can also use ruuvi-go-gateway if you want to upgrade to the "new stack" without needing a physical Ruuvi Gateway, or want to use a mix of both.

Note: This tool is primarily intended for advanced users, so some knowledge in Linux and Java might be necessary for fully understanding how to use this. However there is a more beginner friendly setup "guide" here

Features

Supports following RuuviTag Data Formats:

Additionally basic support for iBeacon and Eddystone exists:

Supports following data from the tag (depending on tag firmware):

Ability to calculate following values in addition to the raw data (the accuracy of these values are approximations):

See MEASUREMENTS.md for additional details about the measurements.

Requirements

Building

Execute

mvn clean package

Installation

Automatic Setup

Service scripts and other necessary stuff for "properly installing" this are available in the service-setup directory.

Manual Setup

sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hcitool`
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hcidump`

Configuration

The default configuration which works without a config file assumes InfluxDB is running locally with default settings, with a database called 'ruuvi'. To change the default settings, copy the ruuvi-collector.properties.example file as ruuvi-collector.properties in the same directory as the collector jar file and change the settings you want. Most up-to-date information about the supported configuration options can be found in the ruuvi-collector.properties.example file.

To give human readable friendly names to tags (based on their MAC address), copy the ruuvi-names.properties.example file as ruuvi-names.properties in the same directory as the collector jar file and set the names in this file according to the examples there.

Running

For built version (while in the "root" of the project):

java -jar target/ruuvi-collector-*.jar

Easily compile and run while developing:

mvn compile exec:java

Docker

Dockerized installation is possible with the bundled Dockerfile, which is particularly useful for "server-grade" installations. The Docker image can be built with for example:

docker build -t ruuvi-collector .

Note: if you have configuration files present in the current directory, they will be added to the built image. Alternatively they can be mounted inside the container while running.

Depending on the configuration, it may be necessary to use --net=host (to access the host network stack directly) and/or --privileged (to access a local BLE adapter directly), for example:

docker run --name ruuvi-collector --privileged --net=host -d ruuvi-collector