marpas01 Posté(e) le 8 juillet 2017 Signaler Partager Posté(e) le 8 juillet 2017 (modifié) bonjour j ai domotisé la filtration de ma piscine et fait ce scenario pour filtrer pendant 3 plages dans la journée mais ça ne fonctionne pas pouvez-vous m'aider merci d'avance --[[ %% autostart %% properties %% weather %% events %% globals --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() 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 string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "0") ) ) then fibaro:call(260, "turnOn"); setTimeout(function() fibaro:call(260, "turnOff"); end, 14400000) end setTimeout(tempFunc, 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 string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "08:00") ) ) then fibaro:call(260, "turnOn"); setTimeout(function() fibaro:call(260, "turnOff"); end, 14400000) end setTimeout(tempFunc, 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 string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "14:00") ) ) then fibaro:call(260, "turnOn"); setTimeout(function() fibaro:call(260, "turnOff"); end, 21600000) end setTimeout(tempFunc, 60*1000) "end" local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); Modifié le 8 juillet 2017 par marpas01 Lien vers le commentaire Partager sur d’autres sites More sharing options...
speedoxx007 Posté(e) le 11 juillet 2017 Signaler Partager Posté(e) le 11 juillet 2017 (modifié) Hello Il existe une bonne solution avec un VD: Je l'utilise depuis env. 1 année et ça fonctionne très bien. Modifié le 11 juillet 2017 par speedoxx007 Lien vers le commentaire Partager sur d’autres sites More sharing options...
Messages recommandés