Topics

How to test BME820?

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

I am trying to implement a BME820 weather chip on my MaxEsp2. The webpage gives me some sort of default readings noΒ  matter what. Temp = 10, barometer =1010, humidity = 70, dewpoint = 4. I have changed the I2c settings, unplugged the board, etc. Nothing changes. No command errors are logged. I know the i2c is working since the RTC is working. I am piggybacking the BME820 to the 4 pins on the

Is this normal? Searching the group makes me think I should be generating "?" data if the chip is not returning anything.

Khalid Baheyeldin
 

Just verifying that you do have it configured.

In v3, do you have:

#define WEATHER BME280
or
#define WEATHER BME280_0x76

?

Dave Schwartz
 

OnStep sets the values to those defaults and overrides them only when data is read from the device. Once you turn on the config settings in both OnStep and the WiFi (and the SHC) it just displays the values it has.

Are you sure of the I2C address? My device was on a different address from the standard 0x77... it was on 0x76 which is why Howard added that different address as an option.

On 2019-11-05 2:33 p.m., Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
I am trying to implement a BME820 weather chip on my MaxEsp2. The webpage gives me some sort of default readings noΒ  matter what. Temp = 10, barometer =1010, humidity = 70, dewpoint = 4. I have changed the I2c settings, unplugged the board, etc. Nothing changes. No command errors are logged. I know the i2c is working since the RTC is working. I am piggybacking the BME820 to the 4 pins on the

Is this normal? Searching the group makes me think I should be generating "?" data if the chip is not returning anything.

Howard Dutton
 

Also, I did see this working on my MaxESP3 during testing a couple of weeks back.

As far as I2C is concerned should be no different vs. a MaxESP2.

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

On Tue, Nov 5, 2019 at 02:38 PM, Khalid Baheyeldin wrote:
#define WEATHER BME280
or
#define WEATHER BME280_0x76
Yes, I have tried both and waited more than a minute to be sure the values updated. As far as I can tell mine are 0x76 but they may also be BMP's (no humidity). As it is I cannot test this.

Howard, are you generatingΒ  the fake values? Is it possible to go backΒ  to the "?" when no value is present? Perhaps with a Debug_weather ON switch?

Dave Schwartz
 

Do you have an I2C scanner sketch available to confirm the address? I think there are also simple BME280 reader sketches out there on the net too.

On 2019-11-05 3:56 p.m., Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
Yes, I have tried both and waited more than a minute to be sure the values updated. As far as I can tell mine are 0x76 but they may also be BMP's (no humidity). As it is I cannot test this.

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

OK, did the scanner and found it at 0x76. For some reason I had gotten the idea that the sketch would not work on the MaxESP2. It works fine. However, still no data. I did find the initial values in the library weather.h. I have altered them slightly to be sure I am getting no data.

Howard Dutton
 

I just grabbed a BME280, wired it to the secondary I2C on the DS3231.Β  Dropped that into my MaxESP2, configured the latest OnStep appropriately uploaded and this is what I see:

Howard Dutton
 

I wanted to see the Temperature change so held the BME280 for a moment in my hand thus the 25.0C (started at 22.5C before I warmed it up.)

Howard Dutton
 

Back down to 22.3C now.

Howard Dutton
 
Edited

I DO NOT have the SMT diode array (ESD protection) installed on my MaxESP2 or MaxESP3.Β  I consider that an experimental feature and makes me nervous regarding the signal timing for I2C and encoders so want to be sure everything is tested to death before soldering one of those in.Β  If this becomes suspect try slowing I2C down to see if the problem goes away.Β  Don't get me wrong I picked a very fast device but these things do have a certain inherent capacitance that can muck things up.

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

Most of the problem was I got BMP280's claiming to be BME280's from two separate vendors. I think it might be a good idea to add a section in the Wiki on getting and identifying the right Arduino components. I have had problems getting ESP32's and BME820's. Others are reporting problems with other components. The BME and BMP versions are very difficult to tell apart. Many vendors do not know the difference or do not care.

Running the BME280test sketch shows that I have a valid BME and it is recording Temperature, Barometric pressure and Humidity.

However in the latest OnStep 3.9c alpha I do not get a altitude reading. The :GX9D# command returns the default value of 200.0. I am using BME280_0x76 on a MaxESP2. I have tried it with and without the diode array. It has no effect. Since I am getting all three readings I am assuming there is a problem in weather.h. It seems to be missing the required code for the altitude.

Howard Dutton
 

On Wed, Nov 13, 2019 at 08:15 AM, Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
However in the latest OnStep 3.9c alpha I do not get a altitude reading. The :GX9D# command returns the default value of 200.0. I am using BME280_0x76 on a MaxESP2. I have tried it with and without the diode array. It has no effect. Since I am getting all three readings I am assuming there is a problem in weather.h. It seems to be missing the required code for the altitude.
Not implemented beyond set/get, not used for anything at this point (or possibly ever) really either.

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

On Wed, Nov 13, 2019 at 11:34 AM, Howard Dutton wrote:
Not implemented beyond set/get, not used for anything at this point (or possibly ever) really either.
Ok, that is your choice.

It would be nice to identify the BMP280 and issue an error. I could work on this if you think you would incorporate it. What I would do is find the device on the i2c bus at the address specified and if it did not return the humidity issue an error (that way we don't have to include the BMP280 library).

Khalid Baheyeldin
 

On Wed, Nov 13, 2019 at 01:07 PM, Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
It would be nice to identify the BMP280 and issue an error. I could work on this if you think you would incorporate it. What I would do is find the device on the i2c bus at the address specified and if it did not return the humidity issue an error (that way we don't have to include the BMP280 library).
The way I understand it is that the BMP280 has temperature and pressure, but not humidity.
The BME280 on the other hand has all three.

Maybe a warning message that humidity is not available is nice to have. Anything beyond that (as refusing to work completely) is overkill in my opinion.

A better approach is to have a testing sketch that probes the I2C devices, and then ask what they are and issue the appropriate messages there. This keeps OnStep itself simple, easier to maintain. Complexity is bad.

Howard Dutton
 

On Wed, Nov 13, 2019 at 10:07 AM, Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
It would be nice to identify the BMP280 and issue an error.
Or just add support for it.

Howard Dutton
 
Edited

On Wed, Nov 13, 2019 at 10:14 AM, Khalid Baheyeldin wrote:
A better approach is to have a testing sketch that probes the I2C devices, and then ask what they are and issue the appropriate messages there. This keeps OnStep itself simple, easier to maintain. Complexity is bad.
The latest OnStep sets the generalError to ERR_WEATHER_INIT if the BME280 device id isn't present.Β  There is also an ERR_RTC_INIT that should work for some RTC devices.Β  It would be nice to have a basic check to see if the EEPROM is up and apparently working then if not simply output a text message or better perhaps flash the status LED fast or something.

The Addons all support the corresponding error id messages, I haven't released the Android App update that does the same yet but it exists.

Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ
 

All I get is "Last General (Background) Error: Unknown Error, code 13" on the web page.

This is with the BMP280 installed, or no weather chip connected or if I pull the RTC board entirely.

The BME280 reports all data correctly on the web page with no errors.

Over the serial port a :GZX9x# command returns "180*00:00#" with the chip removed.

With the BMP280 it returns the default values no real temp or pressure data is ever collected.

The web page shows " Command Error Log:Β  No Errors" no matter what.

Howard Dutton
 

On Wed, Nov 13, 2019 at 11:39 AM, Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
All I get is "Last General (Background) Error: Unknown Error, code 13" on the web page.
Yes, and so you didn't update the Addon to the latest version.

Howard Dutton
 

On Wed, Nov 13, 2019 at 11:39 AM, Drew πŸ”­πŸ“·πŸš΄β€β™‚οΈ wrote:
The web page shows " Command Error Log:Β  No Errors" no matter what.
Ok yea, there was no command error.

Reverting to default TPH is the desired behavior in my opinion, the user was warned and OnStep does the best it can with what it has.Β