hello
Sorry if my question is very simple. I am trying to setup my BME680+ESP8266 with the ESPhome in the hass.io server.
The problem is that the 8266 dont connect to my wifi. The code I “produced” is a big mashup from other forums and quotes. So I cant really explain much of it beside trying to mix the wifi setup from an LED project I had with the sensor readings.
I can see the readings on the Serial Monitor on arduino id so I think it is only the wifi that is the problem so far. Sorry I can still very new at this.
Thanks for the answer and happy new year. Sorry maybe I should have been more specific.
I am running Hass.io on raspberry pi 4, with the ESPhome add on.
And then I would like to have the esp8266 + bme860 running over WiFi, some random place in the house.
I am grateful for the link, that code goes to the configuration.yaml file in Hass.io I guess? I am not that used to it.
But I first need to have the esp8266 running on the WiFi to add it to the esphome addon.
Or maybe I am misunderstanding the process completely? I am in a bit of a loss sorry.
Maybe if you could, do you know a good place for getting help with arduino sketches ?
(I tried to add that code, just to be sure, on Arduino Id to transfer it to the board but got a error code while checken for errors.)
Sorry I keep editing because I am a bit dyslexic. But I might have found a topic in this forum that might be useful. I check it out tomorrow and I have more free time.
No. That configuration goes in a file that is compiled and loaded onto the esp board.
Instead of writing a sketch all you have to do is add simple yaml for the board type you are using sensor, wifi connection, and api (to connect to hone assistant). ESP home then takes that info and does all the work for you by creating the binary file to load onto the ESP board.
See;
Also have a Look at the main esphome index page. It lists a bunch of sensors and devices. Click on one to go to an example yaml config you can use.
I hope you had a good start of the new year. I am sorry I have to ask you again for your assistant. So I tried my to play around ESPhome now, but I get an error when I try to validate the file and I cant seem to find other examples on the ESPhome BME680 information about that.
INFO Reading configuration /config/esphome/bme680.yaml...
ERROR Error while reading config: Invalid YAML syntax. Please see YAML syntax reference or use an online YAML syntax validator:
mapping values are not allowed here
in "/config/esphome/bme680.yaml", line 26, column 10:
i2c:
^
again i am very sorry to bother you again. I hope you will have a nice day.
Thanks the code validates now. I can see that my spacing was all over the place.
Your code also help me to see how to insert the i2s code into the sensor code. thanks for the help
and thanks to you too tom. you where both very helpful
well I got it up and running now. But I seems to not be able to get any data showing in any cards. I also get a “Communication with BME680 failed!” when viewing the log.
[22:19:10][I][app:100]: ESPHome version 1.14.3 compiled on Jan 2 2020, 21:51:54
[22:19:10][C][i2c:028]: I2C Bus:
[22:19:10][C][i2c:029]: SDA Pin: GPIO4
[22:19:10][C][i2c:030]: SCL Pin: GPIO5
[22:19:10][C][i2c:031]: Frequency: 50000 Hz
[22:19:10][I][i2c:033]: Scanning i2c bus for active devices...
[22:19:10][I][i2c:049]: Found no i2c devices!
[22:19:10][C][logger:175]: Logger:
[22:19:10][C][logger:176]: Level: DEBUG
[22:19:10][C][logger:177]: Log Baud Rate: 115200
[22:19:10][C][logger:178]: Hardware UART: UART0
[22:19:11][C][bme680.sensor:208]: BME680:
[22:19:11][C][bme680.sensor:209]: Address: 0x77
[22:19:11][E][bme680.sensor:211]: Communication with BME680 failed!
[22:19:11][C][bme680.sensor:213]: IIR Filter: OFF
[22:19:11][C][bme680.sensor:214]: Update Interval: 60.0s
[22:19:11][C][bme680.sensor:216]: Temperature 'BME680 Temperature'
[22:19:11][C][bme680.sensor:216]: Unit of Measurement: '°C'
[22:19:11][C][bme680.sensor:216]: Accuracy Decimals: 1
[22:19:11][C][bme680.sensor:216]: Icon: 'mdi:thermometer'
[22:19:11][C][bme680.sensor:217]: Oversampling: 16x
[22:19:11][C][bme680.sensor:218]: Pressure 'BME680 Pressure'
[22:19:11][C][bme680.sensor:218]: Unit of Measurement: 'hPa'
[22:19:11][C][bme680.sensor:218]: Accuracy Decimals: 1
[22:19:11][C][bme680.sensor:218]: Icon: 'mdi:gauge'
[22:19:11][C][bme680.sensor:219]: Oversampling: 16x
[22:19:11][C][bme680.sensor:220]: Humidity 'BME680 Humidity'
[22:19:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:19:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:19:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:19:11][C][bme680.sensor:221]: Oversampling: 16x
[22:19:11][C][bme680.sensor:222]: Gas Resistance 'BME680 Gas Resistance'
[22:19:11][C][bme680.sensor:222]: Unit of Measurement: 'Ω'
[22:19:11][C][bme680.sensor:222]: Accuracy Decimals: 1
[22:19:11][C][bme680.sensor:222]: Icon: 'mdi:gas-cylinder'
[22:19:11][C][bme680.sensor:226]: Heater temperature=320°C duration=150ms
[22:19:11][C][captive_portal:169]: Captive Portal:
[22:19:11][C][ota:029]: Over-The-Air Updates:
[22:19:11][C][ota:030]: Address: xxx.local:xxx
[22:19:11][C][api:095]: API Server:
[22:19:11][C][api:096]: Address: xxx.local:xxx
So I read that one solution could be to set oversampling: 1x for all values. so that what I did but still got the same error:
I saw your post before the edit so i did not get an notification, sorry about that!
It’s possible that your sensor is communicating over an alternative address.
can you edit your config with the following address:
No need to be sorry, I am just happy you took the time to write. It can be a little confusing for a new comer like me. I could also have made a new post but I did want to over spam the forum with my simple problems.
But it work perfectly now, sadly I cant mark both your answers as the solution. I also looked up the change you made of changing the adress to 0x76 from my 0x77. It is gold for me to know that it is either 0x76 or 0x77 now
thanks again for the response, it was very kind of you. have a great week.
from
Christoffer
proff of it working now:
[12:55:14][C][i2c:028]: I2C Bus:
[12:55:14][C][i2c:029]: SDA Pin: GPIO4
[12:55:14][C][i2c:030]: SCL Pin: GPIO5
[12:55:14][C][i2c:031]: Frequency: 50000 Hz
[12:55:14][I][i2c:033]: Scanning i2c bus for active devices...
[12:55:14][I][i2c:040]: Found i2c device at address 0x76
[12:55:14][C][logger:175]: Logger:
[12:55:14][C][logger:176]: Level: DEBUG
[12:55:14][C][logger:177]: Log Baud Rate: 115200
[12:55:14][C][logger:178]: Hardware UART: UART0
[12:55:14][C][bme680.sensor:208]: BME680:
[12:55:14][C][bme680.sensor:209]: Address: 0x76
[12:55:14][C][bme680.sensor:213]: IIR Filter: OFF
[12:55:14][C][bme680.sensor:214]: Update Interval: 60.0s
[12:55:14][C][bme680.sensor:216]: Temperature 'BME680 Temperature'
[12:55:14][C][bme680.sensor:216]: Unit of Measurement: '°C'
[12:55:14][C][bme680.sensor:216]: Accuracy Decimals: 1
[12:55:14][C][bme680.sensor:216]: Icon: 'mdi:thermometer'
[12:55:14][C][bme680.sensor:217]: Oversampling: 16x
[12:55:14][C][bme680.sensor:218]: Pressure 'BME680 Pressure'
[12:55:14][C][bme680.sensor:218]: Unit of Measurement: 'hPa'
[12:55:14][C][bme680.sensor:218]: Accuracy Decimals: 1
[12:55:14][C][bme680.sensor:218]: Icon: 'mdi:gauge'
[12:55:14][C][bme680.sensor:219]: Oversampling: 16x
[12:55:14][C][bme680.sensor:220]: Humidity 'BME680 Humidity'
[12:55:14][C][bme680.sensor:220]: Unit of Measurement: '%'
[12:55:14](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[12:55:14](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[12:55:14](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[12:55:14][C][bme680.sensor:222]: Gas Resistance 'BME680 Gas Resistance'
[12:55:14][C][bme680.sensor:222]: Unit of Measurement: 'Ω'
[12:55:14][C][bme680.sensor:222]: Accuracy Decimals: 1
[12:55:14][C][bme680.sensor:222]: Icon: 'mdi:gas-cylinder'
[12:55:14][C][bme680.sensor:226]: Heater temperature=320°C duration=150ms
[12:55:14][C][captive_portal:169]: Captive Portal:
[12:55:14][C][ota:029]: Over-The-Air Updates:
[12:55:14][C][ota:030]: Address: bme680.local:8266
[12:55:14][C][api:095]: API Server:
[12:55:14][C][api:096]: Address: bme680.local:6053
I had the same problem with coding this ESP8266 and BME680 connected.
The initial pages are not so clear how to add these codes and how to overcome X markings that are problems in the code.
I am new to Home Assistant.
Thanks for the help!
Greet Jim
Does anyone know how to calibrate the pressure sensor? Its way off with mine. Should be 1029 and indicating 1013?
Hello Jimbo
I havent been calibrating my BME680 (because I have been lazy i guess) but I did some google fu.
also if you are interested here is a good article on reading the gas sensor:
But to then pressure, I have found this datasheet for the sensor:
If you look at page: 18, there is a formular that the chip use to calculate the pressure.
also worth noticing on page 3
Key parameters for pressure sensor
RMS Noise 0.12 Pa, equiv. to 1.7 cm
Offset temperature coefficient ±1.3 Pa/K, equiv. to ±10.9 cm at 1 °C temperature change
so maybe a combination of noise and that the other values are a bit off as well so that it set the calculation it does for showing the pressure value.
(I am not an expert so I might be wrong)
@Keglekongen, I’m very happy you were able to get your sensor up and running.
I am now trying to do the exact same thing and I’m having what seems to be the same exact problem which led me here.
However, I’ve tried the steps here and it hasn’t helped solve my problem, I’m hoping I am just missing something.
Maybe someone could help me with this.
I’d be very grateful, as a newbie into custom devices and sensors for home automation.
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 have tried the address 0x77 and 0x76, as well as a few other addresses that the logs show found an i2c device at different time, so I can’t figure out how to get this running.
Does anyone see anything I don’t that might be causing the problem?
Hello
I am sorry I did not response. I had not used home assistant since they stop supporting Pi-hole so all the messeges had to going to my spam filter sadly. I am glad that you found the solution.