Aller au contenu

Messages recommandés

Posté(e)

 

Showroom GEA pour HC3

 

 

Postez uniquement les fonctions testées et vérifiées.

 

Pour plus de lisibilité

 

:police: NE POSEZ PAS DE QUESTIONS DANS CE FIL !!! :police:

 

:60: Si vous voulez remercier pour un post, cliquez sur le bouton j'aime  :60: 

 

 

Si vous avez une question, allez dans le fil Support GEA et faites référence à un post ou copiez l'extrait de config pour laquelle vous voulez poser une question.

 

 

Ce topic fait suite aux 2 Showrooms consacrés à GEA sur HC2 :

 

  • Like 3
  • Lazer a épinglé ce sujet
  • 3 mois après...
Posté(e)

je ma lance !

mais tout d'abord une scène INDISPENSABLE pour générer les ID des modules qui seront utilisés dans GEA :

local hidden = false --- true pour exporter les devices cachés
local dead = false -- true pour exporter les devices morts
 
local excludeType = {"com.fibaro.zwaveDevice", "weather", "HC_user", "iOS_device", "com.fibaro.voipUser"}
local excludeID = {}
local devicesJSon = api.get("/devices")
 
local devices = {}
local names = {}
local rooms = {}
 
function addName(name, roomname)
	if (type(names[name]) == "nil") then
		names[name] = true
		return name
	else 
		return addName(name.."_"..roomname, roomname)
	end
end
 
function getRooms() 
	local roomsJSon = api.get("/rooms")
	rooms[0] = "inconnu"
  	for k, v in ipairs(roomsJSon) do
    	rooms[v.id] = v.name
    end
end
 
function rename(name, roomname)
  local name = name:upper():gsub("[éêèë]", "E"):gsub("EE", "E"):gsub("[ûüù]", "U"):gsub("UU", "U"):gsub("[àâä]", "A"):gsub("AA", "A"):gsub("[öô]", "O"):gsub("OO", "O"):gsub("[îï]", "I"):gsub("II", "I"):gsub("%W", "_")
  local roomname = roomname:upper():gsub("[éêèë]", "E"):gsub("EE", "E"):gsub("[ûüù]", "U"):gsub("UU", "U"):gsub("[àâä]", "A"):gsub("AA", "A"):gsub("[öô]", "O"):gsub("OO", "O"):gsub("[îï]", "I"):gsub("II", "I"):gsub("%W", "_")
  return addName(name, roomname)
end
 
getRooms()
 
for k, v in pairs(devicesJSon) do
    local doit = (hidden or v.visible) and (dead or not v.dead)
  	if (doit) then  
  		for h, w in pairs(excludeType) do
      		if (v.type == w) then
        		doit = false
        	end
        end
    	if (doit) then
			for h, w in pairs(excludeID) do
        		if (v.id == w) then
          			doit = false
        		end
      		end
      	end
	end
  	if (doit) then
		table.insert(devices, v)
   	end
end
 
table.sort(devices, function(a,b) return a.roomID<b.roomID end)
 
local result = "<BR><BR>-- IDs générés le : " .. os.date("%d/%m/%y à %X")
local room = -1
local lastinfo = "";
 
result = result .. "<BR><BR>local id = {"
for k, v in ipairs(devices) do
  	if (room ~= v.roomID) then
    	room = v.roomID
    	result = result .. "<BR>--"..rooms[v.roomID].."<BR>"
    end
  	lastinfo = rename(v.name, rooms[v.roomID])
	result = result .. lastinfo .. " = " .. v.id .. ", "
end
result = result .. "<BR>}"
result = result .. "<BR>"
result = result .. "<BR>-- usage :"
result = result .. "<BR>--     fibaro:getValue(id[\""..lastinfo .."\"], \"value\")"
result = result .. "<BR>--     GEA.add(id[\""..lastinfo .."\"], 30, \"\")"
result = result .. "<BR>--     to add in the following QA :"
result = result .. "<BR>--        GEA"
result = result .. "<BR>--        GestionChauffage"
result = result .. "<BR>--        GestionPiscine"
result = result .. "<BR>--        Piscine_Volet_Statut (only room Piscine)"
result = result .. "<BR>--        Piscine_Eclairage_Statut (only room Piscine)"
result = result .. "<BR>--        GoogleCalendar"
print(result)

voici un exemple de sortie :

-- IDs générés le : 01/10/22 à 11:04:53

local id = {
--Cuisine
CUISINE_LUM = 566, CUISINETABLE_LUM = 567, CUISINE_PRISE = 569, CUISINE_NUKI = 757, SONOS_CUISINE = 773, ALARME_CUISINE = 407, CUISINE_TMP = 23,
--Salon
SALONTV_PRISE_TV = 744, SALONTV_LUM = 618, PETITSALON_LUM = 575, PETITSALON_PRISE = 767, ARROSER_PLANTES = 183, SALONTV_PRISE_LUM = 743, FERREPASSER_PRISE = 763, VITRINE_LUM = 619, BOULESNOEL_PRISE = 765, SALLEMANGER_LUM = 574, ALARME_SALONTV = 443, ALARME_PETITSALON = 444, SALON_HUM = 101, SALON_TMP_SET = 99, SALON_TMP = 100,
--Hall d'entrée
ALARME_HALLENTRE = 431, HALLENTRE_ENTRE_LUX = 56, HALLENTRE_NUKI = 759, HALLENTRE_CUISINE_MVT = 32, HALLENTRE_LUM = 712, EST_SOMBRE = 188, HALLENTRE_ENTRE_MVT = 54, HALLENTRE_LUM_AUTH = 190,
--Ch Parents
SONOS_PARENTS = 775, PARENTS_TMP = 29, CHAUF_PARENTS_VANNE = 250, ALAME_CHPARENTS = 408,
--SdB RdC
CHAUF_SDBRDC_RADIATEUR = 162, ULTRASONS_PRISE = 740, CHAUF_SDBRDC_THERMOSTAT = 734, CHAUF_SDBRDC_VANNE = 244, LAVABO_LUM = 685, DOUCHE_LUM = 686, SDBRDC_TMP = 731,
--Dressing
DRESSING_PRISE = 107,
--Buanderie
BUANDERIE_PRISE = 745,
--Cellier
CHAUF_CELLIER_VANNE = 241,
--Garage
CHAUF_GARAGE_VANNE = 219, ALARME_NUIT = 456, MAISON_TOTAL_A = 630, MAISON_P1_A = 638, ALARME_INTRUSION = 419, PRISE_SCOTER = 677, ALARME_PERTE220V = 420, ALARME_GARAGE = 432, MAISON_TOTAL_V = 629, GV_MOUVEMENT = 372, MODEM_PRISE = 679, GV_OUVERT = 371, MAISON_P2_A = 646, MAISON_P3_A = 654, ALARME_GENERALE = 455, GA_OUVERT = 580, POUBELLES_CARTONS = 182, POUBELLES_RESIDUELS = 180, GA_MOUVEMENT = 581, FREZE_TMP = 588, POUBELLES_ORGANIQUES = 179, GV_PRISE = 756, GA_PRISE = 754, POUBELLES_PMC = 181,
--Hall de nuit
HALLNUIT_SDB_MVT = 720, HALLNUIT_SDJ_MVT = 719, FGS223 = 283, HALLNUIT_SDB_LUM = 690, FGS223_HALL_DE_NUIT = 286, HALLNUIT_SDJ_LUM = 688, FGS223_HALL_DE_NUIT_HALL_DE_NUIT = 285,
--Salle de jeux
CHAUF_SDJ_RADIATEUR = 148, CHAUF_SDJ_THERMOSTAT = 114, SDJ_TMP = 94, SDJ_PRISE = 736, SDJ_NOISE = 93, CHAUF_SDJ_VANNE = 216,
--Bureau
CHAUF_BUREAU_VANNE = 193, BUREAU_PRISE = 104, BUREAU_LUM = 297, CHAUF_BUREAU_RADIATEUR = 150, BUREAU_NOISE = 86, BUREAU_TMP = 87, CHAUF_BUREAU_THERMOSTAT = 111,
--Ch Pauline
PAULINE_TMP = 119, PAULINE_LUM = 494, CHAUF_PAULINE_VANNE = 199, CHAUF_PAULINE_RADIATEUR = 151, CHAUF_PAULINE_THERMOSTAT = 143,
--Ch Max
SONOS_MAXIMILIEN = 774, CHAUF_MAX_THERMOSTAT = 144, MAX_PRISE = 623, MAX_TMP = 127, CHAUF_MAX_VANNE = 202, MAX_LUM = 695, CHAUF_MAX_RADIATEUR = 152,
--SdB Etage
SDBETAGE_VMC_FGS223 = 333, SDBETAGE_LUM_FGS223 = 332, CHAUF_SDBETA_RADIATEUR_VANNE = 208, SDBETAGE_VMC = 700, CHAUF_SDBETA_RADIATEUR = 153, SDBETAGE_LUM = 698, CHAUF_SDBETA_SECHSERV_VANNE = 205, CHAUF_SDBETA_THERMOSTAT = 145, SDBETAGE_TMP = 133,
--Biblio
BIBLIO_LUM_FGS223 = 303, BIBLIO_PRISE = 738, CHAUF_BIBLIO_THERMOSTAT = 146, BIBLIO_TMP = 137, CHAUF_BIBLIO_RADIATEUR = 154, BIBLIO_LUM = 497, CHAUF_BIBLIO_VANNE = 211,
--Avant
RGBW_589_0 = 590, RGBW_589_6 = 597, RGBW_589_9 = 600, RGBW_589_1 = 592, RGBW_589_0_1 = 591, OUEST_AVANT_MVT = 480, EST_AVANT_MVT = 504, OUEST_TMP2 = 489, OUEST_TMP1 = 488, BAL_PORTE = 396, OUEST_TMP3 = 715, RGBW_589_8 = 599, BOUTON_BARRIERE = 280, RGBW_589_7 = 598, BAL_FACTEUR = 395, AVANT_PRISE = 291, AVANT_LUM = 309, BARRIERE_FERMEE = 383, BARRIERE_OUVERTE = 384,
--Jardin
EXT_WIND_DIR = 238, JARDIN_PRISE = 625, EXT_ANEMOMETRE2 = 239, TERRPARENTS_LUM = 321, EXT_RAIN_24H = 227, EXT_WIND_SPED = 237, EXT_RAIN_1H = 228, TERRSUD_LUM = 561, JARDIN_LUM = 560, EX_HUM = 91, OUEST_JARDIN_MVT = 481, EXT_RAIN_5M = 229, TERREST_LUM = 315, EST_JARDIN_MVT = 505, HUSQVARNA_MOWER = 140, EXT_TMP = 92, TERROUEST_LUM = 338, EST_TMP1 = 511, EST_TMP2 = 512, EAUPLUIE_VANNE = 771, EXT_ANEMOMETRE = 236,
--Piscine
PISCINE_ECLAIRAGE_STATUT = 752, PISCINE_MODEHIVER = 213, PISCINE_VOLET_STATUT = 751, GEA_ALARME_PISCINE = 254, PISCINE_THERMOSTAT = 602, PISCINE_TMPLAST = 231, PISCINE_CHAUFFAGE = 608, PISCINE_PRISE = 530, PISCINE_POMPE = 607,
--Chaufferie
PAC_BACKUP_A = 671, CHAUF_CIRCUL_ETAGE_FGS223 = 705, PAC_TOTAL_A = 663, CHAUF_CIRCUL_RDC_FGS223 = 706, PAC_A = 667, PAC_BACKUP_A_ = 675, PAC_DELESTAGE = 776, SOLAIRE_TMPH = 525, TISUN_TMP = 528, PAC_AUTH = 263, PAC_BAKCUP_AUTH = 264, CHAUDIERE_SOLAIRE = 269, SOLAIRE_TMPL = 526, CHAUDIERE_OUT = 268, SOLAIRE_PRISE = 534, CHAUF_CIRCUL_RDC = 344, CHAUF_ECS_RADIATEUR = 157, CHAUF_CIRCUL_ETAGE = 343, CHAUF_ECS_THERMOSTAT = 158, GESTION_CHAUFFAGE = 177, SOLAIRE_POMPE = 517,
--Cave à vins
CAVE_TMP = 555, CAVE_AIRCO = 601, CAVE_AIRCO_AUTH = 326, _EAUPLUIE_POMPE_PRISE = 536, CAVE_AIRCO_CAVE_EA_VINS = 327, CAVE_PORTE = 547, CAVE_LUM = 541,
--Free
FGS223_TERRPARENTS_R2FRE = 322, FGS223_TERREST_R2FRE = 316, FGS222_HALLENTRE_R2FRE = 714, FGS223_BIBLIO_R2FRE = 304, FGS224_BARRIERE_R1FREFRE = 279, FGS223_AVANT_R2FRE = 310, FGS223_TERROUEST_R2FRE = 339, FGS221_BIBLIO_R2FRE = 499, FGS223_PAULINE_R2FRE = 495, FGS223_CAVE_R2FRE = 542, FGS223_MAX_R2FRE = 696, FGBS_CAVE_IN2FRE = 548,
--Technical
NETWORK_MONITOR = 185, GOGLECALENDAR = 184, NETATMO_2_5_1 = 85, GOGLEHOME = 186, DOMOCHARTS = 166, GEA = 167, HC3FROMTOLD = 187,
--Test
YR_WEATHER = 3, TESTLUACODE = 173, QA_THERMOTST_COL = 170, TEMPERATURE_GENERATOR = 168, EXPORT_OBJETS_DISPONIBLES = 259, TEST_QAMULTILEVEL = 176, TEST_PRISE = 532,
--H_Pisvine
PISCINE_PRISE_NODON = 604, PISCINE_TMPAUTH = 252, PISCINE_ECLAIRAGE_BOUTON = 349, PISCINE_VOLET_BOUTON = 348, PISCINE_VOLET_OUVERTURE = 467, PISCINE_TMPSEUIL = 230, GESTION_PISCINE = 214, PISCINE_ECLAIRAGE = 518, PISCINE_TMP = 527, PISCINE_VOLET_FERMETURE = 468,
--H_Cuisine
CUISINE_TELEC_ROSE = 749,
--H_Ch Pauline
PAULINE_TELEC_ROSE = 728,
--H_Ch Max
MAX_TELEC_BLEU = 710,
}

 

  • Like 2
  • Thanks 1
