Open nhoening opened 1 year ago
The account_id
would be fetched from account
table or it would be created while saving forecasts?
It would be passed in via CLI, checked if a weather station exists in that account, and then only weather stations for this account would be used for sensor lookup.
Is not passed in, we should probably insist on public weather stations, but maybe that is not straightforward with how FlexMeasures is set up currently.
Does this make it clearer?
The
account_id
would be fetched fromaccount
table or it would be created while saving forecasts?
No we would not create the account in this plugin. This is for existing accounts.
Currently, all weather stations will be searched and potentially be used to store data (if they are the closest to the location).
While it makes sense conceptually that weather stations are public (to be used by all accounts on a FlexMeasures server), it doesn't have to be like that. Maybe two accounts use different weather services. It can lead to unwanted data situations, in any case.
Sensor.find_closest()
already supports adding anaccount_id
argument. We could support this from FM-OWM, by configuring an account_id (as CLI parameter or a setting).It would also be good to query only public weather stations per default, however, the
account_id
parameter has no effect when set toNone
. Maybe we'd need to add our own filter (disregarding non-public) in this case.