Obs_sky and obs_air

Why is the obs an array of arrays? Will there ever be an index other than zero?

1 Like

For those that wonder what @GaryFunk is talking about (I’m one of them …)

This is part of the api you can use to get data from Weatherflow servers

WeatherFlow Smart Weather API Websocket Reference

And since I’m not a coder … your sentence is a bit obscure. Could you elaborate some for future reference ?

1 Like

First. That’s why I posted in developers.

Second. It’s a question only @dsj and @corrineb can answer.

However my question is based on the following data received from the Hub:

“serial_number”: “AR-00004049”,
“hub_sn”: “HB-00000001”,
“firmware_revision”: 17

As shown, the obs key is an array of arrays.

We used to send these questions direct to WeatherFlow via email but I was directed to post them here. Perhaps there should be a private group for developers to post to, just to avoid such future confusion.

1 Like

Gary, this category (#developers) is exactly the place to post such questions!

Answer: Yes, the “obs” field is an array of arrays to allow it to contain multiple observations. While we don’t envision this happening over broadcast protocols like UDP or web socket, we’re trying to use the same JSON format across all protocols that support JSON, and the REST interface supports requests for multiple observations.

Ahhhhh! Yes. That makes sense and I should have realized that from the station observation data from the REST API.

silly me

Another “Doh” moment.

I like that you use “obs” for multiple arrays and “ob” for a single array.