Question about the Tempest Observation Record format

It’s been a while since I came back because my scripts have just been working properly. But my sky unit died (fell off the roof) and so I installed my backup Tempest unit which means I have to update my scripts. The documentation here shows the observation record format and it lists 21 fields for a Tempest observation. But when I pull the data down I see 22 fields and that last field seems to be doing something. Any idea what it is?

Here’s a sample record:

status { status_code: 0, status_message: “SUCCESS” }
device_id 464524
type “obs_st”
bucket_step_minutes 1
obs
[0…99]
0
0 1771200000
1 0.33
2 0.48
3 0.66
4 213
5 3
6 984.53
7 15.7
8 57
9 15630
10 0.7
11 130
12 0
13 0
14 0
15 0
16 2.74
17 1
18 0
19 0
20 0
21 0
22 3

What’s your code look like? I just pulled mine up and it’s only 0-21. Could the 22 because you iterating through the array too far?

No code, just doing a direct call from the browser and looking at the returned JSON:

https://swd.weatherflow.com/swd/rest/observations/?device_id=464524&token=[token]&day_offset=42

Can’t see it - unauthorized. You might want to attach the JSON output so we can see what it is returning natively without you doing any processing of what it returned.

Short answer I suppose is that you need to practice defensive programming and be able to gracefully handle unexpected input.

My original message had the formatted JSON data but here’s a sample of the raw output for 4 observations:

{"status":{"status_code":0,"status_message":"SUCCESS"},"device_id":464524,"type":"obs_st","bucket_step_minutes":1,"obs":[[1771372800,0,0.53,2.14,123,3,987.52,15.2,52,11759,0.53,98,0,0,0,0,2.78,1,6.93012,0,3.829395,0,23],[1771372860,0,0.45,1.13,76,3,987.51,15.1,52,10578,0.47,88,0,0,0,0,2.78,1,6.93012,0,3.829395,0,2],[1771372920,0,0.11,0.67,33,3,987.42,14.9,53,9677,0.43,80,0,0,0,0,2.78,1,6.93012,0,3.829395,0,2],[1771372980,0,0.46,1,229,3,987.4,14.8,52,9158,0.41,76,0,0,0,0,2.78,1,6.93012,0,3.829395,0,2]

Thanks. I see it now.

Fair question. What ‘is’ that item ?

So frustrating when a published API isn’t updated when they change something and don’t document it. All you can do is ignore the unexpected extra item for now.

Did you open a support ticket ?

1 Like

I figured I’d go through the here first and then open a ticket. That bit of data isn’t going to break my scripts, it’d just be nice to know if it was something useful :slight_smile:

I agree the support ticket is the way to go. Tempest says they don’t actively monitor this community with any regularity, and I believe them. They are responsive to support tickets though. Report back when you get an answer.

Apparently it was latency field that shouldn’t have been made available to the public and now isn’t.

2 Likes