Collecting RuuviTag measurements and displaying them with Grafana

Hello otso, Iā€™m new to Grafana. How do I update the mac addresses? Iā€™m not sure how to update the mac addresses. Can you point me to any resources on this? Or do you have instructions on how to do that?
I tried updating the mac addresses via the drop-downs, I think, of my 4 ruuvitags (running latest weather firmware; tried both in normal mode and high precision) in Temperature dashboard but I think it broke it. Not sure what I did wrong of if that is how to do it.

hcitool lescan shows my tags are broadcasting and the pi3 can see the tags. Thanks

It looks my rvitag mac addresses show up under the drop down menus, along with the 4 previous build mac addresses, do I simply change those to mine? When I do change those mac address to mine there isnā€™t any data posting.

Hi, you need to sign in (admin/admin, please change)


Click on frame of the panel and then ā€œeditā€

Open a measurement window and change mac address. Youā€™ll have ā€œknownā€ mac addresses in dropdown menu.

Wow, perfect, thanks. I forgot to change admin in Grafana thanks. I also thought it was updating the dashboards automatically, but it wasnā€™t, so I had to change it to a new range (last 15 minutes) that proved the updates were working. Thanks.

Do you know if Ruuvi is going to allow remote query timing? Right now in high precision it updates fast but grafana is only pulling in every 10 seconds. Itā€™d be good to be able to tell the rtags how often you want to get a sensor read. Do you know if that is in the works and/or possible?

Thanks for all your help!

The throttling you are seeing is intentional on the RuuviCollector, by default it will save at most one measurement per tag per 9.9 seconds. You can change this setting from the configuration file: ruuvi-collector.properties which is located in the same directory as the ruuvicollector .jar file. If the configuration file does not exist, you can create it and enter the values manually. The setting controlling the update limit is influxUpdateLimit which has a default value of 9900 (itā€™s in milliseconds). You can find more up-to-date information about the config in the example configuration. Donā€™t forget to restart the RuuviCollector after creating/changing the configuration

The reason for this kind of limiting is to avoid too many values getting persisted, especially if running slow hardware like the raspberry pi, or if you are collecting measurements from a lot of tags, so you should experiment with different limits like 1 second or 100 milliseconds to see what fits your needs and work with your setup.

Great thanks.
Two questions.

  1. Is there a way to set the tag read rate so to reduce power consumption? Iā€™m wondering only to calculate the life of the tag in high-precision mode.
  2. Do you know the power usage level of the tag in high precision mode? I did see the Trello post regarding power usage: "Applications generally use ~2-10 ĀµA while idle, ~1.3 ĀµA on shutdown. Peak currents can reach ~13 ĀµA when radio is operated."
    Thanks, and the ruuvitags are awesome.

Transmitting the values is what consumes the most power, if I recall correctly, at 10s transmission interval the average power consumption is <8ĀµA, which means about 8.5 years with the battery thatā€™s shipped with the tag. The reality less though, especially since the shelf life of lithium batteries is 5-8 years, closer to 8 years with the size used by the tags. The transmission interval can be changed in bluetooth_config.h

Awesome. Thanks. Iā€™ll look into that. Even if at 13ĀµA it could last for 6 years!

Hi everybody.
Sorry for my poor english, but iā€™m French :slight_smile:

I have 2 tags in raw mode (I verify it with the android application). I change the mac adress to chose these 2 tags ( mac adress appear autmatically in the dropdown menu, so I think the raspberry has seen the 2 tags).

But no data appears on the temperature graph in Grafana even If I force the update.

Any idea or other procedures to complete ?
Cyril

First, you should verify that you have the right time and date on the raspberry, as the metrics are stored using the time on the raspberry pi.

Second thing to try is to set a lower limit in the ā€œGroup by time interval:ā€ near the bottom of the page, this value should be roughly the same or little higher as the measurement collection interval, for example ā€œ>10sā€.

Setting too low value may create unwanted gaps in the graph or make the entire graph invisible, and too high value will make the graph resolution low.

1 Like

Clock was OK. The problem was with the period of time displayed. It was stay on the period of may 2017.
In changing to displqy thisday, all the value of my tag appear :):grin:
Iā€™m happy. I 'm going to continue to deal with this tag.

How to access to the other parameters, acceleration for example ?

Create another Graph panel (or any other panel type you want) and choose another metric type in the ā€œFROMā€ section:

With acceleration, remember to either choose a specific axis (or total) in the ā€œWHEREā€ section or use the ā€œGROUP BYā€ functionality, otherwise Grafana donā€™t know how to interpret the values for different axes properly and you will end up with incorrect values on the graph.

1 Like

Thanks Scrin.
Iā€™ve understood that Grafana present the data which are stored in influxDB by a script.

As I want to developp a system on my raspberry to receive acceleration, make some tests to know if the tag has moved, then send SMS or email, could you say me where is the script wich received the data (in what directory) in order to you as a model for my own script ?

Other question. Is it possible to program the tag to send acceleration just when the tag moves, rather than monitoring on the raspberry all the time the data received and comput to know if the accelaration has changed ?
Cyril

Send acceleration only when tag moves would have some issues with parsing, since youā€™d have variable-length data fields. You could consider sending another ā€œmovingā€ byte instead.

The source code for the reading, parsing and putting to InfluxDB can be found on my Github, here, itā€™s written in Java. You can use that as an example if you want to create your own ā€œnotifier scriptā€ or look up other alternatives. Basically my code just uses hcidump to read the data, and then just parse the output.

I started hacking on something last night to do exactly this. RuuviCollector shells out to a Linux-only program, and Iā€™m working on macOS. I whipped up https://github.com/blalor/ruuvi-to-influxdb in node.js; it uses node-ruuvitag which is more cross-platform. I did find that the tag IDs change depending on where I run it from; not sure whatā€™s up with thatā€¦ It reads a config file that provides a label based on the tag ID, so the point in influxdb has a label tag such as ā€œoutsideā€ or ā€œdownstairsā€. Itā€™s working well for me so far.

1 Like

Hey man,

Can I get your email so I can talk to you about the Ruuvi tags?

I would greatly appreciate your technological mind!

Thanks

How do you take the Tag ID? If the ID is given by the stack, the ID is at least pseudo-random on some platforms.
Generally using MAC address as ID is reliable.

The tag ID comes from noble via node-ruuvitag. Iā€™ve run my script on a MacBook Pro running Sierra (10.12.6) and a Mac mini (still) running Yosemite (10.10.5). It appears that noble uses the same bluetooth bindings for both, but there are perhaps underlying differences in the hardware or OS that cause a different UUID to be presented. That doesnā€™t make any sense to me, either, but thatā€™s my experience.

1 Like

Ok Scrin. I think initially that it was python script which was used to listen the tag.
I prefer java to program :slight_smile:
I 'm going to look at your code to make an adaptation for my needs.
I 'll comme back to you I think if I 've other questions

Hi, is there any instructions for dummies? :smile:
I think that was just install the image to sdcard and plug to raspberry. Iā€™m so beginner with this.