Posté(e)

voici la gestion du chauffage de la maison :

	-- ==========================================================
	-- Règles utilisateur
	-- ==========================================================
-- variables perso
    local PAC_A_Off = 30
    local PAC_A_On = 25
    local PACBackup_A_Off = 20
    local PACBackup_A_On = 17

-- IDs générés le : 01/10/22 à 11:04:53

local id = {
--Cuisine
CUISINE_LUM = 566, CUISINETABLE_LUM = 567, CUISINE_PRISE = 569, CUISINE_NUKI = 757, SONOS_CUISINE = 773, ALARME_CUISINE = 407, CUISINE_TMP = 23,
--Salon
...
  }

--=========================
-- CHAUFFAGE
--=========================
-- Circulateurs
GEA.add (id["CHAUF_SDJ_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})
GEA.add (id["CHAUF_BUREAU_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})
GEA.add (id["CHAUF_PAULINE_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})
GEA.add (id["CHAUF_MAX_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})
GEA.add (id["CHAUF_SDBETA_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})
GEA.add (id["CHAUF_BIBLIO_RADIATEUR"], 0, "",
         {"TurnOn", id["CHAUF_CIRCUL_ETAGE"]})

GEA.add ({{"TurnOff", id["CHAUF_SDJ_RADIATEUR"]},
          {"TurnOff", id["CHAUF_BUREAU_RADIATEUR"]},
          {"TurnOff", id["CHAUF_PAULINE_RADIATEUR"]},
          {"TurnOff", id["CHAUF_MAX_RADIATEUR"]},
          {"TurnOff", id["CHAUF_SDBETA_RADIATEUR"]},
          {"TurnOff", id["CHAUF_BIBLIO_RADIATEUR"]}}, 0, "", 
         {"TurnOff", id["CHAUF_CIRCUL_ETAGE"]})

GEA.add (id["CHAUF_SDBRDC_RADIATEUR"], 0, "", 
         {"TurnOn", id["CHAUF_CIRCUL_RDC"]})
GEA.add ({"TurnOff", id["CHAUF_SDBRDC_RADIATEUR"]}, 0, "", 
         {"TurnOff", id["CHAUF_CIRCUL_RDC"]})

GEA.add (id["CHAUF_ECS_RADIATEUR"], 1*60*60, "",
         {"TurnOff", id["CHAUF_ECS_RADIATEUR"]}, "mais est-ce le thermostat ou le radiateur ?")
-- Mode chauffage
-- géré via boutons du QA Gestion Chauffage

-- Consigne des vannes
-- dès que changment d'un état ou d'une consigne d'un thermostat, report sur la vanne
    -- Parents
-- ! pas de thermostat ! => toujours Off via QA Gestion Chauffage
    -- SdBRdC (non testé)
GEA.add({"ThermostatMode!", id["CHAUF_SDBRDC_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_SDBRDC_VANNE"], {"ThermostatMode", id["CHAUF_SDBRDC_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_SDBRDC_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_SDBRDC_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_SDBRDC_THERMOSTAT"]}})
GEA.add ({id["CHAUF_ECS_RADIATEUR"]}, 2*60*60, "",
         {"TurnOff", id["CHAUF_ECS_RADIATEUR"]})
    -- Cellier
-- ! pas de thermostat ! => toujours Off via QA Gestion Chauffage
    -- Garage
-- ! pas de thermostat ! => toujours Off via QA Gestion Chauffage
    -- SdJ
GEA.add({"ThermostatMode!", id["CHAUF_SDJ_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_SDJ_VANNE"], {"ThermostatMode", id["CHAUF_SDJ_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_SDJ_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_SDJ_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_SDJ_THERMOSTAT"]}})
    -- Bureau
GEA.add({"ThermostatMode!", id["CHAUF_BUREAU_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_BUREAU_VANNE"], {"ThermostatMode", id["CHAUF_BUREAU_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_BUREAU_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_BUREAU_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_BUREAU_THERMOSTAT"]}})
    -- Pauline
GEA.add({"ThermostatMode!", id["CHAUF_PAULINE_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_PAULINE_VANNE"], {"ThermostatMode", id["CHAUF_PAULINE_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_PAULINE_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_PAULINE_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_PAULINE_THERMOSTAT"]}})
    -- Max
GEA.add({"ThermostatMode!", id["CHAUF_MAX_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_MAX_VANNE"], {"ThermostatMode", id["CHAUF_MAX_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_MAX_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_MAX_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_MAX_THERMOSTAT"]}})
    -- SdBEtage
GEA.add({"ThermostatMode!", id["CHAUF_SDBETA_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", {id["CHAUF_SDBETA_RADIATEUR_VANNE"],id["CHAUF_SDBETA_SECHSERV_VANNE"]},
         {"ThermostatMode", id["CHAUF_SDBETA_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_SDBETA_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", {id["CHAUF_SDBETA_RADIATEUR_VANNE"],id["CHAUF_SDBETA_SECHSERV_VANNE"]},
         {"HeatingThermostatSetpoint", id["CHAUF_SDBETA_THERMOSTAT"]}})
    -- Bibliothèque
GEA.add({"ThermostatMode!", id["CHAUF_BIBLIO_THERMOSTAT"], ""}, -1, "", 
        {"ThermostatMode", id["CHAUF_BIBLIO_VANNE"], {"ThermostatMode", id["CHAUF_BIBLIO_THERMOSTAT"]}})
GEA.add({"HeatingThermostatSetpoint!", id["CHAUF_BIBLIO_THERMOSTAT"], 0}, -1, "", 
        {"HeatingThermostatSetpoint", id["CHAUF_BIBLIO_VANNE"], {"HeatingThermostatSetpoint", id["CHAUF_BIBLIO_THERMOSTAT"]}})

-- CHAUDIERE_OUT (anciennement chaudOutput)
GEA.add ({id["CHAUF_CIRCUL_RDC"], id["CHAUDIERE_SOLAIRE"]}, 0, "", 
         {"TurnOn", id["CHAUDIERE_OUT"]})
GEA.add ({id["CHAUF_CIRCUL_ETAGE"], id["CHAUDIERE_SOLAIRE"]}, 0, "", 
         {"TurnOn", id["CHAUDIERE_OUT"]})
GEA.add ({id["CHAUF_ECS_RADIATEUR"], id["CHAUDIERE_SOLAIRE"]}, 0, "", 
         {"TurnOn", id["CHAUDIERE_OUT"]})
GEA.add ({id["CHAUF_CIRCUL_RDC"], 
          id["CHAUF_CIRCUL_ETAGE"], 
          id["CHAUF_ECS_RADIATEUR"]}, 0, "", 
         {{"Inverse"}, {"Inverse", 2}, {"Inverse", 3}, 
          {"TurnOff", id["CHAUDIERE_OUT"]}})
GEA.add (id["CHAUDIERE_SOLAIRE"], 0, "", 
         {{"Inverse"}, {"TurnOff", id["CHAUDIERE_OUT"]}})

-- gestion des erreurs
GEA.add ({"Value-", id["TISUN_TMP"], 45}, 0, "",
         {{"TurnOn",{id["CHAUDIERE_SOLAIRE"], id["CHAUDIERE_OUT"]}}, 
          {"Email", "admin", "Démarrrage de la chaudière. La température du ballon Tisen est de #value[1]# °C.", "Température Tisun < 45°C"}})

-- PAC : délestage
   -- Backup Off si P1 ou P2 >= PACBackup_A_Off (20A)
GEA.add ({{"Value+", id["MAISON_P1_A"], PACBackup_A_Off}, (id["PAC_BAKCUP_AUTH"])}, -1, "", 
         {{"TurnOff", id["PAC_BAKCUP_AUTH"]}, 
          {"Email", "admin", "Délestage PAC Backup car P1 = #value#A.", "Délestage PAC Backup ON"}})
GEA.add ({{"Value+", id["MAISON_P2_A"], PACBackup_A_Off}, (id["PAC_BAKCUP_AUTH"])}, -1, "", 
         {{"TurnOff", id["PAC_BAKCUP_AUTH"]}, 
          {"Email", "admin", "Délestage PAC Backup car P2 = #value#A.", "Délestage PAC Backup ON"}})
   -- Backup On si P1 et P2 <= PACBackup_A_On (17A) pendant 5 min
GEA.add ({{"Value-", id["MAISON_P1_A"], PACBackup_A_On},
          {"Value-", id["MAISON_P2_A"], PACBackup_A_On},
          {"TurnOff", id["PAC_BAKCUP_AUTH"]}}, 5*60, "", 
         {{"TurnOn", id["PAC_BAKCUP_AUTH"]}, 
          {"Email", "admin", "Fin délestage PAC Backup car P1 = #value[1]#A et P2 = #value[2]#A.", "Délestage PAC Backup OFF"}})
   -- PAC Off si P1 ou P3 >= PAC_A_Off (30A)
GEA.add ({{"Value+", id["MAISON_P1_A"], PAC_A_Off}, (id["PAC_AUTH"])}, -1, "", 
         {{"TurnOff", id["PAC_AUTH"]}, 
          {"Email", "admin", "Délestage PAC car P1 = #value#A.", "Délestage PAC ON"}})
GEA.add ({{"Value+", id["MAISON_P3_A"], PAC_A_Off}, (id["PAC_AUTH"])}, -1, "", 
         {{"TurnOff", id["PAC_AUTH"]}, 
          {"Email", "admin", "Délestage PAC car P3 = #value#A.", "Délestage PAC ON"}})
   -- PAC On si P1 et P3 <= PAC_A_On (25A) pendant 10 min
GEA.add ({{"Value-", id["MAISON_P1_A"], PAC_A_On},
          {"Value-", id["MAISON_P3_A"], PAC_A_On},
          {"TurnOff", id["PAC_AUTH"]}}, 10*60, "", 
         {{"TurnOn", id["PAC_AUTH"]}, 
          {"Email", "admin", "Fin délestage PAC car P1 = #value[1]#A et P3 = #value[2]#A.", "Délestage PAC OFF"}})

 

  • Like 2
Posté(e)

et voici pour la gestion de la piscine

--=========================
-- PISCINE
--=========================
-- Température
GEA.add (id["PISCINE_POMPE"], 5*60, "", 
         {"TurnOn", id["PISCINE_TMPAUTH"]})
GEA.add ({"TurnOff", id["PISCINE_POMPE"]}, 5*60, "", 
         {"TurnOff", id["PISCINE_TMPAUTH"]})
GEA.add (id["PISCINE_TMPAUTH"], 30, "", {{"Repeat"},
         {"Property", id["PISCINE_TMPLAST"], "value", {"Value", id["PISCINE_TMP"]}}}) 
GEA.add ({"Value+", id["PISCINE_TMPLAST"], {"Value",id["PISCINE_TMPSEUIL"]}}, 0, "",
         {"Property", id["PISCINE_TMPSEUIL"], "value", {"Value", id["PISCINE_TMPLAST"]}})
-- Pompe
    -- calcul des heures de début et de fin
GEA.add ({"Time", "05:00", "05:15"}, 0, "",
         {"QuickApp", id["GESTION_PISCINE"], "HrFinPompe"})
GEA.add ({"Alarm", id["GEA_ALARME_PISCINE"], 1}, 0, "",
         {"TurnOn", id["PISCINE_POMPE"]})
GEA.add ({{"Alarm", id["GEA_ALARME_PISCINE"], 2},
          {"TurnOff", id["PISCINE_MODEHIVER"]}}, 0, "",
         {"TurnOff", id["PISCINE_POMPE"]})
GEA.add ({{"Alarm", id["GEA_ALARME_PISCINE"], 2},
          id["PISCINE_MODEHIVER"], {"TurnOff", id["PISCINE_CHAUFFAGE"]}}, 0, "",
         {"TurnOff", id["PISCINE_POMPE"]})
-- Chauffage
GEA.add ({id["PISCINE_POMPE"], {"TurnOff", id["PISCINE_MODEHIVER"]}}, 0, "",
         {"ThermostatMode", id["PISCINE_THERMOSTAT"], "Heat"})
GEA.add ({id["PISCINE_POMPE"], {"TurnOff", id["PISCINE_MODEHIVER"]},
          {"Value+", id["TISUN_TMP"], 75}}, 0, "",
         {{"ThermostatMode", id["PISCINE_THERMOSTAT"], "Off"},
          {"TurnOn", id["PISCINE_CHAUFFAGE"]}})
GEA.add ({"TurnOff", id["PISCINE_POMPE"]}, 0, "",
         {{"ThermostatMode", id["PISCINE_THERMOSTAT"], "Off"}, {"TurnOff", id["PISCINE_CHAUFFAGE"]}})
-- Statuts (Volet & Eclairage)
GEA.add({"Value!", id["PISCINE_VOLET_OUVERTURE"], ""}, -1, "",
         {"QuickApp", id["GESTION_PISCINE"], "VoletStatut"})
GEA.add({"Value!", id["PISCINE_VOLET_FERMETURE"], ""}, -1, "",
         {"QuickApp", id["GESTION_PISCINE"], "VoletStatut"})
GEA.add({"Value!", id["PISCINE_ECLAIRAGE"], ""}, -1, "",
         {"QuickApp", id["GESTION_PISCINE"], "EclairageStatut"})
-- Mode hiver
GEA.add (id["PISCINE_MODEHIVER"], 0, "",
         {{"ThermostatMode", id["PISCINE_THERMOSTAT"], "Off"},
          {"Email", "admin", "Piscine - Mode Hiver ON.", "Piscine - Mode Hiver ON"}})
GEA.add ({"TurnOff", id["PISCINE_MODEHIVER"]}, 0, "",
         {"Email", "admin", "Piscine - Mode Hiver OFF.", "Piscine - Mode Hiver OFF"})
GEA.add ({id["PISCINE_CHAUFFAGE"], 
          id["PISCINE_MODEHIVER"], 
          id["PISCINE_TMPAUTH"],
          {"Value!", id["PISCINE_TMPLAST"], 100}}, 0, "",
         {"Email", "admin", "Piscine - Mode Hiver - Pompe ON - Température = #value[4]#°C.", 
                            "Piscine - Mode Hiver - Pompe ON"})
GEA.add ({{"TurnOff", id["PISCINE_CHAUFFAGE"]}, 
          id["PISCINE_MODEHIVER"], 
          {"Value!", id["PISCINE_TMPLAST"], 100}}, 0, "",
         {"Email", "admin", "Piscine - Mode Hiver - Pompe OFF - Température = #value[3]#°C.", 
                            "Piscine - Mode Hiver - Pompe OFF"})

 

  • Like 1
×
×
  • Créer...