volttron icon indicating copy to clipboard operation
volttron copied to clipboard

weather.gov hourly forecast does not work for lat and lon inputs

Open schandrika opened this issue 2 years ago • 3 comments

There is a change in how hourly forecast need to be retrieved from weather.gov api for hourly forecast. latitude and longitude cannot be directly used to retrieve hourly forecast. Solution: When latitude and longitude are given as input, query the api to get the corresponding weather station details and then get hourly forecast using that data

schandrika avatar Sep 01 '22 21:09 schandrika

It would be great if we could auto-generate the needed wfo, x, and y for both lattitude/long. and weather station ID.

rlutes avatar Sep 01 '22 21:09 rlutes

@rlutes I fixed this for lat/lon. currently you can send lat/lon or gridId, gridX, and gridY. Is there a different api for station id?

schandrika avatar Sep 01 '22 21:09 schandrika

@schandrika if you do a call to stations/{station_id} it returns the lat,long in the geometry dictionary. Previously, you could do the forecast for lat/long or station ID.

Currently the readme for the agent references the weather station. This will work for getting the latest observation or reading but not to do the forecast. Since the main use of the weather agent is to get forecast weather data I think that it would probably be good to update this documentation and include documentation on RPC call to get the hourly forecast.

rlutes avatar Sep 01 '22 22:09 rlutes