jscrane / WifiWeatherGuy

WeatherGuy for ESP8266
Apache License 2.0
1 stars 0 forks source link

Open Meteo Provider #26

Closed jscrane closed 5 days ago

jscrane commented 1 week ago

Combined weather data from multiple national weather centres.

API docs

jscrane commented 1 week ago

All current conditions.

$ curl -X GET --header 'Accept: application/json' 'https://api.open-meteo.com/v1/forecast?latitude=53.3146&longitude=-6.275&timeformat=unixtime&temperature_unit=celsius&wind_speed_unit=kmh&precipitation_unit=mm&hourly=temperature_2m&timezone=auto&current=temperature_2m,relative_humidity_2m,apparent_temperature,is_day,weather_code,surface_pressure,wind_speed_10m,wind_direction_10m&forecast_days=1&forecast_hours=0&daily=sunrise,sunset'

Response: { "latitude": 53.323345, "longitude": -6.2775116, "generationtime_ms": 0.0851154327392578, "utc_offset_seconds": 0, "timezone": "Europe/Dublin", "timezone_abbreviation": "GMT", "elevation": 39, "current_units": { "time": "unixtime", "interval": "seconds", "temperature_2m": "°C", "relative_humidity_2m": "%", "apparent_temperature": "°C", "is_day": "", "weather_code": "wmo code", "surface_pressure": "hPa", "wind_speed_10m": "km/h", "wind_direction_10m": "°" }, "current": { "time": 1730981700, "interval": 900, "temperature_2m": 13.9, "relative_humidity_2m": 88, "apparent_temperature": 12.2, "is_day": 1, "weather_code": 3, "surface_pressure": 1020.8, "wind_speed_10m": 16.2, "wind_direction_10m": 146 }, "hourly_units": { "time": "unixtime", "temperature_2m": "°C" }, "hourly": { "time": [], "temperature_2m": [] }, "daily_units": { "time": "unixtime", "sunrise": "unixtime", "sunset": "unixtime" }, "daily": { "time": [1730937600], "sunrise": [1730964978], "sunset": [1730997677] } }

jscrane commented 1 week ago

7-day forecast with 0 hours of temperature.

$ curl -X GET --header 'Accept: application/json' 'https://api.open-meteo.com/v1/forecast?latitude=53.3146&longitude=-6.275&timezone=auto&timeformat=unixtime&temperature_unit=celsius&wind_speed_unit=kmh&precipitation_unit=mm&hourly=temperature_2m&forecast_hours=0&current=temperature_2m&forecast_days=7&daily=weather_code,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,wind_speed_10m_max,wind_gusts_10m_max,wind_direction_10m_dominant'

Response: { "latitude": 53.323345, "longitude": -6.2775116, "generationtime_ms": 0.298976898193359, "utc_offset_seconds": 0, "timezone": "Europe/Dublin", "timezone_abbreviation": "GMT", "elevation": 39, "current_units": { "time": "unixtime", "interval": "seconds", "temperature_2m": "°C" }, "current": { "time": 1730983500, "interval": 900, "temperature_2m": 13.8 }, "hourly_units": { "time": "unixtime", "temperature_2m": "°C" }, "hourly": { "time": [], "temperature_2m": [] }, "daily_units": { "time": "unixtime", "weather_code": "wmo code", "temperature_2m_max": "°C", "temperature_2m_min": "°C", "apparent_temperature_max": "°C", "apparent_temperature_min": "°C", "sunrise": "unixtime", "sunset": "unixtime", "wind_speed_10m_max": "km/h", "wind_gusts_10m_max": "km/h", "wind_direction_10m_dominant": "°" }, "daily": { "time": [1730937600, 1731024000, 1731110400, 1731196800, 1731283200, 1731369600, 1731456000], "weather_code": [3, 51, 3, 51, 3, 51, 51], "temperature_2m_max": [14.2, 13.3, 12.4, 13.4, 11.7, 10.9, 9.5], "temperature_2m_min": [13.1, 11.7, 11.6, 8.2, 6.2, 7.1, 6], "apparent_temperature_max": [13, 12.1, 11.1, 12.3, 9.2, 8.8, 6.1], "apparent_temperature_min": [11.5, 9.8, 9.8, 5.4, 3.1, 4.1, 3.4], "sunrise": [1730964978, 1731051489, 1731138000, 1731224512, 1731311024, 1731397536, 1731484047], "sunset": [1730997677, 1731083975, 1731170275, 1731256576, 1731342879, 1731429183, 1731515489], "wind_speed_10m_max": [16.9, 16.2, 13.2, 15.8, 12.6, 16.6, 17.6], "wind_gusts_10m_max": [34.9, 33.8, 24.5, 40, 24.8, 27, 44.6], "wind_direction_10m_dominant": [148, 138, 136, 258, 285, 312, 27] } }

jscrane commented 1 week ago

See API page for WMO Weather Interpretation Codes.

See here for suggestions for icons for each code. Also here.

jscrane commented 6 days ago

Still to do: