Aller au contenu

Rechercher dans la communauté

Affichage des résultats pour les étiquettes 'Radiateur'.



Plus d’options de recherche

  • Rechercher par étiquettes

    Saisir les étiquettes en les séparant par une virgule.
  • Rechercher par auteur

Type du contenu


Forums

  • Bienvenue
    • Nouveau ? Présentez-vous
    • Le bistrot
    • Mon installation domotique
    • Annonces et suggestions
  • La Home Center et ses périphériques
    • La Home Center pour les nuls
    • HC 2 & Lite
    • HC 3
    • Modules Fibaro
    • Modules Z-wave
    • Périphériques et matériels autres
    • Plugins
    • Quick App
    • Multimédia (audio, vidéo ...)
    • Chauffage et Energie
    • Actionneurs & Ouvrants (Portail, volets, piscines, ...)
    • Eclairage
    • Applications Smartphones et Tablettes
  • Autres solutions domotiques
    • Box / Logiciel
    • Modules Nice (433 & 866 MHz)
    • Modules Zigbee
    • GCE Electronics
    • Modules Bluetooth Low Energy
  • Objets connectés
    • Les Assistants Vocaux
    • Netatmo
    • Philips Hue
    • DIY (Do It Yoursel)
  • Sécurité
    • Alarmes
    • Caméras
    • Portiers
    • Serrures
  • Informatique / Réseau
    • Tutoriels
    • Matériels Réseaux
    • Matériels Informatique
    • NAS
    • Virtualisation
  • Les bonnes affaires
    • Sites internet
    • Petites annonces

Rechercher les résultats dans…

Rechercher les résultats qui…


Date de création

  • Début

    Fin


Dernière mise à jour

  • Début

    Fin


Filtrer par nombre de…

Inscription

  • Début

    Fin


Groupe


Jabber


Skype


Ville :


Intéret :


Version

