# Collecting RuuviTag measurements and displaying them with Grafana

**URL:** https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267
**Category:** 🇬🇧 Tell about your own use-case
**Created:** [7 April 2017 19:12 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267 "2017-04-07T19:12:26Z")
**Posts on this page:** 9
**Page:** 13

<div class="post-metadata">

### Author: ![maeklund86](https://f.ruuvi.com/user_avatar/f.ruuvi.com/maeklund86/32/2086_2.png) [@maeklund86](https://f.ruuvi.com/u/maeklund86)
#### Post date: [14 June 2020 15:28 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/249 "2020-06-14T15:28:17Z")

</div>

Hi all, I have a setup of 6 Ruuvitag bluetooth beacons, and a Raspberry Pi with RuuviCollector. On the same device, I have Grafana running, and have created a dashboard with some measures and panels:

 ![](https://f.ruuvi.com/uploads/default/original/2X/2/2461089943c0ee456dcbd5e160dd7cca894db841.png)

Now my issue is that the hostnames are MAC-codes, and at the moment I have them hard-coded by using “alias by”, depending on where the Ruuvitags are. What I would like to have is a way to maintain information about where a given Ruuvitag was at a certain time, and thus display only relevant data on the dashboard.

As an example, I have a tag that I initially had in my office room. I then moved it outdoors. I would like to separate these two situations in Grafana according to the metadata maintained manually, so that I get a valid min and max ranges for the office, and outdoors temperature. How could I achieve this?

---

<div class="post-metadata">

### Author: ![Scrin](https://f.ruuvi.com/user_avatar/f.ruuvi.com/scrin/32/326_2.png) [@Scrin](https://f.ruuvi.com/u/Scrin)
#### Post date: [14 June 2020 15:42 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/250 "2020-06-14T15:42:53Z")

</div>

The [tag naming](https://github.com/Scrin/RuuviCollector/blob/master/ruuvi-names.properties.example) feature of RuuviCollector is intended for this kind of use case; when the collector saves a measurement, it applies the _currently_ configured name (in addition to the MAC address) to the measurement, without affecting past measurements.

This allows you to use the `name` to track different places or other use cases, while still being able to use the `mac` to keep track of the physical tags. Of course if you frequently move tags around, it might be a bit cumbersome to keep updating the name config and restarting the collector when you move tags around.

Your use case is actually the reason I implemented a tag naming system on the collector side, as I was unable to find any other convenient ways to conveniently “rename” tags as I moved them around. Of course it has been a few years since then and a lot has changed in Grafana and InfluxDB so if someone knows about other/better ways these days please share.

---

<div class="post-metadata">

### Author: ![maeklund86](https://f.ruuvi.com/user_avatar/f.ruuvi.com/maeklund86/32/2086_2.png) [@maeklund86](https://f.ruuvi.com/u/maeklund86)
#### Post date: [14 June 2020 17:44 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/251 "2020-06-14T17:44:29Z")

</div>

Holy smokes, that’s perfect! I thought of this, but didn’t want to fiddle with the collector.  
It’s pretty rare that I move them around, so that won’t be an issue. Thanks for the feature and the answer!

---

<div class="post-metadata">

### Author: ![iTz\_EthqnHD](https://f.ruuvi.com/user_avatar/f.ruuvi.com/itz_ethqnhd/32/2098_2.png) [@iTz\_EthqnHD](https://f.ruuvi.com/u/iTz_EthqnHD)
#### Post date: [25 June 2020 19:17 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/252 "2020-06-25T19:17:14Z")

</div>

Can anyone make a tutorial? I have it all configured and setup the way I want/need but I have no clue how to start it…

---

<div class="post-metadata">

### Author: ![iTz\_EthqnHD](https://f.ruuvi.com/user_avatar/f.ruuvi.com/itz_ethqnhd/32/2098_2.png) [@iTz\_EthqnHD](https://f.ruuvi.com/u/iTz_EthqnHD)
#### Post date: [25 June 2020 21:00 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/253 "2020-06-25T21:00:07Z")

</div>

Ok, I got it to work. How can I make the collector turn on at startup?

---

<div class="post-metadata">

### Author: ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)
#### Post date: [25 June 2020 21:13 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/254 "2020-06-25T21:13:22Z")

</div>

Check the systemd section under Finishing Touches.

> **[Setting up Raspberry Pi as a Ruuvi Gateway](https://blog.ruuvi.com/rpi-gateway-6e4a5b676510?source=collection_home---2------14-----------------------)**
>
> \- updated 2020–01–29 -

---

<div class="post-metadata">

### Author: ![tambu](https://f.ruuvi.com/user_avatar/f.ruuvi.com/tambu/32/3421_2.png) [@tambu](https://f.ruuvi.com/u/tambu)
#### Post date: [23 February 2023 12:34 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/255 "2023-02-23T12:34:38Z")

</div>

Is there something new in [grafana.com](http://grafana.com), public key not available?  
I tried to **apt update** as usual

```auto
Err:5 https://packages.grafana.com/enterprise/deb stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9E439B102CF3C0C6
Fetched 91,5 kB in 1s (70,5 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

```

It may or may not be related to this, but my installation stopped collecting data 2023-02-22 05:50. Restarting any of the software makes no difference.

I have a Raspberry 3b listening to ruuvi tags, connected via ethernet to a pc, influxdb collecting data on the pc, and grafana publishing it [http://tambu.hopto.org:3000/d/N5c-wxD7k/foo?orgId=1&refresh=5m&from=now-7d&to=now](http://tambu.hopto.org:3000/d/N5c-wxD7k/foo?orgId=1&refresh=5m&from=now-7d&to=now)

---

<div class="post-metadata">

### Author: ![ejk](https://f.ruuvi.com/letter_avatar_proxy/v4/letter/e/aeb1de/32.png) [@ejk](https://f.ruuvi.com/u/ejk)
#### Post date: [23 February 2023 14:23 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/256 "2023-02-23T14:23:57Z")

</div>

IDK what the real reason was, but IIRC I used instrutions on [here](https://packages.grafana.com/oss/), copied below:

```auto
mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor > /etc/apt/keyrings/grafana.gpg
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list

```

Here are a links to the [updated Grafana install instructions](https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/) and [the reason for the key emergency rotation](https://community.grafana.com/t/problem-with-debian-repository-key/79788).

---

<div class="post-metadata">

### Author: ![tambu](https://f.ruuvi.com/user_avatar/f.ruuvi.com/tambu/32/3421_2.png) [@tambu](https://f.ruuvi.com/u/tambu)
#### Post date: [26 February 2023 17:00 UTC](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267/257 "2023-02-26T17:00:45Z")

</div>

It seems like batteries died or there was contact problem, at least one of my tags has history of turning off because it does not get juice from the battery and reviving as soon i touch it.

Changed battery, used some brown Prf 7-78 to clear the contacts which has proven to be good for this in the past. Upgraded batteries to [Ruuvi CR2477T -paristo, 5 kpl – Verkkokauppa.com](https://www.verkkokauppa.com/fi/product/830635/Ruuvi-CR2477T-paristo-5-kpl)

It seems that both android app and my raspberry are reading the tags now

So, two separate problems occurred almost simultaneously. Data collecting problems did not have anything to do with grafana changing download server etc.

[Previous page](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267.md?page=12)
