I am rather a noob in the world of home assistant and home automation, I’m going along and thoroughly enjoying learning, but I have encountered something that seems to be beyond my coding google-fu abilities and I just can’t find the solution, I’m hoping some kind person could help me crack this one.
I am running a nodemcuv2.
I have carefully connected a bme680 sensor, making sure to connect all the pins according the the info on the esphome website.
I have uploaded the following code to the nodemcu:
[03:24:32][C][i2c:028]: I2C Bus:
[03:24:32][C][i2c:029]: SDA Pin: GPIO4
[03:24:32][C][i2c:030]: SCL Pin: GPIO5
[03:24:32][C][i2c:031]: Frequency: 50000 Hz
[03:24:32][I][i2c:033]: Scanning i2c bus for active devices...
[03:24:32][I][i2c:049]: Found no i2c devices!
[03:24:32][C][logger:175]: Logger:
[03:24:32][C][logger:176]: Level: DEBUG
[03:24:32][C][logger:177]: Log Baud Rate: 115200
[03:24:32][C][logger:178]: Hardware UART: UART0
[03:24:32][C][bme680.sensor:208]: BME680:
[03:24:32][C][bme680.sensor:209]: Address: 0x76
[03:24:32][E][bme680.sensor:211]: Communication with BME680 failed!
[03:24:32][C][bme680.sensor:213]: IIR Filter: OFF
[03:24:32][C][bme680.sensor:214]: Update Interval: 60.0s
[03:24:32][C][bme680.sensor:216]: Temperature 'BME680 Temperature'
[03:24:32][C][bme680.sensor:216]: Unit of Measurement: '°C'
[03:24:32][C][bme680.sensor:216]: Accuracy Decimals: 1
[03:24:32][C][bme680.sensor:216]: Icon: 'mdi:thermometer'
[03:24:32][C][bme680.sensor:217]: Oversampling: 16x
[03:24:32][C][bme680.sensor:218]: Pressure 'BME680 Pressure'
[03:24:32][C][bme680.sensor:218]: Unit of Measurement: 'hPa'
[03:24:32][C][bme680.sensor:218]: Accuracy Decimals: 1
[03:24:32][C][bme680.sensor:218]: Icon: 'mdi:gauge'
[03:24:32][C][bme680.sensor:219]: Oversampling: 16x
[03:24:32][C][bme680.sensor:220]: Humidity 'BME680 Humidity'
[03:24:32](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[03:24:32](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[03:24:33][C][bme680.sensor:220]: Icon: 'mdi:water-percent'
[03:24:33][C][bme680.sensor:221]: Oversampling: 16x
[03:24:33][C][bme680.sensor:222]: Gas Resistance 'BME680 Gas Resistance'
[03:24:33][C][bme680.sensor:222]: Unit of Measurement: 'Ω'
[03:24:33][C][bme680.sensor:222]: Accuracy Decimals: 1
[03:24:33][C][bme680.sensor:222]: Icon: 'mdi:gas-cylinder'
[03:24:33][C][bme680.sensor:226]: Heater temperature=320°C duration=150ms
I always get this error: Communication with BME680 failed!
I have tried the addresses 0x77 and 0x76 as recommended in the documentation, as well as a few other addresses that the logs show found an i2c device at different times, but can not get any readings or successful communication with the BME680, and I just can’t figure out how to get this running.
Does anyone see anything I don’t that might be causing the problem?
Your help in solving this is so hugely appreciated.
Yeah, I am sure, I have double checked that a bunch of times, I even tried switching them just incase my sensor was mislabelled or something but no luck.
I know the picture isn’t the clearest, but I attached it just to show I’m pretty sure I’ve connected it up correctly.
Some of these boards are dual SPI/I2C and require things like jumpering CS to VCC and SDO to GND to force to I2C mode. Do you have the data sheet for this one, are you certain it’s not running in SPI mode?
Can I say at this point, thank you all so much for taking the time to help.
I have soldered the pins on the BME680, good idea!
I tried specifying D1 and D2 instead of GPIO 4,5. Sadly, it didn’t change the outcome.
The board, good question. I live in China so my access to cheap electronics is awesome, however, it’s not always so totally 100% clear you’ve got what you wanted.
I bought something that was advertised as a risym nodemcu ESP8266.
I did notice that in my code I had the board as “nodemcuv2” so I changed it to “nodemcu” but the result is the same.
I also tried not specifying the pins for i2c and specifying completely other pins for i2c but nothing has worked.
I also connected a different i2c device, and I am having the same problem, so it seems my issue is not with the BME680 but with the wiring to my nodemcu.
I bet I am just making some rookie mistake, I really want to make this work, but I just can’t figure it out.
Thank you so much for taking time to help me further with this.
My thoughts are:
Maybe I am still specifying the wring board type in my code
Maybe this particular nodemcu that I have bought uses different pins for i2c communication
I’m trying to understand all the different boards and models, there’s a lot to take in, so maybe I have got this part wrong, with time I’ll get better, but now I’m struggling.
Again, thank you so much for helping a noobie out.
Oh no, I was kind of really hoping that was the problem.
Now I’m back to no idea what’s going on or how to fix it.
Any ideas of things I could try to get this working?
Any help is really appreciated.
I just updated to 1.14.5 and uploaded my code to the nodemcu again but I got the same result.
Let me know how your experience goes.
If 1.14.5 doesn’t work for you either with sensors, I’ll look at switching to the dev version.
Thanks for the tip.
I have what looks like an identical board running a BMP280 and a microwave motion sensor. I did use GPIO0 as SDA but that shouldn’t make a difference. This is normally bad practice but I converted this from a ESP01 with limited pins to a NodeMCU board and was obviously too lazy to fix it when I rebuilt…
I was out of ideas so I ordered a new bme680.
I swapped it out with the old one, and it immediately worked perfectly.
Either I had a bad board or I somehow messed it up.
Won’t be the last time I try to get readings from a bad board…
Anyway, wanted to pop back in with that info and thank everyone for taking the time to help.