VSCP BME680 sensor handler
Project description
vscp-python-sensor-bme680
VSCP routines to deliver data from BME680 sensor to a VSCP daemon or a MQTT broker. It is built upon the Adafruit BME680 module
It will deliver VSCP events for
- Temperature
- Humidity
- Pressure (raw reading)
- Pressure (adjusted for sea level)
- Altitude
- Gas concentration
Typically used in a cron job to deliver the events on timed intervals.
Install
The script depends on some other modules that you need to install before using it. It is recommended to install everything in a virtual environment.
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
You may need to install Python venv
apt install python3-venv
Configparser
Configparser can be found on PyPi and is documented https://docs.python.org/3/library/configparser.html. Install with
pip3 install configparser
Install adafruit-circuitpython-bme680 module
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install adafruit-circuitpython-bme680
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-bme680
Install VSCP modules
pyvscphelper is not needed if only MQTT should be used. You can install the modules from PyPi
pip3 install pyvscp
pip3 install pyvscphelper
If you need them on more places either go for a global install or use a virtual environment and install all the modules in it.
Install MQTT module
For MQTT functionality Paho MQTT module is needed. You can install the modules from PyPi
pip3 install paho-mqtt
Install
You setup the code by editing the script. All relevant values are in the beginning of the file. Documentation is in the file.
If you are interested in learning more about VSCP the main site is here
Copyright © 2000-2020 Ake Hedman, Grodans Paradis AB - MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for pyvscp_sensors_bme680-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb95ad54e55d9af8f40d6385608c88e0cf4161988e8f05d83cd0da53374b96e |
|
MD5 | 4e043432117614e4a05b8eff874a0d7d |
|
BLAKE2b-256 | 9c231960d731abc6f0b4c579fe88b7a26ee0f6ec5a21ed6a84b0b9a4f7ee176e |