New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ability to calibrate temperature for BME680 #19684

Merged
merged 2 commits into from Jan 2, 2019

Conversation

Projects
None yet
5 participants
@ctborg
Copy link
Contributor

ctborg commented Dec 31, 2018

Description:

Out of the box the BME680 runs too hot. This change version bumps the bme680 package to allow for a temperature offset.

Further reading:

Looking at a reference thermometer, we can see that our temperature is indeed a few degrees to high. Does that mean the temperature sensor inside the BME680 is inaccurate?
Actually no, it very accurately measures the temperature exactly where it is located on the board. But there also is the issue: our board as most devices contains some heat sources (e.g., MCU, WiFi chip, display, …). This means the temperature on our board is actually higher than the ambient temperature. Since the absolute amount of water in the air is approximately constant, this also causes the relative humidity to be lower on our board than elsewhere in the room.
As BSEC cannot know in which kind of device the sensor is integrated, we have provide some information to the algorithm to enable it to compensate this offset. In the simplest case, we have to deal with an embedded device with a constant workload and approximately constant self-heating. In such a case, we can simply supply a temperature offset to BSEC which will be subtracted from the temperature and will be used to correct the humidity reading as well.

from the Integration Guide - Bosch Software Environmental Cluster (BSEC)

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8004

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: bme680
    temp_offset: -5

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

ctborg added some commits Dec 31, 2018

@homeassistant

This comment has been minimized.

Copy link

homeassistant commented Dec 31, 2018

Hi @ctborg,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@marchingphoenix
Copy link
Contributor

marchingphoenix left a comment

Good to merge once build passes.

@cgarwood

This comment has been minimized.

Copy link
Member

cgarwood commented Dec 31, 2018

@cgarwood cgarwood merged commit 688bdc6 into home-assistant:dev Jan 2, 2019

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot All contributors have signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.055%
Details

@wafflebot wafflebot bot removed the in progress label Jan 2, 2019

sqldiablo added a commit to sqldiablo/home-assistant that referenced this pull request Jan 3, 2019

Adds ability to calibrate temperature for BME680 (home-assistant#19684)
* Adds temperature calibration

* Add deps.  Lint fix

sqldiablo added a commit to sqldiablo/home-assistant that referenced this pull request Jan 3, 2019

Adds ability to calibrate temperature for BME680 (home-assistant#19684)
* Adds temperature calibration

* Add deps.  Lint fix
@@ -140,6 +144,9 @@ def _setup_bme680(config):
sensor.set_temperature_oversample(
os_lookup[config.get(CONF_OVERSAMPLING_TEMP)]
)
sensor.set_temp_offset(
os_lookup[config.get(CONF_TEMP_OFFSET)]

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Jan 3, 2019

Member

It doesn't look like the os_lookup dict lookup will work in this case.

mxworm added a commit to mxworm/home-assistant that referenced this pull request Jan 3, 2019

Merge branch 'dev' into current
* dev:
  Adds ability to calibrate temperature for BME680 (home-assistant#19684)
  Bumping aioasuswrt version to 1.1.17 (home-assistant#19714)
  Bump pyotgw to 0.4b1 (home-assistant#19715)
  Envisalink pgm (home-assistant#19499)
  Update pyhomematic 0.1.54 + small fixes (home-assistant#19667)
  Add ness alarm control panel using nessclient (home-assistant#18463)
  Add support for color_temp_command_template in MQTT light component (home-assistant#19675)
  Improve rflink coverage (home-assistant#19596)
  Luftdaten traceback (home-assistant#19666)
  Fix london_underground issue (home-assistant#19642)
  Add IDTECK proximity card component (home-assistant#18309)
  Fix homekit_controller pairing regression (home-assistant#19654)
  Fix error in got_connected for remote.harmony (home-assistant#19662)
  Fix exception checking for next dublin bus (home-assistant#19663)
  Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number (home-assistant#19644)
  pytraccar version bump (home-assistant#19659)
  Suppress traceback if network is not available

@ctborg ctborg referenced this pull request Jan 3, 2019

Merged

Drop bme680 os_lookup for temp_offset #19733

4 of 4 tasks complete

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

kellerza added a commit to kellerza/home-assistant that referenced this pull request Jan 18, 2019

Adds ability to calibrate temperature for BME680 (home-assistant#19684)
* Adds temperature calibration

* Add deps.  Lint fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment