aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 2ea876f34544ad788a54fb6a1e9a057839c1c5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ruuvitag-upload

A tool for collecting a set of ruuvitag sensor measurements
and uploading them for further processing.

The measurements are formatted as JSON with the following
structure

    {
        "<ALIAS>": {
            "address": "XX:XX:XX:XX:XX:XX",
            "timestamp": <seconds since unix epoch>,
            "humidity": <0-100%>,
            "pressure": <kPa>,
            "temperature": <Celcius>,
            "battery_potential": <volts>
        },
        ...
    }

where ALIAS will either be the address of the sensor, or
an alias that you can define.

If uploading measurements fails, the measurements are
cached. The cached measurements are uploaded the next time
ruuvitag-upload is called. Cached measurements are uploaded
first, from oldest to newest. If uploading cached measurements
fails, the current measurements are again cached for next time.
This way, you won't lose any measurements. When a cached
measurement is succesfully uploaded, the cache entry will be
removed.

Parts of the program are inspired by and some parts are copied from [ruuvitag-listener](https://github.com/lautis/ruuvitag-listener).

## USAGE

    ruuvitag-upload [--url=URL] <sensor>...
    ruuvitag-upload -h | --help
    ruuvitag-upload --version

## ARGUMENTS

    <sensor>...

        A sensor address and optionally a human-readable
        alias. You can either specify the address as
        XX:XX:XX:XX:XX:XX or you can attach a human-
        readable alias to the address
        XX:XX:XX:XX:XX:XX=mysensor.

## OPTIONS

    -u URL, --url=URL

        Where the measurements are uploaded to. If you don't
        specify this, the measurements are written to stdout.

    -h, --help

        Show this message.

    --version

        Show the version number.