Der API-Request fuer Meteoblue funktioniert nicht für “basic-day”, also die kostenlose Abfrage der Meteoblue-API.
Ich habe mir das mal angesehen.
Im Code “src/main/java/org/openhab/binding/weather/internal/provider/MeteoBlueProvider.java” steht folgenden URL.
private static final String URL = "http://my.meteoblue.com/dataApi/dispatch.pl?apikey=[API_KEY]&type=json_7day_3h_firstday&lat=[LATITUDE]&lon=[LONGITUDE]&temperature=C&windspeed=ms-1&winddirectio
n=degree&precipitationamount=mm&format=json";
Der OutPut mit einem validen API-Key lautet dann,
{
"error_message": "MB_REQUEST::DISPATCH: This datafeed is not authorized for your api key",
"info": "Need help? Please contact info@meteoblue.com and provide this information"
}
Der valide Request zum passenden API-Key, laut Meteoblue lautet jedoch,
http://my.meteoblue.com/packages/basic-day?apikey=[API_KEY]&lat=[LATITUDE]&lon=[LONGITUDE]&asl=32&tz= Europe%2FBerlin&&city=[LOCATION]
Das Ergebnis wuerde dann so aussehen.
{
"metadata":
{
"name": "",
"latitude": 52.45,
"longitude": 13.57,
"height": 32,
"timezone_abbrevation": "CET",
"utc_timeoffset": 1.00,
"modelrun_utc": "2017-02-21 00:00",
"modelrun_updatetime_utc": "2017-02-21 07:26"
},
"units":
{
"time": "YYYY-MM-DD hh:mm",
"predictability": "percent",
"precipitation_probability": "percent",
"pressure": "hPa",
"relativehumidity": "percent",
"temperature": "C",
"winddirection": "degree",
"precipitation": "mm",
"windspeed": "ms-1"
},
"data_day":
{
"time": ["2017-02-21", "2017-02-22", "2017-02-23", "2017-02-24", "2017-02-25", "2017-02-26", "2017-02-27"],
"pictocode": [12, 12, 12, 11, 12, 12, 12],
"uvindex": [1, 0, 0, 1, 1, null, null],
"temperature_max": [8.05, 10.02, 10.53, 5.38, 9.47, 9.76, 13.00],
"temperature_min": [5.05, 4.34, 4.26, 2.02, 0.70, 5.97, 5.98],
"temperature_mean": [7.44, 7.45, 6.53, 3.89, 5.00, 7.85, 9.37],
"felttemperature_max": [3.67, 3.42, 5.45, -2.39, 2.54, 1.57, 6.60],
"felttemperature_min": [0.68, -2.18, -5.06, -6.30, -5.42, -2.67, 0.65],
"winddirection": [270, 270, 270, 270, 225, 270, 225],
"precipitation_probability": [96, 93, 99, 61, 85, 85, 40],
"rainspot": ["1221211122111112121112222111222221122111112111112", "3333333333333333333333333333333333333333333333333", "3333333333333333333333333333333333333333333333333", "2322222232233323233332233333333323333333332322322", "3333333333333333333333333333333333333333333333333", "2222222122222222222322222222222222222223322223322", "1111111111111111111111111111111111211111111112121"],
"predictability_class": [4, 3, 3, 2, 3, 2, 2],
"predictability": [66, 54, 46, 35, 48, 32, 22],
"precipitation": [2.17, 8.88, 7.18, 5.94, 6.17, 4.90, 0.90],
"snowfraction": [0.00, 0.00, 0.00, 0.38, 0.00, 0.00, 0.00],
"sealevelpressure_max": [1010, 1009, 1000, 1003, 1008, 1010, 1008],
"sealevelpressure_min": [1005, 997, 985, 988, 994, 994, 1003],
"sealevelpressure_mean": [1007, 1000, 993, 997, 1002, 1002, 1005],
"windspeed_max": [7.91, 9.20, 12.38, 12.98, 11.30, 12.71, 8.94],
"windspeed_mean": [6.32, 7.12, 7.15, 8.43, 7.87, 10.15, 7.05],
"windspeed_min": [3.60, 3.01, 3.16, 4.88, 5.56, 4.94, 4.15],
"relativehumidity_max": [92, 95, 94, 92, 95, 90, 93],
"relativehumidity_min": [75, 76, 66, 67, 81, 81, 75],
"relativehumidity_mean": [85, 85, 84, 82, 90, 86, 86],
"convective_precipitation": [0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00],
"precipitation_hours": [4.00, 8.00, 6.00, 5.00, 6.00, 5.00, 1.00],
"humiditygreater90_hours": [6.00, 7.00, 4.00, 1.00, 12.00, 0.00, 9.00]
}
}
```