-
Notifications
You must be signed in to change notification settings - Fork 39
v3.4.12 always returns wrong/nonsenical, static number for temperature, humidity, and pressure on first reading. Gas also seems wrong #69
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
Comments
Interestingly,
Again under v.3.4.7 everything is reasonable -- even the first reading. If I modify my routine, to throwaway the first reading of every sensor value, I too get reasonable values on each subsequent read. |
Any ideas here? |
I can reproduce this, using a BME688. My first reading is always incorrect -- though in my case, the readings are slightly different:
After this, subsequent readings are consistent and correct. |
The same thing happens by the way in the Adafruit Arduino version of BME680 -- ver 2.0.2 works but 2.0.4 gives the wrong reading the first time. |
Do you still get this for the current version (3.7.4)? Still, as far as I can tell with the library, no functional changes were made to the code from 3.4.6 to 3.4.12, so its curious that the versions you mentioned working and not working are like that. Can you also please add information regarding your CircuitPython board and version so that others can try to further replicate? The text at the start of the REPL would be most helpful. |
My apologies -- I was a bit "dyslexic" in recording the versions. For example:
[3.7.4]
Given that I am sitting perfectly dry and comfortably wearing a sweater in a heated home at sea level with freezing temperature outside, the 3.4.6 version is clearly more reasonable than the 3.7.4 :) |
I have the same issue. The humdidity and temperature values do not change. It works fine with other libraries. I also tested the BME280 and BMP280 with their respective libraries, they all have the same issue. |
Are any of the devs paying attention here? This seems like a major "bug" |
They just have to rollback the releases. It's pretty annoying spending hours on finding this bug when you expecting a hardware malfunction. |
@DL3KB , @puterboy If you can, please post information about which specific microcontroller and version of Circuitpython (the core circuitpython install, not the library version) was used during your testing? Also can you confirm which version of the library you've used that is working correctly for you? In some of the prior comments the version Right now the current release is 3.7.4, and the previous version before this was 3.7.3. Was anyone's testing on that version? |
I've tested several released versions and narrowed this issue down further. Version 3.4.13 is the most recent release that does not seem to be affected by this issue. With that version the first reading appears to be a normal dynamic reading of the environment rather than the static value for the first reading. With version 3.5.0 and all newer releases the first reading seems to always return the same value which doesn't coorelate to the environment it's in. After that first reading then subsequent ones seem to work fine as far as I can tell. I will try to figure out what the root cause within that change could be and see if we can revert or modify it further to get back to a state where the first reading isn't wrong. |
I've pulled at this thread a bit further and think I've found the root cause, but don't necessarily have the expertise in this type of driver or these sensors generally to know if what I found is accurate. One of the changes from 3.5.0 was adding a new step inside of the init() function here:
Inside of
At the end of
In all honesty I don't really know what that means, but looking at the referenced Bosch code I don't see anything that looks analagous to that inside of it's set_heatr_conf function. The code here: https://github.com/boschsensortec/BME68x_SensorAPI/blob/80ea120a8b8ac987d7d79eb68a9ed796736be845/bme68x.c#L672 is basically the C version of the writes which occur here:
I've found that if I remove the call to I can PR that change, but it would probably be good to get some wider testing done and if possible have someone with more familiarity with this module / driver take a look. |
Fixed for me! Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Using v3.4.7 of
adafruit_bme680.py
, I always get reaonable values for: temperature, humidity, pressure and gas.But v3.4.12 returns non-sensical values for all the above parameters.
Specifically,
I have tried this with 4 different BME680 modules on several different Raspberry PI's (RPi4, RPi5)
The only difference in both the calling routine and in the Python3 setup is the version of
adafruit_bme680.py
Using a fresh
venv
install withpip
doesn't solve the problem.Reverting the v.3.4.7 version of
adafruit_bme680.py
restores sane values...The text was updated successfully, but these errors were encountered: