Closed wifwucite closed 3 years ago
Thanks for adding the link!
I believe that it should be possible to run with differing update intervals for each of the readings but I haven't actually tried it.
In the absence of any current way of configuring it if you edit update_subscription_
hardcoding the sensor sample rates to one of BSEC_SAMPLE_RATE_LP
or BSEC_SAMPLE_RATE_ULP
as appropriate do you get the behaviour you expect?
Could you elaborate on that? Where can I set update_subscription_
? I did not find it.
This is where the component sets the sample rate for the temperature sensor for example. At the moment all sensors are either set to BSEC_SAMPLE_RATE_LP
or BSEC_SAMPLE_RATE_ULP
depending on your config but it should be possible to use differing update intervals per sensor. In theory you could use any value but I believe the recommendation is to stick to one of those two standard values for the sake of the BSEC algorithm. As I say I've not tried it myself so I'd be interested to know how well it works out.
Thanks, after a git pull (sorry!), I see it, too. ;-) When I configure the global sample rate to ultra low power and I override the sample rate of the pressure or temperature sensor to BSEC_SAMPLE_RATE_LP
, I get more frequent pressure or temperature readings. Other sample rates, however, seem to confuse it completely, then I do not see any readings at all anymore. But using BSEC_SAMPLE_RATE_LP
for the temperature is fine. Of course, we do not know how well heat compensation works with this configuration. Anyhow, thank you very much for your advice.
Thanks for reporting back! Good to know it works with a ULP/LP combo (and also that other values are a no-go). I'd read that it should work so hopefully the heat compensation is good enough for you.
@wifwucite I suspect you may have seen already but there's a PR for this feature now at https://github.com/esphome/esphome/pull/1710. This also improves the heat compensation as it turns out the timestamp being supplied for the inputs should be the trigger time not the measurement time (a bug that appears to exist in some of the bosch examples too).
Thanks for the update, yes, I have seen the PR. I was not sure if it will impact this custom component as well. Or will this PR be merged into ESPHome?
This component will be in the next core release of ESPHome so in future won't need adding as a custom component. Although I may keep this repo around anyway as it does no harm and allows for faster iterations if necessary. In the meantime as the next release date of ESPHome is unknown I'll probably formalise and release those changes here too.
Sounds good! And thank you for the clarification.
In ULP mode, the sample rate is 5min, which is fine for the gas sensor that needs heating. Would it be possible to specify a shorter interval like 1min for temperature and humidity? Btw. I have added a link to this repository in ESPHome‘s BME680 sensor documentation. ;-)