3 résultats trouvés

  1. Netatmo Vannes connectées pour radiateurs By Starck Économisez 37 % d'énergie pour chauffer votre maison https://www.netatmo.com/product/energy/valves Annoncé à l'IFA le 1er septembre 2016 69,99 € l’unité pack de démarrage incluant deux vannes et un relais : 179,99 € Pas encore disponible à ce jour.
  2. Pascal Gauthier

    Fgs 223 Et Radiateur Avec Fil Pilote

    Bonjour à tous, je viens d'acquérir un FGS 223, l'idée est de domotiser mes convecteurs électriques. J'ai également acheté 2 diodes pour le fil pilote. Je n'arrive même pas à inclure le module Quelqu'un aurai une idée du câblage de l'ensemble Merci par avance Pascal
  3. Bonjour, Suite à mes précédentes expériences que j'ai déjà partagées sur le forum officiel Fibaro, j'ai revu mes modules virtuels pour la gestion du chauffage. Evidemment ce serait tellement mieux de pouvoir utiliser le panneau de chauffage du HC2 mais ce n'est pas possible avec la gestion de notre fil pilote, et je ne suis pas pour le ON/OFF pur et dur du radiateur qui risquerait d'endommager la partie électronique. La solution présentée ici est également possible sans avoir une sonde de température dans chaque pièce chauffée. Le premier module virtuel est un thermostat programmeur de zone. C'est à dire qu'il permet de piloter l'ensemble des radiateurs qui vont suivre ses consignes. Le programmateur de zone permet: - de définir les modes des radiateurs de la zone en: Confort, Eco, Hors-gel, Arrêt. - de définir 2 programmes différents suivants les horaires de la journée - de définir un mode automatique, qui définit les modes voulus suivant les jours de la semaine. Le second module virtuel permet de piloter les radiateurs grâce au FGBS-221 et sa gestion des 4 ordres du fil pilote (avec les bonnes diodes de redressement): Le module de pilotage de radiateur permet de: - piloter directement le radiateur avec les modes Confort, Eco, Hors-gel, Arrêt indépendamment des consignes données par le programmateur de zone - suivre les consignes données par le programmateur de zone - mettre le radiateur à l'arrêt dès qu'une fenêtre ou porte est ouverte. Une vérification est faite 5 min après l'ouverture, si la fenêtre est toujours ouverte on attend de nouveau 5min. Sinon, on remet le chauffage à son état initial. Voilà une synthèse du fonctionnement: Voici comment mettre tout cela en oeuvre: Module programmateur de zone: Tout d'abord, il faut créer les variables globales prédéfinie avec les valeurs suivantes: z1_heat_engine = Auto, Prog1, Prog2, Confort, Eco, Hors-gel, Arret --> ça, c'est ce que le programmateur demande z1_heat_mode = Confort, Eco, Hors-gel, Arret -->ça, c'est les valeurs que devront suivre chacun des radiateurs qui suivront le programmateur. Vous remarquerez dans les variables globales et dans l'ensemble des codes suivants le "z1". Cela correspond en fait à une zone N°1. Si vous souhaiter faire une deuxième zone, il vous faudra faire du remplacer "z1" par "z2" dans l'ensemble des parties des codes et recréer d'autres variables globales, ça devrait fonctionner. Ensuite, il faut créer un module virtuel avec les boutons suivants, attention à bien reporter votre N° de module virtuel dans les boutons et veiller à la cohérence des ID des boutons et le code lua de chaque bouton: Les labels: Bouton auto: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Auto"); fibaro:debug("Mode Auto"); fibaro:log("Mode Auto"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Auto"); Bouton Prog1: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Prog1"); fibaro:debug("Mode Prog1"); fibaro:log("Mode Prog1"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Prog1"); Bouton Prog2: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Prog2"); fibaro:debug("Mode Prog2"); fibaro:log("Mode Prog2"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Prog2"); Bouton Confort: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Confort"); fibaro:setGlobal("z1_heat_mode", "Confort"); fibaro:debug("Mode Confort"); fibaro:log("Mode Confort"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Confort"); Bouton Eco: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Eco"); fibaro:setGlobal("z1_heat_mode", "Eco"); fibaro:debug("Mode Eco"); fibaro:log("Mode Eco"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Eco"); Bouton Hors-gel: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Hors-gel"); fibaro:setGlobal("z1_heat_mode", "Hors-gel"); fibaro:debug("Mode Hors-gel"); fibaro:log("Mode Hors-gel"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Hors-gel"); Bouton Arret: --[[ %% properties %% globals --]] fibaro:setGlobal("z1_heat_engine", "Arret"); fibaro:setGlobal("z1_heat_mode", "Arret"); fibaro:debug("Mode Arret"); fibaro:log("Mode Arret"); fibaro:call(31, "setProperty", "ui.label_0_0.value", " Arret"); Et enfin copier le main loop suivant, en y indiquant vos paramètres utilisateurs. Pour paramétrer les programmes, il faut choisir les modes que vous souhaitez entre 2 horaires de votre choix. --[[ %% properties %% globals --]] -- LUA - heat Engine V2.0.0 -- -- --variables globales à déclarer: z1_heat_engine = Auto, Prog1, Prog2, Confort, Eco, Hors-gel, Arret. --variables globales à déclarer: z1_heat_mode = Confort, Eco, Hors-gel, Arret. ------------------------------------------------------------------------------------------------------------- -- USER SETTINGS : -- ------------------------------------------------------------------------------------------------------------- --------------------- -- Paramètres généraux: --------------------- local debug = true; --activer le mode debug local ID_virtual_module = "31"; ----------------------------------- -- Definir les différents programmes: ----------------------------------- local z1_time_1 = "06:00"; local z1_heat_mode_1_2_prog1 = "Confort"; local z1_heat_mode_1_2_prog2 = "Eco"; local z1_time_2 = "08:00"; local z1_heat_mode_2_3_prog1 = "Eco"; local z1_heat_mode_2_3_prog2 = "Confort"; local z1_time_3 = "13:00"; local z1_heat_mode_3_4_prog1 = "Eco"; local z1_heat_mode_3_4_prog2 = "Confort"; local z1_time_4 = "18:00"; local z1_heat_mode_4_5_prog1 = "Confort"; local z1_heat_mode_4_5_prog2 = "Confort"; local z1_time_5 = "21:00"; local z1_heat_mode_5_6_prog1 = "Eco"; local z1_heat_mode_5_6_prog2 = "Eco"; local z1_time_6 = "23:59"; local z1_heat_mode_6_1_prog1 = "Eco"; local z1_heat_mode_6_1_prog2 = "Eco"; ----------------------------------------------------------------------------------------- --Définition du programme automatique de la semaine: un mode au choix pour chaque jour (Prog1, Prog2, Confort, Eco, Hors-gel, Arret): ----------------------------------------------------------------------------------------- local z1_Monday_auto = "Prog1"; local z1_Tuesday_auto = "Prog1"; local z1_Wednesday_auto = "Prog1"; local z1_Thursday_auto = "Prog1"; local z1_Friday_auto = "Prog1"; local z1_Saturday_auto = "Prog2"; local z1_Sunday_auto = "Prog2"; ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- -- -- DO NOT EDIT THE CODE BELOW (except to suit your needs) -- -- ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- heatEngine = { version = "1.0.0" }; local z1_heat_engine = fibaro:getGlobal("z1_heat_engine"); local minute = 60000 --in milliseconds local currentDate = os.date("*t"); local currentTime = string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min); local z1_heat_mode = fibaro:getGlobal("z1_heat_mode"); --wday=1 is Sunday --wday=2 is Monday --wday=3 is Tuesday --wday=4 is Wednesday --wday=5 is Thursday --wday=6 is Friday --wday=7 is Saturday if (z1_heat_engine == "Confort") then z1_heat_mode= "Confort"; end if (z1_heat_engine == "Eco") then z1_heat_mode= "Eco"; end if (z1_heat_engine == "Hors-gel") then z1_heat_mode= "Hors-gel"; end if (z1_heat_engine == "Arret") then z1_heat_mode= "Arret"; end if (z1_heat_engine == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_heat_engine == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end if (z1_heat_engine == "Auto") then if (currentDate.wday == 1 ) then if z1_Sunday_auto == "Confort" or z1_Sunday_auto == "Eco" or z1_Sunday_auto == "Hors-gel" or z1_Sunday_auto == "Arret" then z1_heat_mode = z1_Sunday_auto; end if (z1_Sunday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Sunday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 2 ) then if z1_Monday_auto == "Confort" or z1_Monday_auto == "Eco" or z1_Monday_auto == "Hors-gel" or z1_Monday_auto == "Arret" then z1_heat_mode = z1_Monday_auto; end if (z1_Monday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Monday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 3 ) then if z1_Tuesday_auto == "Confort" or z1_Tuesday_auto == "Eco" or z1_Tuesday_auto == "Hors-gel" or z1_Tuesday_auto == "Arret" then z1_heat_mode = z1_Tuesday_auto; end if (z1_Tuesday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Tuesday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 4 ) then if z1_Wednesday_auto == "Confort" or z1_Wednesday_auto == "Eco" or z1_Wednesday_auto == "Hors-gel" or z1_Wednesday_auto == "Arret" then z1_heat_mode = z1_Wednesday_auto; end if (z1_Wednesday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Wednesday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 5 ) then if z1_Thursday_auto == "Confort" or z1_Thursday_auto == "Eco" or z1_Thursday_auto == "Hors-gel" or z1_Thursday_auto == "Arret" then z1_heat_mode = z1_Thursday_auto; end if (z1_Thursday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Thursday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 6 ) then if z1_Friday_auto == "Confort" or z1_Friday_auto == "Eco" or z1_Friday_auto == "Hors-gel" or z1_Friday_auto == "Arret" then z1_heat_mode = z1_Friday_auto; end if (z1_Friday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Friday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end if (currentDate.wday == 7 ) then if z1_Saturday_auto == "Confort" or z1_Saturday_auto == "Eco" or z1_Saturday_auto == "Hors-gel" or z1_Saturday_auto == "Arret" then z1_heat_mode = z1_Saturday_auto; end if (z1_Saturday_auto == "Prog1") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog1; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog1; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog1; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog1; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog1; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog1; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog1; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog1; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog1; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog1; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog1; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog1; end end end if (z1_Saturday_auto == "Prog2") then if z1_time_1 <= z1_time_2 then if z1_time_1 <= currentTime and currentTime <= z1_time_2 then z1_heat_mode= z1_heat_mode_1_2_prog2; end else if not (z1_time_2 < currentTime and currentTime < z1_time_1) then z1_heat_mode= z1_heat_mode_1_2_prog2; end end if z1_time_2 <= z1_time_3 then if z1_time_2 <= currentTime and currentTime <= z1_time_3 then z1_heat_mode= z1_heat_mode_2_3_prog2; end else if not (z1_time_3 < currentTime and currentTime < z1_time_2) then z1_heat_mode= z1_heat_mode_2_3_prog2; end end if z1_time_3 <= z1_time_4 then if z1_time_3 <= currentTime and currentTime <= z1_time_4 then z1_heat_mode= z1_heat_mode_3_4_prog2; end else if not (z1_time_4 < currentTime and currentTime < z1_time_3) then z1_heat_mode= z1_heat_mode_3_4_prog2; end end if z1_time_4 <= z1_time_5 then if z1_time_4 <= currentTime and currentTime <= z1_time_5 then z1_heat_mode= z1_heat_mode_4_5_prog2; end else if not (z1_time_5 < currentTime and currentTime < z1_time_4) then z1_heat_mode= z1_heat_mode_4_5_prog2; end end if z1_time_5 <= z1_time_6 then if z1_time_5 <= currentTime and currentTime <= z1_time_6 then z1_heat_mode= z1_heat_mode_5_6_prog2; end else if not (z1_time_6 < currentTime and currentTime < z1_time_5) then z1_heat_mode= z1_heat_mode_5_6_prog2; end end if z1_time_6 <= z1_time_1 then if z1_time_6 <= currentTime and currentTime <= z1_time_1 then z1_heat_mode= z1_heat_mode_6_1_prog2; end else if not (z1_time_1 < currentTime and currentTime < z1_time_6) then z1_heat_mode= z1_heat_mode_6_1_prog2; end end end end end fibaro:sleep(1000); fibaro:setGlobal("z1_heat_mode", z1_heat_mode); if (debug) then local mode = "init"; if (currentDate.wday == 1 ) then mode = z1_Sunday_auto; end if (currentDate.wday == 2 ) then mode = z1_Monday_auto; end if (currentDate.wday == 3 ) then mode = z1_Tuesday_auto; end if (currentDate.wday == 4 ) then mode = z1_Wednesday_auto; end if (currentDate.wday == 5 ) then mode = z1_Thursday_auto; end if (currentDate.wday == 6 ) then mode = z1_Friday_auto; end if (currentDate.wday == 7 ) then mode = z1_Saturday_auto; end if (z1_heat_engine == "Auto") then fibaro:debug("Le mode du thermostat est réglé sur: " ..z1_heat_engine.." . Le mode auto est réglé sur "..mode); end if (z1_heat_engine ~= "Auto") then fibaro:debug("Le mode du thermostat est réglé sur:" ..z1_heat_engine); end fibaro:debug("Le mode de chauffage est: " ..z1_heat_mode); fibaro:call(ID_virtual_module, "setProperty", "ui.Label3.value", z1_heat_mode) fibaro:sleep(15000) end Mise en oeuvre du module virtuel pour le radiateur: Tout d'abord, il faut créer deux variables globales prédéfinies avec les valeurs suivantes: rad_ch_1_mode = Auto, Manuel rad_ch_1_status = Confort, Eco, Hors-gel, Arret Ensuite, il faut créer un module virtuel avec les boutons suivants, attention à bien reporter votre N° de module virtuel dans les boutons et veiller à la cohérence des ID des boutons et le code lua de chaque bouton: Le label: Bouton Auto: --[[ %% properties %% globals --]] --mise à jour des variables prédéfinies local status_auto = fibaro:getGlobal("z1_heat_mode"); fibaro:setGlobal("rad_ch_1_mode", "Auto"); fibaro:setGlobal("rad_ch_1_status", status_auto); --affichage des logs et debug fibaro:debug("Mode Auto"); fibaro:log("Mode Auto"); --mise à jour de l'affichage du module virtuel fibaro:call(40, "setProperty", "ui.label_0_0.value", "Auto -> " ..status_auto); Bouton Confort: --[[ %% properties %% globals --]] --mise à jour des variables prédéfinies fibaro:setGlobal("rad_ch_1_status", "Confort"); fibaro:setGlobal("rad_ch_1_mode", "Manuel"); --affichage des logs et debug fibaro:debug("Mode Confort"); fibaro:log("Mode Confort"); --mise à jour de l'affichage du module virtuel fibaro:call(40, "setProperty", "ui.label_0_0.value", "Manuel -> Confort"); Bouton Eco: --[[ %% properties %% globals --]] --mise à jour des variables prédéfinies fibaro:setGlobal("rad_ch_1_status", "Eco"); fibaro:setGlobal("rad_ch_1_mode", "Manuel"); --affichage des logs et debug fibaro:debug("Mode Eco"); fibaro:log("Mode Eco"); --mise à jour de l'affichage du module virtuel fibaro:call(40, "setProperty", "ui.label_0_0.value", "Manuel -> Eco"); Bouton Hors-gel: --[[ %% properties %% globals --]] --mise à jour des variables prédéfinies fibaro:setGlobal("rad_ch_1_status", "Hors-gel"); fibaro:setGlobal("rad_ch_1_mode", "Manuel"); --affichage des logs et debug fibaro:debug("Mode Hors-gel"); fibaro:log("Mode Hors-gel"); --mise à jour de l'affichage du module virtuel fibaro:call(40, "setProperty", "ui.label_0_0.value", "Manuel -> Hors-gel"); Bouton Arret: --[[ %% properties %% globals --]] --mise à jour des variables prédéfinies fibaro:setGlobal("rad_ch_1_status", "Arret"); fibaro:setGlobal("rad_ch_1_mode", "Manuel"); --affichage des logs et debug fibaro:debug("Mode Arret"); fibaro:log("Mode Arret"); --mise à jour de l'affichage du module virtuel fibaro:call(40, "setProperty", "ui.label_0_0.value", "Manuel -> Arret"); Et enfin copier le main loop suivant, en y indiquant vos paramètres utilisateurs. --[[ %% properties %% globals --]] -- LUA - heat Radiator V2.0.0 -- -- ------------------------------------------------------------------------------------------------------------- -- USER SETTINGS : -- ------------------------------------------------------------------------------------------------------------- --------------------- -- General settings: --------------------- local debug = true; --activater le debug mode local radiator_mode = "rad_ch_1_mode" -- variable globale à déclarer avec les valeurs Auto et Manuel local radiator_status = "rad_ch_1_status" -- variable globale à déclarer avec les valeurs Confort, Eco, Hors-gel et Arret local ID_virtual_module = "40" --------------------- -- Relay FGBS-221 settings: --------------------- local ID_relay_1 = 200; -- diode - connectée sur O1 local ID_relay_2 = 201; -- diode + connectée sur O2 ----------------------------------------------------------------------------------------- --Window sensor: Stopper le radiateur quand une fenêtre qui y est associée est ouverture ----------------------------------------------------------------------------------------- local active_mode_sensor = true; --ou false --activater ou désactiver le mode. True = stopper le chauffage quand la fenêtre est ouverte local ID_window_sensor = {10}; --ID device du capteur d'ouverture associé au radiateur (il peut y en avoir plusieurs) ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- -- -- DO NOT EDIT THE CODE BELOW (except to suit your needs) -- -- ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- local mode = fibaro:getGlobal(radiator_mode); local status = fibaro:getGlobal(radiator_status); local status_auto = fibaro:getGlobal("z1_heat_mode"); local id; local window_status = 0; local temp; if active_mode_sensor then for i=1, #ID_window_sensor do id = tonumber(ID_window_sensor[i]); temp = fibaro:getValue(id, "value"); fibaro:debug(id.. " et " ..temp); if temp == "1" then window_status = 1; end end end if debug then fibaro:debug(window_status.. "Etat actuel = "..mode.. " --> " ..status); if active_mode_sensor then if window_status == 1 then fibaro:debug("Une fenêtre est ouverte"); end if window_status == 0 then fibaro:debug("Les fenêtres associées au radiateur sont fermées"); end end end if window_status == 1 then if debug then fibaro:debug("Une des fenêtres associées au radiateur est ouverte, le radiateur est à l'arrêt"); end fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", "Fenêtre ouverte, Arrêt"); fibaro:call(ID_relay_1, 'turnOff'); fibaro:call(ID_relay_2, 'turnOn'); -- temporisation de 5 minutes, ensuite le script check de nouveau et remet l'état de chauffage précédent si la fenêtre est fermée fibaro:sleep(300000); if mode == "Auto" then status = status_auto; end if status == "Confort" then fibaro:call(ID_relay_1, 'turnOff'); fibaro:call(ID_relay_2, 'turnOff'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Confort" ); end if status == "Eco" then fibaro:call(ID_relay_1, 'turnOn'); fibaro:call(ID_relay_2, 'turnOn'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Eco" ); end if status == "Hors-gel" then fibaro:call(ID_relay_1, 'turnOn'); fibaro:call(ID_relay_2, 'turnOff'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Hors-gel" ); end if status == "Arret" then fibaro:call(ID_relay_1, 'turnOff'); fibaro:call(ID_relay_2, 'turnOn'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Arret" ); end end if mode == "Auto" then fibaro:setGlobal("rad_ch_1_status", status_auto); if status == "Confort" then fibaro:call(ID_relay_1, 'turnOff'); fibaro:call(ID_relay_2, 'turnOff'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Confort" ); end if status == "Eco" then fibaro:call(ID_relay_1, 'turnOn'); fibaro:call(ID_relay_2, 'turnOn'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Eco" ); end if status == "Hors-gel" then fibaro:call(ID_relay_1, 'turnOn'); fibaro:call(ID_relay_2, 'turnOff'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Hors-gel" ); end if status == "Arret" then fibaro:call(ID_relay_1, 'turnOff'); fibaro:call(ID_relay_2, 'turnOn'); fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> Arret" ); end end --mise a jour de l'affichage du module virtuel fibaro:call(ID_virtual_module, "setProperty", "ui.label_0_0.value", mode.. " -> " ..status); --temporisation pour ne pas solliciter trop souvent le HC2 fibaro:sleep(3000) ATTENTION: il peut être observé un décalage de quelques secondes entre le mode demandé et le mode en cours, c'est normal cela est dà» aux temps d'attente dans les main loop. Idem, attention également à la tempo dans la partie ouverture de fenêtre qui peut dérouter... Vous pouvez trouver un exemple de câblage du fgs-221 ici: http://domotique-info.fr/...lote-et-fibaro/ Une partie des icônes est disponible ici: http://www.touteladomotique.com/forum/viewtopic.php?f=89&t=11666 Merci à benjynet! J'espère ne pas avoir laissé traîner de bug je suis preneur de tout retour!
×