Collecting RuuviTag measurements and displaying them with Grafana


#158

The grafana default port is 3000, We’re using 3001 in some other applications


#159

Never mind. I must have changed it to 3001 on my very first install and propagated that through my own image when the online image got corrupted. My bad.

However, a note of relevance from the grafana docs if you are deploying sensors in a multi-user environment: “The default Grafana port is 3000, this port requires extra permissions on windows. Edit custom.ini and uncomment the http_port configuration option (; is the comment character in ini files) and change it to something like 8080 or similar. That port should not require extra Windows privileges.”

http://docs.grafana.org/installation/windows/


#160

Thanks for updated image, it works fine now!. Just few observations:

  1. If you have latest Raspberry 3B+ , it is not able to boot with that (http://storage.ruuvi.com/ruuviberry_2018_04_18.img.zip) image. Most straightforward way to get it working is to boot older raspberry with the image installed on Micro-SD card and run
    $ sudo apt update
    $ sudo apt upgrade
    After update, you may boot 3B+ with the card.

  2. Tags work reliably with 3B+, but just as a side note, there seems to be temperature compensation problem with tags. I have one tag monitoring Green House where temperature changes during the night. That seems to affect readings that should be otherwise stable, like battery voltage and acceleration. See graphs (Brown line is Green house, others are inside the house).

Temperature:
temp

(as a new user I have to upload other images in separate posts below)

As you can see Acceleration changes only with GreenHouse sensor but no others (so it’s not moon affecting Earths G).

Is/should Ruuvi use voltage regulator instead of relying on battery voltage, which is known (because of Lithium) to be affected on Temp. In Bosh chip data sheet there is instructions on compensation of readings, are they applied? I haven’t check accelerometer chip data sheets what it says about compensation.
Our tomatoes can live with this error, but if more certainty on readings is needed, one way is to (Temp) calibrate sensors and apply corrections to DB.

Nice work with Ruuviberry image and Ruuvi Collector!
PS: In case someone has Bluetooth problems with PI after using BT keyboard or mouse, you must ‘unpair’ them first, to allow BT adapter to go to HCI-mode. Wireless keyboards etc. are HID devices and cannot be used at the same time (not even configured).


#161

Battery voltage:
batteryVoltage


#162

Acceleration:


#163

Hello,

The battery voltage really varies with the temperature, so there is nothing to compensate.

Both humidity and pressure calculation use temperature when converting from raw ADC value to physical value.

Accelerometer is not temperature compensated, as STM does not provide any kind of compensation curve.


#164

Is there a change log or something for the ruuviberry image? I got 2018-05 image without e.g. apache and trouble setting date and getting network via ethernet.

I am also not able to get the ruuvi-names.properties to work, the tags show up as e.g. ruuvi_measurements.mean {mac: E6034A5BF58D}


#165

Also, I am not able to run hcitool lescan without Input/Output error
I have to run sudo hciconfig hci0 reset first to get it to work.


#166

There’s no changelog, but you can find the description of image at https://lab.ruuvi.com/ruuvitag-fw/ .
What version of Raspberry Pi you’re running?

Grafana shows all tags by mac on default, you can configure the aliases if you want to.


#167

For the name tags to work you need to add a GROUP BY clause as tag (name) in the panel configuration on the Metrics tab, because otherwise InfluxDB will not return the names to Grafana. The example planels have only tag (mac) as the GROUP BY. After that you can set ALIAS BY to $tag_name for example.


#168

Is there a way to change the temperature measurement and display to Fahrenheit in the JSON file that you import into Grafana???

Thanx in Advance


#169

You could configure the conversion with math operation in value field


#170

I was never that good at math…How would I go about configuring it?


#171

I think this should do the trick.


#172

OK, Thanx a bunch!!!


#173

I’ve got Raspberry pi 3


#174

hey guys, could anyone please help me with a tickscript?

goal: get notificated when humidity of Ruuvi1 is lower than humidity of Ruuvi2.
my actual try after some fails:

{{{
var ruuvi1= stream
|from()
.database(‘ruuvi-measurements’)
.retentionPolicy(‘autogen’)
.measurement(‘humidity’)
.where(lambda: “name” == ‘ruuvi1’)
.groupBy(*)
|httpOut(‘ruuvi1’)

var ruuvi2= stream
|from()
.database(‘ruuvi-measurements’)
.retentionPolicy(‘autogen’)
.measurement(‘humidity’)
.where(lambda: “name” == ‘ruuvi2’)
.groupBy(*)
|httpOut(‘ruuvi2’)

ruuvi1
|join(ruuvi2)
.as(‘ruuvi1’, ‘ruuvi2’)
.tolerance(1s)
|httpOut(‘join’)
|eval(lambda: “ruuvi1” < “ruuvi2”)
.as(‘diff’)
|alert()
.message(‘test’)
.telegram()
.chatId(‘6’)

}}}


#175

how can I remove the wifi hotspot and connect to a router with the image? As it was before.

edit: got the br0 removed…

/Andre’


#176

Hello,
One more thing…How do you convert Pascals to Inches of Mercury (inHg) in Grafana???

Please lemme know.

Thanx.


#177

Hello,

You could use the math function to convert the value