User, station, device relationships

I’m trying to figure out how I want to structure my data and wanted to make sure I understand how weatherflow has things setup.

Are these 5 statements accurate?

A user can have many stations.
A station belongs to one user.

A station can have many devices.
A device belongs to one station.

A device can be outdoor (default) or indoor.

Can a station have multiple outdoor air devices?
Can a station have multiple outdoor sky devices?
Can a station have multiple outdoor tempest devices?

How about the same set of questions for indoor devices?

Can a station have multiple hubs?
Can a hub have multiple stations?

Yes to all of those. Basically one hub (station) can have something like 16 sensor devices, though I haven’t tested this limit.

That’s what I thought, thanks for confirming that for me.

In reading the REST API docs for get observations/station it says “If a user has multiple Devices of the same type they are able to designate one of them as primary”.

Is there any way to know what device a user has designated as primary in the REST or WebSocket APIs?

I had assumed that a hub is a station. But I guess at weatherflow end it might be possible to combine a mixture of hubs into a station but I do not know if they would.
One issue that I am aware of with the Weatherflow data structure is that the coordinates lat long are a property of the station. I have several Skys several kilometers apart in different wind locations all connected to one hub.
As an owner of several hubs when I am logged in I have a drop down on the web page station name to select any of my hubs.
Cheers Ian :slight_smile: