-
Compteur de contenus
1 511 -
Inscription
-
Dernière visite
-
Jours gagnés
69
couillerot a gagné pour la dernière fois le 23 novembre 2022
couillerot a eu le contenu le plus aimé !
Profile Information
-
Sexe :
Homme
-
Ville :
Saône & Loire (71)
-
Intéret :
Home Cinema, graphisme, tennis, domotique...
-
Box
Autre
-
Version
HC2 & HC3
couillerot's Achievements
-
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
Comment ça ? ça ne relève que toutes les 24 heures ? Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
c'est déjà ça maintenant je pense que tu peux remettre 0 en valeur pour T° et H° Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
ou as-tu atteint les 50 rquests / Jour ???? tu sais ça peut aller vite avec les sauvegardes lors de la configuration du QA... le mieux maintenant serait de le laisser tel quel et d'attendre demain Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
j'ai mis en première page le lien pour télécharger la version que j'utilise actuellement. essaies peut-être avec cette mouture... Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
et si tu mets des ID aux variables "temp_id" et "humidity_id" (de n'importe quel module c'est juste pour test) Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
Salut JLD, qu'est-ce qu'il t'indique dans la console ? Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
tout est rentré dans l'ordre de mon côté... ??? Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
Bonjour, oui j'ai cette même erreur.... donc ça doit venir de WeatherBit. je vais investiguer ! Stef -
Quick App : Arrosage Automatique
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
Pour palier aux nombres limités d'appels, j'ai modifié légèrement le QA Vu que j'utilise le QA "prévisions Météo", j'ai donc créé 2 VG (précipitations J+1 et J+2) que je récupère dans "Arrosage auto" Stef -
Quick App : Arrosage Automatique
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
oui il doit être sans doute possible via l'api d'activer / désactiver le calendrier. Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
pas de soucis Stef -
Quick App : Arrosage Automatique
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
à priori pas possible... et c'est bien dommage Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
tu peux remplacer le code par celui-ci ? Stef function QuickApp:onInit() self:loop() end ----- function QuickApp:loop() key_id = self:getVariable("key_id") lat = api.get("/settings/location").latitude lati = tostring(lat) lon = api.get("/settings/location").longitude long = tostring(lon) local http = net.HTTPClient() http:request("https://api.weatherbit.io/v2.0/forecast/daily?lat="..lati.."&lon="..long.."&days=5&lang=fr&key="..key_id, { options = { method = 'GET' }, success = function(response) if response.status == 200 then if response.data and response.data ~= "" then local jsonTable = json.decode(response.data) local gfx = jsonTable.data[2].weather.code local city = jsonTable.city_name local citycode = jsonTable.country_code ------------------------------------------------------------------------------ ----------------------------- CHOIX DE L'ICON -------------------------------- ------------------------------------------------------------------------------ codeicon = tonumber(gfx) id_icon1 = tonumber(self:getVariable("id_icon1")) id_icon2 = tonumber(self:getVariable("id_icon2")) id_icon3 = tonumber(self:getVariable("id_icon3")) id_icon4 = tonumber(self:getVariable("id_icon4")) id_icon5 = tonumber(self:getVariable("id_icon5")) id_icon6 = tonumber(self:getVariable("id_icon6")) id_icon7 = tonumber(self:getVariable("id_icon7")) id_icon8 = tonumber(self:getVariable("id_icon8")) id_icon9 = tonumber(self:getVariable("id_icon9")) id_icon10 = tonumber(self:getVariable("id_icon10")) id_icon11 = tonumber(self:getVariable("id_icon11")) if codeicon == tonumber("610") then self:updateProperty("deviceIcon", id_icon1) end if codeicon >= tonumber("803") and codeicon <= tonumber("804") then self:updateProperty("deviceIcon", id_icon2) end if codeicon >= tonumber("700") and codeicon <= tonumber("751") then self:updateProperty("deviceIcon", id_icon3) end if codeicon >= tonumber("500") and codeicon <= tonumber("522") then self:updateProperty("deviceIcon", id_icon4) end if codeicon >= tonumber("601") and codeicon <= tonumber("623") then self:updateProperty("deviceIcon", id_icon5) end if codeicon == tonumber("600") then self:updateProperty("deviceIcon", id_icon6) end if codeicon == tonumber("800") then self:updateProperty("deviceIcon", id_icon7) end if codeicon >= tonumber("801") and codeicon <= tonumber("802") then self:updateProperty("deviceIcon", id_icon8) end if codeicon >= tonumber("300") and codeicon <= tonumber("302") then self:updateProperty("deviceIcon", id_icon9) end if codeicon >= tonumber("230") and codeicon <= tonumber("233") then self:updateProperty("deviceIcon", id_icon10) end if codeicon >= tonumber("200") and codeicon <= tonumber("202") then self:updateProperty("deviceIcon", id_icon11) end Var_Heure = os.date("%d.%m.%Y à %Hh%M") local day2, day3, day4, day5 ------------------------------------------------------------------------------ -------------------------- CONSTRUCTION DES TABLES --------------------------- ------------------------------------------------------------------------------ week = { ["0"] = "DIMANCHE", ["1"] = "LUNDI", ["2"] = "MARDI", ["3"] = "MERCREDI", ["4"] = "JEUDI", ["5"] = "VENDREDI", ["6"] = "SAMEDI" } month = { ["01"] = "JANVIER", ["02"] = "FEVRIER", ["03"] = "MARS", ["04"] = "AVRIL", ["05"] = "MAI", ["06"] = "JUIN", ["07"] = "JUILLET", ["08"] = "AOUT", ["09"] = "SEPTEMBRE", ["10"] = "OCTOBRE", ["11"] = "NOVEMBRE", ["12"] = "DECEMBRE" } ------------------ ----- JOUR 1 ----- ------------------ precipday1 = jsonTable.data[1].precip day1weather = jsonTable.data[1].weather.description snowday1 = jsonTable.data[1].snow lowtempday_1 = jsonTable.data[1].low_temp maxtempday_1 = jsonTable.data[1].max_temp windspeed_1 = jsonTable.data[1].wind_spd winddir_1 = jsonTable.data[1].wind_cdir day_1 = jsonTable.data[1].datetime day = tostring(os.date("%w", os.time())) j_1 = string.sub(day_1, 9, 10) m_1 = string.sub(day_1, 6, 7) day1 = tonumber(day) ------------------ ----- JOUR 2 ----- ------------------ precipday2 = jsonTable.data[2].precip snowday2 = jsonTable.data[2].snow day_2 = jsonTable.data[2].datetime day2weather = jsonTable.data[2].weather.description lowtempday_2 = jsonTable.data[2].low_temp maxtempday_2 = jsonTable.data[2].max_temp windspeed_2 = jsonTable.data[2].wind_spd winddir_2 = jsonTable.data[2].wind_cdir j_2 = string.sub(day_2, 9, 10) m_2 = string.sub(day_2, 6, 7) day2 = tonumber(day1) + 1 ------------------ ----- JOUR 3 ----- ------------------ precipday3 = jsonTable.data[3].precip snowday3 = jsonTable.data[3].snow day_3 = jsonTable.data[3].datetime day3weather = jsonTable.data[3].weather.description lowtempday_3 = jsonTable.data[3].low_temp maxtempday_3 = jsonTable.data[3].max_temp windspeed_3 = jsonTable.data[3].wind_spd winddir_3 = jsonTable.data[3].wind_cdir j_3 = tostring(string.sub(day_3, 9, 10)) m_3 = tostring(string.sub(day_3, 6, 7)) day3 = tonumber(day2) + 1 ------------------ ----- JOUR 4 ----- ------------------ precipday4 = jsonTable.data[4].precip snowday4 = jsonTable.data[4].snow day_4 = jsonTable.data[4].datetime day4weather = jsonTable.data[4].weather.description lowtempday_4 = jsonTable.data[4].low_temp maxtempday_4 = jsonTable.data[4].max_temp windspeed_4 = jsonTable.data[4].wind_spd winddir_4 = jsonTable.data[4].wind_cdir j_4 = tostring(string.sub(day_4, 9, 10)) m_4 = tostring(string.sub(day_4, 6, 7)) day4 = tonumber(day3) + 1 ------------------ ----- JOUR 5 ----- ------------------ precipday5 = jsonTable.data[5].precip snowday5 = jsonTable.data[5].snow day_5 = jsonTable.data[5].datetime day5weather = jsonTable.data[5].weather.description lowtempday_5 = jsonTable.data[5].low_temp maxtempday_5 = jsonTable.data[5].max_temp windspeed_5 = jsonTable.data[5].wind_spd winddir_5 = jsonTable.data[5].wind_cdir j_5 = tostring(string.sub(day_5, 9, 10)) m_5 = tostring(string.sub(day_5, 6, 7)) day5 = tonumber(day4) + 1 ------------------------------ ------- BOUCLE SEMAINE ------- ------------------------------ if tonumber(day1) == tonumber("6") then day2 = 0 day3 = 1 day4 = 2 day5 = 3 end if tonumber(day2) == tonumber("6") then day1 = 5 day3 = 0 day4 = 1 day5 = 2 end if tonumber(day3) == tonumber("6") then day1 = 4 day2 = 5 day4 = 0 day5 = 1 end if tonumber(day4) == tonumber("6") then day1 = 3 day2 = 4 day3 = 5 day5 = 0 end if tonumber(day5) == tonumber("6") then day1 = 2 day2 = 3 day3 = 4 day4 = 5 end ---------------------------------- ---------- ALERTE NEIGE ---------- ---------------------------------- if (snowday2 > 0) or (snowday3 > 0) or (snowday4 > 0) or (snowday5 > 0) then self:updateProperty("log", "ALERTE NEIGE") elseif ( windspeed_2 > 30) or ( windspeed_3 > 30) or ( windspeed_4 > 30) or ( windspeed_5 > 30) then self:updateProperty("log", "ALERTE VENT") else self:updateProperty("log", "") end ------------------------------------------------------------------------------ --------------------------- CONSTRUCTION DES LABELS -------------------------- ------------------------------------------------------------------------------ self:updateView("labelday1", "text", week[tostring(day1)].." "..j_1.. " "..month[m_1].."\r"..day1weather.."\rT° mini : "..lowtempday_1.."°c - T° maxi : "..maxtempday_1.."°c\r" ..string.format("%.1f", precipday1) .." mm de pluie | " ..string.format("%.1f", snowday1).." mm de neige\rVent "..string.format("%.1f", windspeed_1 * 3.6).." km/h ("..winddir_1..")") self:updateView("labelday2", "text", week[tostring(day2)].." "..j_2.. " "..month[m_2].."\r"..day2weather.."\rT° mini : "..lowtempday_2.."°c - T° maxi : "..maxtempday_2.."°c\r" ..string.format("%.1f", precipday2) .." mm de pluie | " ..string.format("%.1f", snowday2).." mm de neige\rVent "..string.format("%.1f", windspeed_2 * 3.6).." km/h ("..winddir_2..")") self:updateView("labelday3", "text", week[tostring(day3)].." "..j_3.. " "..month[m_3].."\r"..day3weather.."\rT° mini : "..lowtempday_3.."°c - T° maxi ; "..maxtempday_3.."°c\r" ..string.format("%.1f", precipday3) .." mm de pluie | " ..string.format("%.1f", snowday3).." mm de neige\rVent "..string.format("%.1f", windspeed_3* 3.6).." km/h ("..winddir_3..")") self:updateView("labelday4", "text", week[tostring(day4)].." "..j_4.. " "..month[m_4].."\r"..day4weather.."\rT° mini : "..lowtempday_4.."°c - T° maxi : "..maxtempday_4.."°c\r" ..string.format("%.1f", precipday4) .." mm de pluie | " ..string.format("%.1f", snowday4).." mm de neige\rVent "..string.format("%.1f", windspeed_4 * 3.6).." km/h ("..winddir_4..")") self:updateView("labelday5", "text", week[tostring(day5)].." "..j_5.. " "..month[m_5].."\r"..day5weather.."\rT° mini : "..lowtempday_5.."°c - T° maxi : "..maxtempday_5.."°c\r" ..string.format("%.1f", precipday5) .." mm de pluie | " ..string.format("%.1f", snowday5).." mm de neige\rVent "..string.format("%.1f", windspeed_5 * 3.6).." km/h ("..winddir_5..")") self:updateView("labelMAJ", "text", "Station de "..city.." ("..citycode..") - MAJ le "..Var_Heure) ----------------------------- precipitation_arrosage = string.format("%.2f", precipday1 + precipday2) fibaro.setGlobalVariable("prevision_pluie", tostring(precipitation_arrosage)) fibaro.setGlobalVariable("precipday2", tostring(precipday2)) fibaro.setGlobalVariable("precipday3", tostring(precipday3)) ---------- else self:debug("Error : empty response data") end else self:debug("Error : status=" .. tostring(response.status)) end end, error = function(err) self:debug("Error : " .. err) end }) self:debug("Boucle PREVISIONS METEO") fibaro.setTimeout(1000 * 60 * 120, function() self:loop() end) end -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
qu'est-ce que le log t'indique ? Stef -
Quick App - Météo WeatherBit v1.3
couillerot a répondu à un(e) sujet de couillerot dans Quick App Developpeur
Salut, l'api fonctionne parfaitement chez moi Stef