Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit lookup for weather stations by account #19

Open
nhoening opened this issue Jul 25, 2023 · 3 comments
Open

Limit lookup for weather stations by account #19

nhoening opened this issue Jul 25, 2023 · 3 comments

Comments

@nhoening
Copy link
Contributor

nhoening commented Jul 25, 2023

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 an account_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 to None. Maybe we'd need to add our own filter (disregarding non-public) in this case.

@Ahmad-Wahid
Copy link
Contributor

The account_id would be fetched from account table or it would be created while saving forecasts?

@nhoening
Copy link
Contributor Author

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?

@nhoening
Copy link
Contributor Author

The account_id would be fetched from account table or it would be created while saving forecasts?

No we would not create the account in this plugin. This is for existing accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants