Fork from thro's homebridge-bme680 plugin providing bme680 support for homebridge which introduces the following
- Fixes
package.json
for compatibility with latest homebridge versions - A fork of bsec_bme680_linux to retain compatibility with this plugin
git clone https://github.com/milmber/homebridge-bme680.git
cd homebridge-bme680
npm install
npm run compile
- Install Homebridge
- Install this plugin
npm install -g homebridge-bme680/
(targeting the directory where this package was checked out to) - Compile bsec_bme680 executable by following the guide on milmber/bsec_bme680_linux
- Copy
bsec_bme680
andbsec_iaq.config
andbsec_iaq.state
(if created) to the Homebridge storagePath (e.g./var/lib/homebridge
) - Ensure the right permissions for the
bsec_iaq.state
file so that the Homebridge process can write to it. - Update your configuration file - see below for an example
Connect the BME680 chip to the I2C bus
accessory
"BME680"name
descriptive namename_temperature
(optional): descriptive name for the temperature sensorname_humidity
(optional): descriptive name for the humidity sensorname_air_quality
(optional): descriptive name for the air quality sensorrefresh
optional, time interval for refreshing data in seconds, defaults to 60 seconds.options
options for bme280-sensorspreadsheetId
( optional ): Log data to a Google sheet, this is part of the URL of your spreadsheet. ie the spreadsheet ID in the URL https://docs.google.com/spreadsheets/d/abc1234567/edit#gid=0 is "abc1234567". (TODO: not implemented, yet)
Example configuration:
"accessories": [
{
"accessory": "BME680",
"name": "Sensor",
"name_temperature": "Temperature",
"name_humidity": "Humidity",
"useBsecLib": true,
"bsecTempCompensation": -0.35,
"bsecHumidityCompensation": 4.0,
"name_air_quality": "Air Quality"
}
]
The option useBsecLib
only works if you placed compiled bsec_bme680 in homebridge storagePath.
By omitting this option this plugin relies on jvsbme680's sensor readings. In this case IAQ is just a dummy value.
There is an advantage using this simpler solution:
The temperature and humidity readings are much more precise in this case and no calibration & compensation is necessary in this case.
Once the compensation is this configurable I will elaborate this further.
For now see kvaruni's comment on calibration & compensation for gas readings:
https://forums.pimoroni.com/t/bme680-observed-gas-ohms-readings/6608/5
This plugin creates three services: TemperatureSensor, HumiditySensor and AirQualitySensor.
TODO: not implemented, yet
This presumes you already have a google account, and have access to google drive/sheets already
Step 1: Turn on the Drive API a. Use this wizard ( https://console.developers.google.com/start/api?id=sheets.googleapis.com ) to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
b. On the Add credentials to your project page, click the Cancel button.
c. At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button. I used 'Sheets Data Logger'
d. Select the Credentials tab, click the Create credentials button and select OAuth client ID.
e. Select the application type Other, enter the name "Drive API Quickstart", and click the Create button.
f. Click OK to dismiss the resulting dialog.
g. Click the file_download (Download JSON) button to the right of the client ID.
h. Move this file to your .homebridge and rename it logger_client_secret.json.
Step 2: Authorize your computer to access your Drive Account
a. Change to the directory where the plugin is installed i.e.
cd /usr/lib/node_modules/homebridge-mcuiot/node_modules/mcuiot-logger
b. Run the authorization module
node quickstart.js
c. Browse to the provided URL in your web browser.
If you are not already logged into your Google account, you will be prompted to log in. If you are logged into multiple Google accounts, you will be asked to select one account to use for the authorization.
d. Click the Accept button.
e. Copy the code you're given, paste it into the command-line prompt, and press Enter.
- homebridge-bme680
- homebridge-ds18b20
- homebridge-dht-sensor
- homebridge-dht
- trho/bsec_bme680_linux
- rxseger/homebridge-bme280
- jorisvervuurt/jvsbme680
- thro - for the original development of the homebridge-bme680 plugin
- NorthernMan54 - Barometric Pressure and Device Polling
- simont77 - History Service
- alexh-name - C wrapper for BME680 sensor BSEC library
- jorisvervuurt - Node.js module for Pimoroni's BME680 Breakout
MIT