Skip to main content

Python Driver for the BME280 Temperature/Pressure/Humidity Sensor from Bosch.

Project description

BME280 Python Driver

.. image::

.. image::

Python Driver for the BME280 Temperature/Pressure/Humidity Sensor from Bosch.

* Free software: BSD license
* Documentation:

Full credit to for most of the logic, I simply packaged
/ tidied it.


* i2c reading of the bme280 Temperature/Pressure/Humidity sensor
* munin plugins for graphing the results

Installation (Package)

For I2C access you must have the 'smbus' package available - for debian based systems install python-smbus.
If you wish to compile it, the packages required is smbus-cffi (

pip install bme280


Adafruit have a good run through of setting up their break out version of the bme280 at

You will need to know the i2c address being used by the bme280, it is usually 0x76 or 0x77. You can use

i2cdetect -y 1

To verify which devices are connected.


$ read_bme280 --help

usage: read_bme280 [-h] [--pressure] [--humidity] [--temperature]
[--i2c-address I2C_ADDRESS] [--i2c-bus I2C_BUS]

optional arguments:
-h, --help show this help message and exit
--i2c-address I2C_ADDRESS
--i2c-bus I2C_BUS


$ read_bme280 --i2c-address 0x77

1017.58 hPa
50.55 %
19.03 ℃


Three plugins are available in the /munin folder. To use them link them into /etc/munin/plugins:

ln -s /path/to/bme280/munin* /etc/munin/plugins

You can configure the plugins by editing /etc/munin/plugin-conf.d/munin-node and adding:

group i2c
env.I2C_ADDRESS 0x77

You can test it with:

sudo munin-run bme280_humidity


0.1.0 (2015-08-29)

* First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bme280, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size bme280-0.1.0.tar.gz (14.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page