Je rencontre un soucis pour gérer mes radiateurs en fil pilote, plus précisément en ce qui concerne le planning.
Jusqu'à présent je passe par le planning au niveau de l’interrupteur pour gérer les différents « levels » mais j’en ai pas mal pour chaque radiateur et quand je pars en vacances je suis obligé de les passer un par un en « inactif ».
Exemple pour 1 raidateur
Activé Type Date Heure Aléatoire Commande Jours
Oui À l'heure 06:00 Non On (55%) Mer, Sam, Dim
Oui À l'heure 06:35 Non On (25%) Lun, Mar, Jeu, Ven
Oui À l'heure 08:30 Non On (35%) Mer, Sam, Dim
Oui À l'heure 12:30 Non On (45%) Mer, Sam, Dim
Oui À l'heure 15:30 Non On (35%) Mer, Sam, Dim
Oui À l'heure 18:30 Non On (45%) Lun, Mar, Mer, Jeu, Ven, Sam, Dim
Oui À l'heure 20:30 Non On (55%) Lun, Mar, Mer, Jeu, Ven, Sam, Dim
Oui À l'heure 22:30 Non On (45%) Lun, Mar, Mer, Jeu, Ven, Sam, Dim
Oui À l'heure 05:00 Non On (55%) Lun, Mar, Jeu, Ven
J’ai vu qu’il pouvait exister quelque chose il me semble pour passer automatiquement en inactif mais je n’ai pas trouvé vraiment comme cela fonctionnait.
Un ami a un script LUA qui marche mais qui ne met que en On ou Off ses radiateurs. Du coup j’ai essayé de l’adapter sur le mien mais je rencontre une erreur et je ne comprends pas pourquoi.
Cela me met à la ligne 18 donc la 1ère ligne ou il y a le set level "unfinished string near ''Set Level 25''
Voici mon script
Code : Tout sélectionner
function IsWeekend()
local dayNow = tonumber(os.date("%w"))
local weekend
if (dayNow == 0) or (dayNow == 6) then weekend = "true"
else weekend = "false"
end
return weekend
end
commandArray = {}
-- get current time
minutesnow = timenow.min + timenow.hour * 60
-- PROG RADIATEURS VACANCES
if(IsWeekend() == "false" and uservariables["HOLIDAYS"] == "true") then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
-- PROG RADIATEURS WEEK END
if(IsWeekend() == "false" and uservariables["HOLIDAYS"] == "false" and timenow.hour == 06 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 10 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 35’
commandArray['rad salon rue']='Set Level 35’
commandArray[‘Rad Chloé’]=‘Set Level 35’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 35’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 12 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 35’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 14 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 35’
commandArray['rad salon rue']='Set Level 35’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 35’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 17 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 35’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 19 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 22 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 02 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 04 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
-- PROG RADIATEURS SEMAINE
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 05 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 06 and timenow.min == 30) then
commandArray[‘Rad CH1’]=‘Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 07 and timenow.min == 15) then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 17 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55’
commandArray['rad salon rue']='Set Level 55’
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 21 and timenow.min == 30) then
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 22 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25’
commandArray['rad salon rue']='Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 23 and timenow.min == 00) then
commandArray[‘Rad CH1’]=‘Set Level 25’
End
if(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 02 and timenow.min == 30) then
commandArray[‘Rad Chloé’]=‘Set Level 55’
commandArray[‘Rad CH1’]=‘Set Level 55’
commandArray[‘Rad Tristan']='Set Level 55’
End
iif(IsWeekend() == "false" and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 04 and timenow.min == 00) then
commandArray[‘Rad Chloé’]=‘Set Level 25’
commandArray[‘Rad CH1’]=‘Set Level 25’
commandArray[‘Rad Tristan']='Set Level 25’
End
return commandArray
Auriez vous une idée? (soit pour tout passer en inactif très rapidement, soit pour faire marcher le script...)
Merci d'avance