Tempest Weather showing wrong pressure value

My app is also showing temperature with a fixed zero decimal and station pressure instead of sea level pressure as well.

One request would be able to show daily accumulated rainfall. I don’t know if that can be squeezed in somehow.

1 Like

@rohan It’s almost as like the deployed code for this reverted to a previous version and does not match the github repo…

This is really strange, that repo should be the source of truth. I’ll investigate.

2 Likes

Something is definitely off. Mine is displaying temperature in Celsius and pressure in inches. I have it configured to display temperature in °F and pressure in millibars. It is also not updating, though the Tempest app is current. My first thought when this happened was that someone is messing with the code.

Any progress? Or diagnostics needed from our end?

Hey folks,

No update yet but wanted to let you know that I’m looking into it. The correct code is deployed, so that’s not the issue.

@rohan I would focus then on why it is being displayed with a X.0 for the temperature.

We dropped the zero, but it is currently being displayed.

It really looks like it does before these two commits

Thanks, that was really helpful and I’ve found the issue now. Turns out the correct code is being deployed… but is then being overridden by an old copy from our private repo. We recently changed how apps are loaded to make the server more efficient, and it had this unintended side effect.

Working on a fix now.

1 Like

OK, I’ve removed the old copy from the private repo so this should not happen again.

Correct values should now be appearing for everyone.

The pressure being displayed looks good for me now.

For the temperature, based on the code snippet above, it’s showing only integers (eg 48F) vs decimal (eg 48.8F). The precision is there but the code looks like it’s just the integer portion with no rounding. I’d prefer either xx.x or xx rounded, but that’s personal choice.

Anyway, thanks for making it more better :smiley:

@GeekNJ Actually the precision isn’t there. The call that is used which normalizes all the tempest data to local units only returns whole numbers. Try out Tempest API wit your station to see. It uses the getForecast call.

See Tempest Weather showing wrong pressure value - #16 by CountRushmore for more detail

It can be done, but someone is going to have to write the utility code to convert between the different units (C to F and pressure values) and then switch from using Forecast to Observation

When I said it’s showing as an integer, I was referencing the Tidbyt code that was included above. Yes, the data is available but if the Tidbyt app is referencing it as integer, that’s what it will display, similar to the humidity reading. If you’re saying that the data coming back, in the current call, is also only integer, that is a larger adjustment. Anyway, it’s good enough for me as I have my phone and a full pi display of the weather info too.

Yeah we are explicitly viewing it as an integer as that is what is coming back from Tempest/Weatherflow in the air_temperature value. Previously we viewed it as a float but then it was ways 32.0 for example with nothing but ZERO in the decimal.

{
  "latitude": xx,
  "longitude": -xx,
  "timezone": "America/Denver",
  "timezone_offset_minutes": -420,
  "location_name": "Stonegate",
  "current_conditions": {
    "time": 1669667567,
    "conditions": "Clear",
    "icon": "clear-day",
    "air_temperature": 22,
    "sea_level_pressure": 29.642,
    "station_pressure": 25.015,
    "pressure_trend": "falling",
    "relative_humidity": 62,
    "wind_avg": 2,
    "wind_direction": 286,
    "wind_direction_cardinal": "WNW",
    "wind_gust": 3,
    "solar_radiation": 351,
    "uv": 2,
    "brightness": 42134,
    "feels_like": 22,
    "dew_point": 11,
    "wet_bulb_temperature": 19,
    "wet_bulb_globe_temperature": 22,
    "delta_t": 3,
    "air_density": 1.1,
    "lightning_strike_count_last_1hr": 0,
    "lightning_strike_count_last_3hr": 0,
    "lightning_strike_last_distance": 17,
    "lightning_strike_last_distance_msg": "16 - 18 mi",
    "lightning_strike_last_epoch": 1667663770,
    "precip_accum_local_day": 0,
    "precip_accum_local_yesterday": 0,
    "precip_minutes_local_day": 0,
    "precip_minutes_local_yesterday": 0,
    "is_precip_local_day_rain_check": false,
    "is_precip_local_yesterday_rain_check": false
  }

More precision comes in the Get Observations call but those always return in C, MB, m/s and they would have to be converted to the stations preferred units. Not that hard to do but someone would need to write the conversion code for all units and tests. The get observations also lacts the conditions such as “Clear” and the icon such as “clear-day” which are used to show if it is sunny or rainy.

So what is really needed is an option on the /better-forecast call to be precise with what is returned.

{
  "station_id": xxx,
  "station_name": "Stonegate",
  "public_name": "Stonegate",
  "latitude": xxx,
  "longitude": -xxx,
  "timezone": "America/Denver",
  "elevation": 1404.147583007812,
  "is_public": true,
  "status": {
    "status_code": 0,
    "status_message": "SUCCESS"
  },
  "station_units": {
    "units_temp": "f",
    "units_wind": "mph",
    "units_precip": "in",
    "units_pressure": "inhg",
    "units_distance": "mi",
    "units_direction": "cardinal",
    "units_other": "imperial"
  },
  "outdoor_keys": [
    "timestamp",
    "air_temperature",
    "barometric_pressure",
    "station_pressure",
    "pressure_trend",
    "sea_level_pressure",
    "relative_humidity",
    "precip",
    "precip_accum_last_1hr",
    "precip_accum_local_day",
    "precip_accum_local_yesterday",
    "precip_minutes_local_day",
    "precip_minutes_local_yesterday",
    "wind_avg",
    "wind_direction",
    "wind_gust",
    "wind_lull",
    "solar_radiation",
    "uv",
    "brightness",
    "lightning_strike_last_epoch",
    "lightning_strike_last_distance",
    "lightning_strike_count",
    "lightning_strike_count_last_1hr",
    "lightning_strike_count_last_3hr",
    "feels_like",
    "heat_index",
    "wind_chill",
    "dew_point",
    "wet_bulb_temperature",
    "wet_bulb_globe_temperature",
    "delta_t",
    "air_density"
  ],
  "obs": [
    {
      "timestamp": 1669667806,
      "air_temperature": -5.5,
      "barometric_pressure": 847.1,
      "station_pressure": 847.1,
      "sea_level_pressure": 1003.8,
      "relative_humidity": 63,
      "precip": 0,
      "precip_accum_last_1hr": 0,
      "precip_accum_local_day": 0,
      "precip_accum_local_yesterday": 0,
      "precip_minutes_local_day": 0,
      "precip_minutes_local_yesterday": 0,
      "wind_avg": 1.3,
      "wind_direction": 298,
      "wind_gust": 2,
      "wind_lull": 0.4,
      "solar_radiation": 347,
      "uv": 1.57,
      "brightness": 41603,
      "lightning_strike_last_epoch": 1667663770,
      "lightning_strike_last_distance": 27,
      "lightning_strike_count": 0,
      "lightning_strike_count_last_1hr": 0,
      "lightning_strike_count_last_3hr": 0,
      "feels_like": -5.5,
      "heat_index": -5.5,
      "wind_chill": -5.5,
      "dew_point": -11.4,
      "wet_bulb_temperature": -7.3,
      "wet_bulb_globe_temperature": -5.6,
      "delta_t": 1.8,
      "air_density": 1.10255,
      "pressure_trend": "falling"
    }
  ]
}
1 Like