Pour ceux que cela intéresse, il existe un site web pour récupérer les prévisions météo en json.
=> documentation : http://www.prevision-meteo.ch/uploads/pdf/recuperation-donnees-meteo.pdf
local lat = xx.xx;
local lng = x.x;
HC2 = Net.FHttp("www.prevision-meteo.ch",80);
-- documentation : http://www.prevision-meteo.ch/uploads/pdf/recuperation-donnees-meteo.pdf
local response, status, errorCode = HC2:GET("/services/json/lat=" .. lat .. "lng=" .. lng);
if (tonumber(errorCode) == 0)
then
jsonTable = json.decode(response);
fibaro:debug("aujourd'hui : " .. jsonTable.current_condition.tmp .. "°c - " .. jsonTable.current_condition.condition);
fibaro:debug(jsonTable.fcst_day_1.day_short .. " : min : " .. jsonTable.fcst_day_1.tmin .. "°c - max : " .. jsonTable.fcst_day_1.tmax .. "°c - " .. jsonTable.fcst_day_1.condition);
fibaro:debug(jsonTable.fcst_day_2.day_short .. " : min : " .. jsonTable.fcst_day_2.tmin .. "°c - max : " .. jsonTable.fcst_day_2.tmax .. "°c - " .. jsonTable.fcst_day_2.condition);
fibaro:debug(jsonTable.fcst_day_3.day_short .. " : min : " .. jsonTable.fcst_day_3.tmin .. "°c - max : " .. jsonTable.fcst_day_3.tmax .. "°c - " .. jsonTable.fcst_day_3.condition);
fibaro:debug(jsonTable.fcst_day_4.day_short .. " : min : " .. jsonTable.fcst_day_4.tmin .. "°c - max : " .. jsonTable.fcst_day_4.tmax .. "°c - " .. jsonTable.fcst_day_4.condition);
else
fibaro:debug("error "..errorCode )
end