BME280 Python Driver
====================
.. image:: https://img.shields.io/travis/kbrownlees/bme280.svg
:target: https://travis-ci.org/kbrownlees/bme280
.. image:: https://img.shields.io/pypi/v/bme280.svg
:target: https://pypi.python.org/pypi/bme280
Python Driver for the BME280 Temperature/Pressure/Humidity Sensor from Bosch.
* Free software: BSD license
* Documentation: https://bme280.readthedocs.org.
Full credit to https://github.com/IDCFChannel/bme280-meshblu-py for most of the logic, I simply packaged
/ tidied it.
Features
--------
* 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 (https://pypi.python.org/pypi/smbus-cffi/)
Then:
pip install bme280
Usage
-----
Adafruit have a good run through of setting up their break out version of the bme280 at
https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout/wiring-and-test
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.
Then:
$ 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
--pressure
--humidity
--temperature
--i2c-address I2C_ADDRESS
--i2c-bus I2C_BUS
Example:
$ read_bme280 --i2c-address 0x77
1017.58 hPa
50.55 %
19.03 ℃
Munin
-----
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:
[bme280_*]
group i2c
env.I2C_ADDRESS 0x77
You can test it with:
sudo munin-run bme280_humidity
History
-------
0.1.0 (2015-08-29)
---------------------
* First release on PyPI.
Metadata
Release files for bme280 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bme280-0.1.0.tar.gz | 14.8 kB | Without provenance | Details for bme280-0.1.0.tar.gz |
Release files / bme280-0.1.0.tar.gz
| Download URL | bme280-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ceaf7d15887f7e575dff8db871ed795c2e483c97c54f100a59e90208c1f1df0f
|
|
BLAKE2b-256 checksum How to use checksums |
c69140fac5354cd6878c6ea27c1629864ec0e548c6c3802f54764112f8ae9a23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for bme280 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.