-
Notifications
You must be signed in to change notification settings - Fork 636
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
BME280/BMP280 sensor shows 'Wrong ID' in values section. #1672
Comments
After a reboot this morning, the sensor seems to be working. The main status page is reporting correct values against BME280 @ I2C (0x00) but am still getting the following error 6 in the debug output.
|
My bet would be on I2C not being able to work properly over (mildly) long cable. Error code should probably be stringified... ref about 6 meaning: espurna/code/espurna/sensors/BaseSensor.h Lines 13 to 22 in 903ceb1
|
I rewired with just a very short cable, 2-3cm and it still didn't work. After a re compile of the binary and a re flash it started working but still have the error 6 messages against BMP280 rather than the BME280 (BMP280 not fitted). I've tried again using a screened data pair approx 30cm long and the BME280 data is working, but I get a constant error 6 message every 10 seconds. |
Two POI. Inside _read, when data returns espurna/code/espurna/sensors/BMX280Sensor.h Line 325 in 903ceb1
Inside _pre, when it tries to read chip register to determine if it is BMP or BME: espurna/code/espurna/sensors/BMX280Sensor.h Line 121 in 903ceb1
If we can be sure that communication is ok, maybe something there is amiss? My personal question is where does 0xffff magic come from. BME Datasheet only mentiones 0x80000 if value is "skipped"
You can also try Adafruit libraries. Note, that they have separate ones for BME and BMP: |
So I guess the temperature readout is giving 0xffff at some point giving the error? Maybe there is a problem with the chip I have and is outputting the incorrect values? I'm new to all this building and compiling binaries so trying other libraries is beyond my current knowledge! 😁 I'll leave the firmware running as it is for now while it's working and have another look when I have more time to spend with the system. Thanks. |
@mcspr @xoseperez I changed the |
Ok, that wasn't like this before. Updated detection & defaults based on your comment: #1690 |
When the code has been added to the dev branch I'll test and let you know. Thanks. |
All working. 👍 |
I have setup a Sonoff basic to use Pins 1 and 3 (Tx/Rx) for a BME280, 4 pin sensor. I have the following in custom.h
Once built I get the following:
and at Debug I first get:
After that I then get:
[SENSOR] Error reading data from BMP280 @ I2C (0x00) (error: 4)
I have also tried setting 0x58, 0x77 and 0x76 but get the same status page as above. I guess espurna is not setting the address, or do I need to install pull up resistors on the data lines? The BME280 is connected using twisted pair twisted with positive and ground and the wires are about 1 metre long.
The text was updated successfully, but these errors were encountered: