My home seems to rise by more than 50 mtrs based on the atmospheric pressure?

I measure a number of factors in my home but this one eludes me. It takes the pressure at sea level which is static in my case. I would like it to update dynamically!
But my altitude above sea level changes? I know that I am 150 mtrs above sea level (according to OS)
Here is my relevant yaml.

sensor:
  - platform: bmp280_i2c
    temperature:
      name: "workspace Temp"
      oversampling: 16x
    pressure:
      name: "workspace Pressure"
      id: workspace_pressure
    address: 0x77
    update_interval: 10s
  - platform: tsl2561
    name: "workspace Ambient Light"
    address: 0x39
    update_interval: 60s
  - platform: aht10
    variant: AHT20
    temperature:
      name: "workspace temperature"
      id: workspace_temperature
    humidity:
      name: "workspace humidity"
      id: workspace_humidity
    update_interval: 60s
  - platform: ccs811
    eco2:
      name: "eCO2 Value"
    tvoc:
      name: "Total Volatile Organic Compound"
    address: 0x5A
    baseline: 0x4471
    update_interval: 60s
    
  - platform: template
    name: "Altitude"
    lambda: |-
      const float STANDARD_SEA_LEVEL_PRESSURE = 1,013.25; //in hPa, see note
      return ((id(workspace_temperature).state + 273.15) / 0.0065) *
        (powf((STANDARD_SEA_LEVEL_PRESSURE / id(workspace_pressure).state), 0.190234) - 1); // in meter
    update_interval: 15s
    icon: 'mdi:signal'
    unit_of_measurement: 'm'
  - platform: absolute_humidity
    name: "Absolute Humidity"
    temperature: workspace_temperature
    humidity: workspace_humidity
  - platform: template
    name: "Dew Point"

The STANDARD_SEA_LEVEL_PRESSURE is an average for the UK in hPa.

Forgot to mention that the altitude of my home seems to change + or - 50mtrs this is the actual issue I am trying to solve

Can any template guru’s offer some help?

There’s the issue.
There is no static air pressure. You need to get the data from some weather source (most likely).
Currently our pressure here is 987 and will go up to 992 by night.

You have your static set to 1013. that is a big difference.

I don’t know where you live, but I just grabbed Londons values:


1013 is a lot more than you typically get in fall.
In summer 1013 is probably a low number.

think about that number 2-3 times.
hint: it shouldn’t be 2 numbers, should it?

That’s correct - the pressure altitude will change from day to night, and with the passage of high or low pressure systems.

The elevation of your home (i.e. its height above mean sea level) is fixed, unless you have earthquakes or live in a mobile home.

It can’t be accurately measured with a barometer, you would need a surveyor to tell you that, though a GPS altitude would come close if averaged over a period of time. But once you know the elevation you don’t need to re-measure it since it doesn’t change.

Typical daily pressure changes during day are 2-4hPA, that’s ~15-30m. But weather is not always typical…

Thank you all for your feedback.

The measurement of altitude, based on barometric pressure, once essential to knowing altitude in an aircraft in flight, is a novelty now mostly replaced by GPS.

For accurate elevation, Google Earth Pro will provide ground-elevation for any location, probably accurate to one meter.

For doing dynamic ‘barometric elevation’ based on live pressure reading, the documentation is already there. Replace STANDARD_SEA_LEVEL_PRESSURE with a live pressure reading from a known source.

https://esphome.io/cookbook/bme280_environment/#altitude-and-absolute-humidity

Weather stations report local barometric pressure, and may or may not adjust the reading taken from the location elevation back to an equivalent value at average sea-level (0.6 metres in the UK). It is necessary to find a reporting station in the close vicinity since weather fronts can change pressure even over a few miles. Then you need to uplift this information when reported. If the station reports only every hour, the value will only be valid at report, again because advancing pressure fronts can change the situation rapidly. If the weather station does not adjust pressure for altitude at the reading point, then again this figure needs to be adjusted back to sea-level to obtain the sea-level equivalent reading.

BMP280 devices are remarkably sensitive, and in experimentation I found it possible to detect an elevation difference from the taken reading at just 10 cm, which means I could use the device to determine the elevation of my desk off the floor. As long as I took a reference pressure reading at the floor at the start of the process. Useful if you want to know if you have gone up stairs or not.

1 Like

Now that i what I call an answer!
Thnk you.

The novelty factor still remains.

Since your house is (I assume) not floating around, the reverse computation is more useful. Take the current measured barometric pressure, at your known elevation, and back-calculate the sea-level pressure equivalent.

Most UK-wide weather forecasts should report pressure, which changes according to weather, based on sea-level equivalent. Taking a pressure reading above sea-level and then adjusting for reading-elevation means that comparison between your pressure and reported pressure becomes like-for-like. Easier to do this too…

The notes for this are in the section below the link I quoted - just remember that you can do one (altitude) or the other (sea level pressure) not both.

Yep it would indeed be a sad day for the world if the sea rose by 150mtrs!

That aside I am just in the process of subscribing to a suitable weather map service.