Diuck Posté(e) le 29 avril 2014 Auteur Signaler Partager Posté(e) le 29 avril 2014 Merci Je vois pour benjy avec les couleurs c'est mieux Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 29 avril 2014 Auteur Signaler Partager Posté(e) le 29 avril 2014 Tu trouve ca ou ? Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 29 avril 2014 Auteur Signaler Partager Posté(e) le 29 avril 2014 C'est bon ! Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 30 avril 2014 Auteur Signaler Partager Posté(e) le 30 avril 2014 Après plusieurs conseil de Jossalf J'ai modifié mes scènes bloc en Lua effectué quelques modif et Tout est parfait Encore un grand merci à JOSSALF Reste à affiner Ci-joint copie pour éventuellement avoir un Avis sur le Résultat. Déclenchement scène en CAS d'ensoleillement. --[[ %% autostart %% properties %% globals JOUR_NUIT METEO --]] local sourceTrigger = fibaro:getSourceTrigger(); if (sourceTrigger["type"] == "autostart") then while true do local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and os.date("%H:%M", os.time()+480*60) == fibaro:getValue(1, "sunsetHour")) ) and ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "DECOUVERT" ) ) then fibaro:call(25, "setValue", "40"); fibaro:call(20, "setValue", "50"); fibaro:call(22, "sendDefinedPushNotification", "5"); end fibaro:sleep(60*1000); end else local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) ) and ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "DECOUVERT" ) or startSource["type"] == "other" ) then fibaro:call(25, "setValue", "40"); fibaro:call(20, "setValue", "50"); fibaro:call(22, "sendDefinedPushNotification", "5"); end end Déclenchement scène en fin d'Après midi Ouverture Totale 1 heure 30 avant le couché du soleil --[[ %% autostart %% properties %% globals JOUR_NUIT --]] local sourceTrigger = fibaro:getSourceTrigger(); if (sourceTrigger["type"] == "autostart") then while true do local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and os.date("%H:%M", os.time()+90*60) == fibaro:getValue(1, "sunsetHour")) ) and ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) ) then fibaro:call(25, "open"); fibaro:call(25, "setValue2", "99"); fibaro:call(20, "open"); fibaro:call(20, "setValue2", "99"); fibaro:call(22, "sendDefinedPushNotification", "6"); end fibaro:sleep(60*1000); end else local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) ) and ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) or startSource["type"] == "other" ) then fibaro:call(25, "open"); fibaro:call(25, "setValue2", "99"); fibaro:call(20, "open"); fibaro:call(20, "setValue2", "99"); fibaro:call(22, "sendDefinedPushNotification", "6"); end end Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 --[[ %% autostart %% properties %% globals JOUR_NUIT METEO --]] local sourceTrigger = fibaro:getSourceTrigger(); if (sourceTrigger["type"] == "autostart") then while true do local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and os.date("%H:%M", os.time()+45*60) == fibaro:getValue(1, "sunriseHour")) ) and ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "DECOUVERT" ) ) then fibaro:call(24, "setValue", "75"); fibaro:call(19, "setValue", "75"); fibaro:call(22, "sendDefinedPushNotification", "4"); end fibaro:sleep(60*1000); end end Modification des scènes précédente Shad peux tu me donner ton avis STP Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 1 mai 2014 Signaler Partager Posté(e) le 1 mai 2014 Moi je veux bien te donner mon avis mais tu vas pas l'aimer. Ta scène est pas mal. Mais avec le scheduler tu pourrais énormément la simplifier et part la même occasion lui donner plus de possibilités. Je te poste comment je ferais d'ici 10 minutes. Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Merci d'avance Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 1 mai 2014 Signaler Partager Posté(e) le 1 mai 2014 Déjà dans le scheduler tu met le code suivant et remplace sceneID par le numéro: luaDaySchedule:add("Sunset","sceneID", "" , "startScene", {"All"}, false , -45); Donc déjà ta scène ce lancera seul et tu peux enlever cette condition. Après pour gérer la météo tu peux faire --[[ %% properties 3 WeatherConditionConverted %% globals --]] if (( fibaro:getValue(3, "WeatherConditionConverted") == "clear" ) then fibaro:setGlobal("METEO", "DECOUVERT"); elseif ( fibaro:getValue(3, "WeatherConditionConverted") == "cloudy" ) then fibaro:setGlobal("METEO", "COUVERT"); elseif ( fibaro:getValue(3, "WeatherConditionConverted") == "fog" ) then fibaro:setGlobal("METEO", "BROUILLARD"); elseif ( ( fibaro:getValue(3, "WeatherConditionConverted") == "rain" ) then fibaro:setGlobal("METEO", "PLUIE"); elseif ( fibaro:getValue(3, "WeatherConditionConverted") == "snow" ) then fibaro:setGlobal("METEO", "NEIGE"); elseif ( fibaro:getValue(3, "WeatherConditionConverted") == "storm" ) then fibaro:setGlobal("METEO", "ORAGE"); end fibaro:sleep(60*1000); Pour Ta variable JOUR_NUIT: luaDaySchedule:add("Sunrise","JOUR_NUIT", "JOUR" , "setGlobal", {"All"}, false , 0); luaDaySchedule:add("Sunset","JOUR_NUIT", "NUIT" , "setGlobal", {"All"}, false , 0); Et pour finir voilà le code que tu peux faire: --[[ %% properties %% globals --]] if ( ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "DECOUVERT" )) then fibaro:call(24, "setValue", "75"); fibaro:call(19, "setValue", "75"); fibaro:call(22, "sendDefinedPushNotification", "4"); elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "PLUIE" )) then elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "COUVERT" )) then elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "JOUR" ) and ( fibaro:getGlobalValue("METEO") == "ORAGE" )) then elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "NUIT" ) and ( fibaro:getGlobalValue("METEO") == "PLUIE" )) then elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "NUIT" ) and ( fibaro:getGlobalValue("METEO") == "COUVERT" )) then elseif ( ( fibaro:getGlobalValue("JOUR_NUIT") == "NUIT" ) and ( fibaro:getGlobalValue("METEO") == "ORAGE" )) then end fibaro:sleep(60*1000); Voilà tu as tout et tu peux lancer ta scène pour d'autre occasion 2 Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Merci pour le temps que tu m'as consacré Très bien je commence à comprendre le sheduler peux en effet simplifier la programmation des scènes, mais je ne veux pas te paraître idiot mais je n'arrive pas à configurer le sheduler j'avance doucement mais j'avance Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 1 mai 2014 Signaler Partager Posté(e) le 1 mai 2014 Entre mon tuto et les remarques de fredic tu devrais y arriver sans problème. Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Ca y est sheduler est configuré peux tu me guider pour essayé si il est bien paramètré stp Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 1 mai 2014 Signaler Partager Posté(e) le 1 mai 2014 Il n'y a rien pour te guider lol. S'il n'y a pas d'erreur c'est que tout est bon. Met juste mes lignes de code et tu verras le résultat. Envoyé de mon SM-P600 en utilisant Tapatalk Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 ca te parle Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 1 mai 2014 Signaler Partager Posté(e) le 1 mai 2014 Oui sa a l'air dêtre bon. Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Erreur !! Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Erreur Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 En plus lisible la ligne 3 c'est la ligne 637 --<ADD YOUR LINES HERE IN POFILE SECTIONS> luaDaySchedule:add("19:14","16", "turnOn" , "call", {"all"} ,false) --add to the standard schedule table if schedule[luaDaySchedule.days[d]][sTime] == nill then Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Majuscule ALL en All et c'est ok plus d'erreur --<ADD YOUR LINES HERE IN POFILE SECTIONS> luaDaySchedule:add("20:00","16", "turnOn" , "call", {"All"} ,false) Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 1 mai 2014 Auteur Signaler Partager Posté(e) le 1 mai 2014 Ca fonctionne nickel merci pour tous Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 2 mai 2014 Auteur Signaler Partager Posté(e) le 2 mai 2014 2.luaDaySchedule:add("Sunset","JOUR_NUIT", "JOUR" , "setGlobal", {"All"}, false , 0); 3.luaDaySchedule:add("Sunrise","JOUR_NUIT", "NUIT" , "setGlobal", {"All"}, false , 0); Salut Jossalf une petite question Si je rentre ces 2 variables dans le sheduler je peux supprimer les variables jour/nuit que j'ai créer en bloc sans modifier mes scènes actuel, les scènes en LUA bien sur Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 2 mai 2014 Auteur Signaler Partager Posté(e) le 2 mai 2014 --<ADD YOUR LINES HERE IN POFILE SECTIONS> luaDaySchedule:add("20:36","16", "turnOn" , "call", {"All"} ,false) Et si c'est le cas je les ajoute dans le sheduler à la suite de cette ligne ? Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 2 mai 2014 Signaler Partager Posté(e) le 2 mai 2014 Oui. Mais rien ne t'empeche de désactivé tes variables bloc pour être sur que sa marche Lien vers le commentaire Partager sur d’autres sites More sharing options...
JossAlf Posté(e) le 2 mai 2014 Signaler Partager Posté(e) le 2 mai 2014 Pour le coup je laisse le maître Shad te répondre sur le schudeler. J'ai peu de déclenchement temporisé jusqu'àprésent, mais si ça vient je m'y collerai àce schudeler Lien vers le commentaire Partager sur d’autres sites More sharing options...
Diuck Posté(e) le 2 mai 2014 Auteur Signaler Partager Posté(e) le 2 mai 2014 Merci à vous deux pour votre réponse Donc Maître Shad peux tu répondre au message 122 Stp Lien vers le commentaire Partager sur d’autres sites More sharing options...
Shad Posté(e) le 2 mai 2014 Signaler Partager Posté(e) le 2 mai 2014 Je crois avoir déjàrépondu Lien vers le commentaire Partager sur d’autres sites More sharing options...
Messages recommandés