To run the program, use

sudo node example.js

You will see something like this:

Listening for RuuviTags...

Found tag: d2d41c4c3c1d

Warning: Ignoring tag d2d41c4c3c1d because it is not defined in the "tags" argument to RuuviStreamr(apiKey, tags): {

"dataFormat": 3,

"rssi": -49,

"humidity": 52,

"temperature": 29.47,

"pressure": 101205,

"accelerationX": 4,

"accelerationY": -28,

"accelerationZ": 1024,

"battery": 2977

}

Now copy the tag in the second line and open the file “example.js” in the “ruuvi-streamr” folder (which is found in the “node_modules” folder). Go to

const tags = {

'4457e1eccefc425fa577669c62cbb733': {

name: 'RuuviDemo Zug Fridge',

description: 'Streamr office fridge in Zug'

}

and replace the existing tag with your tag. You can also edit “name” and “description”. Do that for all the RuuviTags you want to connect and delete the tags you don’t need.

A few lines up you can see

const apiKey = 'MY-API-KEY'

Here you have to insert your API key, which you generated in Step 1 of this tutorial. After that you can save and run the file again as before. You should see something like:

Listening for RuuviTags...

Found tag: d2d41c4c3c1d (Ruuvi 1)

Found tag: e5bea69a5d65 (Ruuvi 2)

Created stream: Ruuvi 1 (WtomzCu6QneGX9Gf8XCjig)

Created stream: Ruuvi 2 (dBcAqFQPSd-trZbFW8aJmQ)

When you initially run the program, the streams will be created for you (next time you won’t see this output, because they already exist).