Giter Club home page Giter Club logo

bme680_to_influxdb's Introduction

bme680_to_influxdb - BME680 Monitoring with InfluxDB

This script sends the data from the RaspberryPI Bosch BME680 module to a InfluxDB. The script itself and the documentation is work-in-progress. However, feel free to open issues for your questions and ideas.

Feel free to read the full story on how to send BME680 sensor logs with a RaspberryPi to InfluxDB and into Grafana on ayeks.de.

Installation

InfluxDB on a RaspberryPI

Download and install the InfluxDB ARM package:

wget http://ftp.us.debian.org/debian/pool/main/i/influxdb/influxdb_1.1.1+dfsg1-4+b2_armhf.deb
sudo dpkg -i influxdb_1.1.1+dfsg1-4+b2_armhf.deb 

Modify influxdb.conf to enable admin GUI and restart the database.

sudo nano /etc/influxdb/influxdb.conf 
sudo service influxdb restart

Go to the admin GUI of the InfluxDB and create a new database with the name logger:

# goto: http://localhost:8083/
CREATE DATABASE "logger"

BME680_to_InfluxDB on a RaspberryPI

You need the bme680 python lib, the InfluxDB client and the bme680_to_influx script.

pip3 install -r requirements.txt 
git clone https://github.com/ayeks/bme680_to_influxdb

Go to the config.ini file and change the values to match your environment. You should change at least host, user and the password.

Execution

Simply call: python3 senddata.py "./config.ini" .

Often you want your Raspberry to execute the senddata script automatically after it started. Use the following to do so:

# automated startup:
sudo nano /etc/rc.local
python3 /home/pi/senddata.py "/home/pi/config.ini" &

Analysis

Collecting data is just half the fun without proper analyzing. To crawl through your data just use the InfluxDB admin GUI:

# select the "logger" database first!
# show all available measurements
SHOW MEASUREMENTS

# show available tags for measurement
SHOW TAG KEYS FROM "dev"

# get results by measurement
select * from dev

In this repo is the JSON included that generates the following Grafana Dashboard:

Grafana BME680 Dashboard

Credits

Thanks to John Whittington who wrote an awesome tutorial for InfluxDB on a RaspberryPI, to Sandy Macdonald who wrote the Pimoroni tutorial Getting Started with BME680 Breakout and all the contributors on the bme680 python lib.

bme680_to_influxdb's People

Contributors

ayeks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.