Historical weatherflow pressure data shows only whole millibars

Hi,

I am new to the Weatherflow API, but I have got some basic code running to get hold of observations from my station.

I can retrieve the latest observations with the following type of request using station ID:

https://swd.weatherflow.com/swd/rest/observations/station/xxxxx

this returns, amongst other things:

“barometric_pressure”:1000.5,

which is fine.

In order to download historical data from my station, I understand that I have to use device ID instead, as follows:

https://swd.weatherflow.com/swd/rest/observations/device/xxxxxx

This also works ok,however, in the array that is returned, I find the barometric pressure is shown as 1000.

It seems that I can’t retrieve the decimals of the millibars, just the integer. This is a bit of a problem for what I’m trying to do.

Have I got this right?

Is there any way around his so I can get the historical pressure data including the millibar decimals?

Many thanks

Ralph

How are you requesting data from the past? Are you using the time_start and time_end URL parameters, or the day_offset parameter?

From a quick experiment I find that using the day_offset parameter reports without the decimal place

https://swd.weatherflow.com/swd/rest/observations/device/xxxx?day_offset=1&token=xxxx

{
  "status": {
    "status_code": 0,
    "status_message": "SUCCESS"
  },
  "device_id": 131915,
  "type": "obs_st",
  "bucket_step_minutes": 1,
  "source": "db",
  "obs": [
    [
      1648598400,
      0.01,
      0.56,
      1.23,
      63,
      3,
      1001,
      5.5,
      93,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      2.63,
      1,
      0,
      null,
      null,
      0
    ],...],
}

Whereas using time_start and time_end retains the decimal place

https://swd.weatherflow.com/swd/rest/observations/device/xxxx?time_start=1648707652&time_end=1648717652&token=xxxx

{
  "status": {
    "status_code": 0,
    "status_message": "SUCCESS"
  },
  "device_id": 131915,
  "type": "obs_st",
  "bucket_step_minutes": 1,
  "source": "db",
  "obs": [
    [
      1648707660,
      0.11,
      0.6,
      1.52,
      146,
      3,
      999.1,
      0,
      96,
      1082,
      0.07,
      9,
      0,
      0,
      0,
      0,
      2.6,
      1,
      0,
      null,
      null,
      0
    ],...],
}
1 Like

OK, this is really wierd.

I was doing time_start & time_end yesterday, and the decimal we missing.

Still, you’ve given me reason to hope & investigate futher.

Many thanks

Ralph

Ok, had a talk with our data experts internally.

What is happening today (could change at some point)

when you have a reading of 1000,0 you will get 1000 in the api call
when you have a reading of 1000,1 you will get 1000,1 in the api call

Hope this clarifies the situation. And if you somehow see something different, do call in again :wink: