Join our Discord Server
Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

Sensor Data Collection and Analytics – From IoT to Cloud in 5 Minutes

3 min read

The BME680 is a digital 4-in-1 sensor with gas, humidity, pressure, and temperature measurement based on proven sensing principles. The state-of-the-art BME680 breakout lets you measure temperature, pressure, humidity, and indoor air quality, and is Raspberry Pi and Arduino-compatible!

The sensor module is housed in an extremely compact metal-lid LGA package with a footprint of only 3.0 × 3.0 mm² with a maximum height of 1.00 mm (0.93 ± 0.07 mm). Its small dimensions and its low power consumption enable the integration in battery-powered or frequency-coupled devices, such as handsets or wearables.

Typical applications

You can use this breakout to monitor every aspect of your indoor environment. Its gas resistance readings will react to changes in volatile organic compounds and can be combined with humidity readings to give a measure of indoor air quality. Here are the list of typical applications:

– Indoor air quality
– Home automation and control
– Internet of things
– Weather forecast
– GPS enhancement (e.g. time-to-first-fix improvement, dead reckoning, slope detection)
– Indoor navigation (change of floor detection, elevator detection)
– Outdoor navigation, leisure and sports applications
– Vertical velocity indication (rise/sink speed)


  • Measuring temperature, pressure, humidity, air quality sensor
  • I2C interface, with address select via ADDR solder bridge (0x76 or 0x77)
  • 3.3V or 5V compatible
  • Reverse polarity protection
  • Raspberry Pi-compatible pinout (pins 1, 3, 5, 7, 9)
  • Compatible with all models of Raspberry Pi, and Arduino
  • Python library
  • Datasheet

Let us see how to fetch sensor data from BME680 on the NVIDIA Jetson Nano board and send it to the Cloud Platform.

Hardware requirements:

  • Jetson Nano: 2GB Model ($59)
  • A 5V 4Amp charger
  • 128GB SD card
  • BME680 sensors

Software requirements:

  • Jetson SD card image from NVIDIA
  • Etcher software installed on your system

You can run RedisTimeSeries directly over an IoT Edge device. Follow the below steps to build RedisTimeSeries Docker Image over Jetson Nano:

Verifying Docker version

SSH to your Jetson Nano board equipped with BME680 sensor and install Docker

pico@pico1:~$ docker version
Client: Docker Engine - Community
 Version:           20.10.3
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        48d30b5
 Built:             Fri Jan 29 14:33:34 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
  Version:          20.10.6
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8728dd2
  Built:            Fri Apr  9 22:43:42 2021
  OS/Arch:          linux/arm64
  Experimental:     false
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
  Version:          0.19.0
  GitCommit:        de40ad0

Verifying if Sensor is detected

i2cdetect -r -y 1
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- --

Building Docker Image for RedisTimeSeries for Jetson Nano

git clone --recursive
cd RedisTimeSeries.git
docker build -t ajeetraina/redistimeseries-jetson . -f Dockerfile.jetson.edge

Running RedisTimeSeries

docker run -dit -p 6379:6379 ajeetraina/redistimeseries-jetson

Verifying if RedisTimeSeries Module is loaded

redis-cli> info modules
# Modules

Clone the repository

$ git clone
$ cd redis-datasets/redistimeseries/realtime-sensor-jetson

Running Sensorload Script

sudo python3 --host localhost --port 6379

Running Grafana on Jetson Nano

docker run -d -e "GF_INSTALL_PLUGINS=redis-app" -p 3000:3000 grafana/grafana

There you go..

Point your browser to https://:3000. Use “admin” as username and password to log in to the Grafana dashboard.


Click the Data Sources option on the left side of the Grafana dashboard to add a data source.


Under the Add data source option, search for Redis and the Redis data source will appear as shown below:


Supply the name, Redis Enterprise Cloud database endpoint, and password, then click Save & Test.

Click Dashboards to import Redis and Redis Streaming. Click Import for both these options.


Click on Redis to see a fancy Grafana dashboard that shows the Redis database information:


Finally, let’s create a sensor dashboard that shows temperature, pressure, and humidity. To start with temperature, first click on + on the left navigation window. Under Create option, Select Dashboard and click on the Add new panel button.


A new window will open showing the Query section. Select SensorT from the drop-down menu, choose RedisTimeSeries as type, TS.GET as command and ts”temperature as key.


Choose TS.GET as a command.


Type ts”temperature as the key.


Click Run followed by Save, as shown below:


Now you can save the dashboard by your preferred name:


Click Save. This will open up a sensor dashboard. You can click on Panel Title and select Edit.


Type Temperature and choose Gauge under Visualization.


Click Apply and you should be able to see the temperature dashboard as shown here:


Follow the same process for pressure (ts:pressure) and humidity (ts:humidity), and add them to the dashboard. You should be able to see the complete dashboard readings for temperature, humidity, and pressure. Looks amazing. Isn’t it?


Please follow and like us:

Have Queries? Join

Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

Exploring the Cloud-Native Ecosystem: A Beginner’s Guide to the…

The Cloud Native Computing Foundation (CNCF) is a non-profit organization founded in 2015 with the goal of advancing the development and adoption of cloud-native technologies. The...
Ajeet Raina
3 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Join our Discord Server