Multiple outdoor devices in same station

I encounter a problem when getting the metadata for a given station: I get 2 devices that appear to be both valid (they both have a serial_number).

{
  "device_id": xxxx,
  "device_meta": {
    "agl": 7.62,
    "name": "ST-xxxx",
    "environment": "outdoor",
    "wifi_network_name": ""
  },
  "device_type": "ST",
  "location_id": xxxx,
  "serial_number": "ST-xxxx",
  "device_settings": {
    "show_precip_final": false
  },
  "firmware_revision": "156",
  "hardware_revision": "1"
},
{
  "device_id": xxxx,
  "device_meta": {
    "agl": 1.8288,
    "name": "ST-xxxx",
    "environment": "outdoor",
    "wifi_network_name": ""
  },
  "device_type": "ST",
  "location_id": xxxx,
  "serial_number": "ST-xxxx",
  "device_settings": {
    "show_precip_final": true
  },
  "firmware_revision": "163",
  "hardware_revision": "1"
}

When I fetch historical data of the station, I use the first device_id I get from the device list that have type ā€œSTā€, with a serial_number, but that one returns a 404 NOT FOUND response from the API.

I did not expect that case. Could you please explain me in which case I can get 2 outdoor devices for a given station and how I should handle this?

Thanks a lot for your help.

that should work. try it out at Tempest API to see some examples as well

Thanks for your reply, but as I explain it does not work :slight_smile:. It is not a question of a wrong API call, but rather a problem with that device.
I suppose there has been a hardware replacement for some reason, the old device has not been removed in the software side of the station.

If you say it should work. Does that mean a given station_id could hold 2 outdoor devices of same type at the same time? Could you point me at an example? I donā€™t even know how the official Tempest dashboard would look like.

Yes, this is perfectly possible. My station has two Tempest devices (although one is currently offline)

1 Like

Thanks a lot Peter. My understanding of what a station (in the Tempest sense) was was erroneousā€¦

What kind of devices can we find on a station? And are there limits of how many there can be?

the official tempest dashboard looks like this Tempest with two devices on the same station (never mind the device that is offline).

so, did you manage to get the info from the server?

A station is a Hub. Each hub (or station) can have multiple devices (Tempest, Sky or Air). There is a maximum limit that has been shared somewhere on this forum, but I can find it right now!

Here are a couple more station examples for you:

The first one has a Tempest, SKY and two AIR units with one being an indoor unit and the second is my field test station with two Tempests and a SKY.

When I used your App I was able to see and select any of my 3 stations/hubs from the top drop down arrow.
But my main station ā€˜31 bombala stā€™ has 2 skys measuring wind in different locations and the readings on your main page only show readings from one of those skys.
My main station/hub also uses a different sky to measure rainfall than the sky that measures all the other sky readings. But the rainfall sky has broken but i have not removed it from the hub. Weatherflow selects which values come from which device and I request them to change those settings. Which determine which device supplies which reading type (rain, wind, temp etc) to the main page and to weather underground and to the current station readings from the api.
What is unusual with this hub/station is that it hosts 2 skys measuring wind in 2 different locations 5km away from each other. But that is unusual for weatherflow hub/stations. If I were building your app I would not worry about the very few people with multiple duplicate sensors.
Here is the link to that hub Tempest
Then I have a hub that is the new Tempest hub. This hub has 3 Tempests connected to it. But 2 of the tempests have failed many months ago. I do not know if the failed tempests will ever work again. I do not rely on this station and I use it for testing.
Tempest
There is a flaw in the schema due to the location being a hub/station property. In my opinion a location is a sensor property. The issue only arises when a user connects multiple duplicate sensors to a hub. There is then no simple property to locate where the duplicate sensors are located.
I hope this helps.
Cheers Ian :slight_smile:

No it does not work. Even though the understanding was incorrect, the API calls were fine. I added a way to blacklist devices that return an API request with status 404 on historical data.

Thanks @iladyman,

This is indeed complicated to address these cases. I think I will leave that for now (sorry) and concentrate on the majority of users that have a basic setup.

Once all more important issues have been addressed, I will try to handle specific cases such as yours.
Kind Regards, Vincent

Hi @vincent.toupet ,
Perhaps I should have highlighted my comment ā€˜If I were building your app I would not worry about the very few people with multiple duplicate sensors.ā€™
Your App already displays the stations default sensors.
Your App also already allows multiple stations to be selected.
And due to the Tempest distance to the hub limited to about 500m compared to the Sky max distance over 5km and the Sky is no longer for sale it is extremely rare to have multiple remote Tempest or Sky.
And people like myself pushing the boundaries with the hardware are also able to access our data without using your App.
My advice is to keep your App focus to the average user with one Tempest and provide them with easy reliable solutions that they want.
My feedback is simply to help your understanding of the data structure. I do not require your App for myself. But the people who use my weather data could be interested in your App but they do not have my access key so I guess they would not be able to use your App. Currently those people use either the weatherflow web pages or weather underground or my web site where I publish my weather.
Cheers Ian :slight_smile:

Thanks @iladyman for you help and your kindness.