SeitaBV / flexmeasures-openweathermap

Integration to the OpenWeatherMap API from FlexMeasures.
Apache License 2.0
4 stars 1 forks source link

Working first version #1

Closed nhoening closed 2 years ago

nhoening commented 2 years ago

NOTE: This requires https://github.com/FlexMeasures/flexmeasures/pull/352 I'll make a dev-version from that branch after the first round of review over there, and then I intend to make the tests work over here. That can be done in a new smaller PR, so this working version is published earlier.

nhoening commented 2 years ago

Here is a question: Should we even leave the choice to the user whether they want to setup less than the set of supported sensors per weather station?

In a more simpler world, we let them add a weather station and it gets all supported sensors. Of course, if that means you get six sensors, when all you wanted was one, you have too much data...

nhoening commented 2 years ago

But I still fail when a supported sensor has not been registered at all, so I'll work on that.

Flix6x commented 2 years ago

Here is a question: Should we even leave the choice to the user whether they want to setup less than the set of supported sensors per weather station?

In a more simpler world, we let them add a weather station and it gets all supported sensors. Of course, if that means you get six sensors, when all you wanted was one, you have too much data...

Actually, my preference would be to have only the collect_weather_data endpoint, and have it set up a new weather station by itself, in case no station exists at the given location. We could move the sensor_name and sensor_timezone options there, too. But I think that this kind of work is better suited for a follow-up PR.

nhoening commented 2 years ago

I believe OWM can't be called for just one sensor at a time. This design is not making sense to me yet

nhoening commented 2 years ago

@Flix6x The compute_irradiance function is still in FM. I propose I also move that over here. Agreed?

Flix6x commented 2 years ago

I agree