My Home-IoT
Find a file
bisbastuner 356efdb92c
Add support for multiple devices in bme680_bsec (#3550)
* Add initial support for multiple devices

Re-introduce support for multiple I2C devices (it was suppressed in df37a7635f). Devices are identified by their I2C address, and the BME680 can only have the 0x76 or 0x77 address, so this adds support for a maximum of two devices.

* Reintegrate commit ebf13a0b

Reintegrate commit ebf13a0ba0 which was lost in my changes (I were working on old files)

* wrong commit

* wrong commit

* Reintegrate commit ebf13a0b

Reintegrate commit ebf13a0ba0 which was lost due to me working on old files

* Reintroduce newlines at end of files

* Reintroduce newlines at end of files

* Adhere to codebase standards

Obey the "All uses of class members and member functions should be prefixed with this-> to distinguish them from global functions in code review" rule of the Codebase Standards

* Fix formatting according to clang-format

* Perform the BSEC library reinitialization+snapshot only when more than one device is present

* Fix formatting according to clang-format

* Degrade abort message in restore_state_() from warning to verbose

This always happen at initial setup, so it's not a really useful message; when some real problems arise, we'll have a more useful warning from snapshot_state_()

Co-authored-by: Trevor North <trevor@freedisc.co.uk>

* Reduce peak stack usage to avoid bootloops on ESP8266

Achieved mainly by moving the work_buffer needed by the BSEC library to the heap, as a single global work buffer shared by all instances.
::set_config_ has been reverted to a code path similar to the original, as that reduces peak stack usage enough to be OK on ESP8266 even without moving the work_buffer to the heap.

* Fix formatting according to clang-format

* Add support for devices with the same i2c address

Devices are now identified using their index in the BME680BSECComponent::instances member, which became a vector. This allows adding two devices with the same i2c address (which should be placed on different i2c buses). Since a BME680 can only have an address of 0x76 or 0x77, a maximum of 2 devices could be added before this commit. Now there is no theoretical limit on the number of devices which could be added.

* Fix formatting according to clang-format

* Fix formatting according to clang-format

---------

Co-authored-by: Trevor North <trevor@freedisc.co.uk>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-07 07:15:40 +00:00
.devcontainer Prefix devcontainer image with ghcr.io (#3942) 2022-10-26 12:04:29 +13:00
.github Run CI on merge group (#4489) 2023-02-26 20:13:45 +00:00
.vscode Refactor clang-tidy script to use actual compiler flags and includes (#2133) 2021-08-09 22:43:18 +02:00
docker Bump docker dependencies (#4526) 2023-03-07 04:06:42 +00:00
esphome Add support for multiple devices in bme680_bsec (#3550) 2023-03-07 07:15:40 +00:00
script NeoPixel - Add support for ESP32-S3 (#4435) 2023-02-19 13:38:27 +00:00
tests FS3000 sensor (#4502) 2023-03-07 04:25:14 +00:00
.clang-format Configure clang-format for consistent pointer alignment (#1890) 2021-06-10 12:55:20 +02:00
.clang-tidy Force braces around multi-line statements (#3094) 2022-01-25 08:56:36 +13:00
.coveragerc Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
.dockerignore More VSCode devcontainer improvements (#1934) 2021-06-22 16:37:05 +02:00
.editorconfig YAML linting (#3779) 2022-09-06 15:48:01 +12:00
.gitattributes Fix line endings normalization (#2407) 2021-09-30 18:07:28 +02:00
.gitignore Add Clipping to displaybuffer (#4271) 2023-02-11 09:56:15 +13:00
.pre-commit-config.yaml Bump black from 22.12.0 to 23.1.0 (#4375) 2023-02-10 07:40:04 +13:00
.yamllint YAML linting (#3779) 2022-09-06 15:48:01 +12:00
CODE_OF_CONDUCT.md Update email addresses (#1733) 2021-05-03 11:51:10 +12:00
CODEOWNERS FS3000 sensor (#4502) 2023-03-07 04:25:14 +00:00
CONTRIBUTING.md Lint trailing whitespace (#3230) 2022-02-19 14:46:27 +01:00
LICENSE 🏗 Merge C++ into python codebase (#504) 2019-04-17 12:06:00 +02:00
MANIFEST.in Update Manifest to rmeove unused dashboard files and include .c ethernet drivers (#4459) 2023-02-19 19:12:29 +00:00
platformio.ini Bump esp-idf to 4.4.3 via platformio/espressif32 @ 5.3.0 (#4254) 2023-02-23 02:08:06 +00:00
pylintrc Bump pylint from 2.13.9 to 2.14.3 (#3589) 2022-06-21 16:27:33 +12:00
pyproject.toml Bump python min to 3.9 (#3871) 2022-10-05 20:09:27 +13:00
pytest.ini Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
README.md Rename master branch to release (#1976) 2021-07-02 15:42:36 +02:00
requirements.txt Bump esptool from 4.5 to 4.5.1 (#4497) 2023-03-07 06:38:05 +00:00
requirements_optional.txt Bump base image to 3.4.0 (#1879) 2021-06-08 22:03:04 +02:00
requirements_test.txt Bump pylint from 2.15.10 to 2.16.2 (#4426) 2023-02-13 22:55:36 +00:00
sdkconfig.defaults Set ESP32 watchdog to loop task (#2846) 2021-12-02 09:05:42 +13:00
setup.cfg add-black (#1593) 2021-03-07 16:03:16 -03:00
setup.py Bump python min to 3.9 (#3871) 2022-10-05 20:09:27 +13:00

ESPHome Discord Chat GitHub release

ESPHome Logo

Documentation: https://esphome.io/

For issues, please go to the issue tracker.

For feature requests, please see feature requests.