Skip to content
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

iAQ core sensor support ? #16

Closed
vincegre opened this issue Jan 29, 2019 · 10 comments
Closed

iAQ core sensor support ? #16

vincegre opened this issue Jan 29, 2019 · 10 comments

Comments

@vincegre
Copy link

What new integration would you wish to have?
Atmospheric volatil component sensors: iAQ Core and family (I2C based)

If possible, provide a link to an existing library for the integration:
https://github.com/hafu/IAQCore

Please describe your use case for this integration and alternatives you've tried:
Very small, pretty cheap and lot more reliable than competing products, very low consumption (perfect for battery/solar project), easy wiring (I2C).

iAQ-core_DS000334_1-00.pdf
Datasheet of one of the sensor ;)

Thanks

@OttoWinter OttoWinter transferred this issue from esphome/esphome-core Feb 1, 2019
@voicevon
Copy link

voicevon commented Mar 6, 2019

There is another sensor called SGP30 from Adafruit. The features is quite similar to iAQ Core.

Datasheet

Arduino Library

@vincegre

This comment has been minimized.

@ariedeleen

This comment has been minimized.

@OttoWinter

This comment has been minimized.

@ruimarinho
Copy link

Me and @mcspr have been working together during the last month to add support for BME680 using BSEC on espurna. The experience is completely seamless, requiring zero modifications on the user side - it just works.

Personally, I am a big fan of esphome as well and use it extensively on my ESP32 projects, so in the future I'd like to bring the same level of support here, time permitting.

I hope it serves as inspiration in case others want to jumpstart that work. Our approach to licensing was:

  • To include Bosch's own Arduino library as part of a user-downloaded dependency (the package being BSD-3-Clause licensed), with all copyright notices carried over.
  • To require an opt-in flag to enable support for the sensor, mentioning on every document that enabling the flag is confirmation of agreement of the Bosch's license.
  • To not distribute a pre-compiled binary with support for this sensor, instead requiring users to proactively seek to enable the correct flag.

This is truly a fantastic sensor which deserved a special attention to detail.

@trvrnrth
Copy link

trvrnrth commented Sep 1, 2020

@ruimarinho If you're interested I have a working ESPHome custom component that I've had running without issue on a couple of Wemos D1 minis for a while now that might save a bit of time getting things up and running. Now that the BSEC Arduino library has a Platform IO library manifest with the necessary incantations to get the library linked in there's no need for manual download of the library or anything (see boschsensortec/BSEC-Arduino-library#50). The only remaining compilation gotcha now is that I have to maintain a patched arduino framework in order to get the library placed somewhere it will fit per https://github.com/BoschSensortec/BSEC-Arduino-library#4-additional-core-specific-modifications. I imagine on an ESP32 it would all "just work".

@mcspr
Copy link

mcspr commented Sep 15, 2020

@trvrnrth I believe you misunderstood the changes we made, see:
https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BSEC-library-installation-instructions-for-ESP8266/td-p/14862
(lone-tumbleweed.gif)

We simply repackage the provided library .a file, after doing mv *.o *.c.o on the contents, no need to patch the framework files when they already do the stuff we want.

trvrnrth added a commit to trvrnrth/esphome-bsec-bme680 that referenced this issue Sep 18, 2020
Instead of relying on a patched arduino framework, we now rely on a patched library file as described in esphome/feature-requests#16 (comment) and implemented in trvrnrth/BSEC-Arduino-library@5ebd709

Hopefully this change can be made upstream in future.
trvrnrth added a commit to trvrnrth/esphome-bsec-bme680 that referenced this issue Sep 18, 2020
Instead of relying on a patched arduino framework, we now rely on a patched library file as described in esphome/feature-requests#16 (comment) and implemented in trvrnrth/BSEC-Arduino-library@179de71

Hopefully this change can be made upstream in future.
@trvrnrth
Copy link

@mcspr Neat! That makes things much simpler! I was indeed completely unaware of those changes.

I've opened a PR with a re-packaged library upstream at boschsensortec/BSEC-Arduino-library#51 as I'd made the changes in my fork anyway in order to support the component I've put together. Hopefully it will get picked up and some action taken with it.

For reference here as well the re-packaging command I used is as follows:

ar t libalgobsec.a | awk '{
  old=$1;
  new=$1;
  sub(/\.o/, ".c.o", new);
  system("ar x libalgobsec.a "old);
  system("ar dS libalgobsec.a "old);
  system("mv "old" "new);
  system("ar q libalgobsec.a "new);
  system("rm "new)
} END {
  system("ar s libalgobsec.a")
}'

@trvrnrth
Copy link

For anyone following along here the latest release of the BSEC Software Library (v1.6.1480) now includes a version of the library packaged as discussed above for esp8266.

Now that little hurdle is out of the way I have marked esphome/esphome#1313 which adds a component to support the BME680 sensor via BSEC as ready for review.

@nagyrobi
Copy link
Member

nagyrobi commented Jul 5, 2022

Implemented: https://esphome.io/components/sensor/bme680_bsec.html

@nagyrobi nagyrobi closed this as completed Jul 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants