SUPPORT GEA
______________
Le projet GEA ayant pris de l'ampleur, il n'est plus possible de regroupé toutes les questions/réponses, demandes de support et évolutions au sein d'un seul et même topic.
Ce topic est donc créer pour répondre à vos questions, doutes, demandes d'assistance.
N'hésitez pas à poser vos questions ici, la communauté sera contente de vous aider dans la mesure du possible
Projet GEA : Tutorial (dernière version disponible sur ce post)
Version actuel 5.40 : disponible sur GitHub (ancienne version)
Un Wiki est disponible (connexion pas forcément stable) : Wiki
Hola
depuis qq temps (passage 4.170 ?) , passage GEA 6.07 ?
j'ai un problème avec un VD et GEA et pourtant qq chose de simple
CONSOMMATION_GAZ = 546
GEA.add(true , 60, "",{{"VirtualDevice", id["CONSOMMATION_GAZ"], 5},{"Repeat"}}) -- Remontée Conso Gaz
appuie simple sur un bouton qui récupère la conso du NorthQ et qui stock dans un Variable et qui mets à jour un les labels du VD
je vois bien que ca plante car l'heure du VD (= heure de l'appuie) est restée bloquée et ma conso de conso remonte pas
time1 = os.date("%H:%M");
fibaro:call(JL.selfId, "setProperty", "ui.LabelWhen.value", JL.translation[JL.language]["Update_Time"].." "..time1);
un reboot de GEA semble reprendre le bon fonctionnement pour qq instants, mais ca va planter rapidement
un reboot de la BOX reprends le bon fonctionnement pour qq jours mais ca plante au bout d'un moment aussi
je ne comprends pas l'erreur (ce VD fonctionne depuis 1an)
pas facile je sais comme cela pour m'aider mais avez vous une piste de recherche ?
(je précise aucune erreur nulle part)
le code du VD ci besoin (VD du fofo fibaro)
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-- Energy information from AEON Labs - Home Energy Meter DSB09104-ZWEU
-- Energy information from NorthQ
-- Gas information from NorthQ
--
-- 2014-2017 Jonny Larsson @jompa68
--
-- 2017-01-22 - Added support for NorthQ energy meter
-- 2017-02-01 - Fixed some bugs
JL = {}
---- USERCONFIG -------------------------------------------------------
-- Language translation, change this to what you want,
-- possible settings are EN, SE, PL, DE
JL.language = "FR";
useGasNorthQ = true
gasNorthQID = 545
--- END USER CONFIG ---------------------------------------------------
---- MAIN CODE --------------------------------------------------------
version = "2.3.3"
time = os.time()
date = os.date("*t", time)
year = date.year
month = date.month
day = date.day
minute = date.min
unixtime = os.time{year=year, month=month, day=01, hour=00, min=00, sec=00}
today = os.time{year=year, month=month, day=day, hour=00, min=00, sec=00}
JL.selfId = fibaro:getSelfId()
JL.selfIp = fibaro:get(JL.selfId, "IPAddress");
JL.translation = {true}
-- English
JL.translation["EN"] = {
Energy_Name = "Energy consumption",
Energy_Now = "Right now:",
Energy_Hour = "Last hour:",
Energy_Month = "This month:",
Energy_Today = "Today:",
Gas_Hour = "Gas used last hour:",
Gas_Today = "Gas used today:",
Update_Time = "Time:",
Energy_btn = "Updated",
Energy_IP = "Put in ip adress in VD, ex 127.0.0.1",
No_data_exist = "No data exist!",
Counter = "Counter Value"
}
-- French
JL.translation["FR"] = {
Energy_Name = "Consommation d'énergie",
Energy_Now = "En ce moment:",
Energy_Hour = "Depuis 1 heure:",
Energy_Month = "Ce mois:",
Energy_Today = "Aujourd'hui:",
Gas_Hour = "Conso Gaz depuis 1 heure:",
Gas_Today = "Conso Gaz aujourd'hui:",
Update_Time = "Heure:",
Energy_btn = "Mis à jour",
Energy_IP = "Renseigné l'adresse IP dans le VDP, ex 127.0.0.1",
No_data_exist = "Aucune donnée!",
Counter = "Compteur"
}
function JL.getEnergyData()
HC2 = Net.FHttp(JL.selfIp,11111)
if useGasNorthQ == true then
rgas, status, errorCode = HC2:GET("/api/devices/"..gasNorthQID)
end
time1 = os.date("%H:%M");
status = 200
errorCode = 0
if (tonumber(status) == 200 and tonumber(errorCode) == 0) then
if useGasNorthQ == true then
jsonTable4 = json.decode(rgas)
gasValueNow = jsonTable4.properties.value
g1 = os.time{year=year, month=month, day=day, hour=00, min=01, sec=00}
fibaro:debug(" g1 " .. g1)
-- fibaro:debug(" time " .. time)
if g1 > time then
gasStartToday = (jsonTable4.properties.value)
fibaro:setGlobal("gasStartToday", gasStartToday)
fibaro:debug(" gasStartToday " .. gasStartToday)
fibaro:debug(" yes " )
end
vgasStartToday = fibaro:getGlobal("gasStartToday")
gasToday = gasValueNow-vgasStartToday
fibaro:setGlobal("gasToday", gasToday)
-- Gas per hour
if minute == 00 then
gasStartHour = gasValueNow
fibaro:setGlobal("gasStartHour", gasStartHour)
end
if minute == 59 then
gasStopHour = gasValueNow
gasStartHour = fibaro:getGlobal("gasStartHour")
gasHour = gasStopHour - gasStartHour
fibaro:setGlobal("gasHour", gasHour)
else
gasStartHour = fibaro:getGlobal("gasStartHour")
gasHour = gasValueNow - gasStartHour
end
end
if useGasNorthQ == true then
fibaro:call(JL.selfId, "setProperty", "ui.lblnorthQID.value", fibaro:getName(gasNorthQID));
fibaro:call(JL.selfId, "setProperty", "ui.GasNow.value", JL.translation[JL.language]["Gas_Hour"].." "..round(gasHour,2).." m3");
fibaro:call(JL.selfId, "setProperty", "ui.GasToday.value", JL.translation[JL.language]["Gas_Today"].." "..round(gasToday,2).." m3");
fibaro:call(JL.selfId, "setProperty", "ui.LabelWhen.value", JL.translation[JL.language]["Update_Time"].." "..time1);
fibaro:call(JL.selfId, "setProperty", "ui.LabelCounter.value", JL.translation[JL.language]["Counter"].." "..gasValueNow);
-- fibaro:debug(" vgasStartToday " .. vgasStartToday)
-- fibaro:debug(" gasStartHour " .. gasStartHour)
-- fibaro:debug(" gasHour " .. gasHour)
-- fibaro:debug(" gasValueNow " .. gasValueNow)
-- fibaro:debug(" gasToday " .. gasToday)
end
if useGasNorthQ == false then
fibaro:call(JL.selfId, "setProperty", "ui.lblnorthQID.value", "No NorthQ gas meter");
fibaro:call(JL.selfId, "setProperty", "ui.GasToday.value", "NA");
fibaro:call(JL.selfId, "setProperty", "ui.GasNow.value", "NA");
end
else
fibaro:debug(JL.translation[JL.language]["No_data_exist"].." Error:"..errorCode);
end
end
function calculate(value)
return math.floor(value * cost)
end
function round(num, numDecimalPlaces)
if numDecimalPlaces and numDecimalPlaces>0 then
local mult = 10^numDecimalPlaces
return math.floor(num * mult + 0.5) / mult
end
return math.floor(num + 0.5)
end
if (JL.selfIp == nil or string.len(JL.selfIp) == 0) then
fibaro:debug(JL.translation[JL.language]["Energy_IP"]);
fibaro:abort();
end
JL.getEnergyData()