Je reviens sur le forum pour avoir vos avis sur un script assez complexe :
Je m'explique : je fonctionne sans soucis depuis plus d'un an avec ce script
viewtopic.php?f=10&t=233
Code : Tout sélectionner
--------------------------------
------ Variables à éditer ------
--------------------------------
local consigneconfort = tonumber(otherdevices_svalues['Temperature Consigne Confort'])
local consigneeco = tonumber(otherdevices_svalues['Temperature Consigne Eco'])
local hysteresis = 0.5
--------------------------------
-- Fin des variables à éditer --
--------------------------------
commandArray = {}
if (devicechanged['Sonde Temp Int']) then
local temperature = tonumber(string.sub(otherdevices_svalues['Sonde Temp Int'],1,4))
if (otherdevices['Chauffage Mode Confort']=='On') then
if (temperature < (consigneconfort - hysteresis) ) then
print('Allumage du chauffage Mode Confort')
--commandArray['Chaudiere']='On'
commandArray['Pompe a Chaleur']='On'
elseif (temperature > consigneconfort) then
print('Extinction du chauffage Mode Confort')
--commandArray['Chaudiere']='Off'
commandArray['Pompe a Chaleur']='Off'
end
elseif (otherdevices['Chauffage Mode Confort']=='Off')then
if (temperature < consigneeco) then
print('Allumage du chauffage Mode Eco')
--commandArray['Chaudiere']='On'
commandArray['Pompe a Chaleur']='On'
elseif (temperature > (consigneeco + hysteresis) ) then
print('Extinction du chauffage Mode Eco')
--commandArray['Chaudiere']='Off'
commandArray['Pompe a Chaleur']='Off'
end
end
end
return commandArray
Le problème étant que je dois switcher manuellement entre la Pompe a Chaleur et ma chaudière gaz.
J'ai dans l'idée d'acheter des vannes motorisées pour automatiser tout ça.
J'ai changer le script en ça :
Code : Tout sélectionner
--------------------------------
------ Variables à éditer ------
--------------------------------
local consigneconfort = tonumber(otherdevices_svalues['Temperature Consigne Confort'])
local consigneeco = tonumber(otherdevices_svalues['Temperature Consigne Eco'])
local consigneswitch = tonumber(otherdevices_svalues['Température Consigne Switch'])
local hysteresis = 0.5
--------------------------------
-- Fin des variables à éditer --
--------------------------------
commandArray = {}
if (devicechanged['Sonde Temp Ext']) then
local temperature_ext = tonumber(string.sub(otherdevices_svalues['Sonde Temp Ext'],1,4))
if (otherdevices['Chauffage Mode Confort']=='On') then
if (temperature_ext > (consigneswitch - hysteresis) ) then
commandArray['Vanne PaC']='On'
commandArray['Vanne Chaudiere']='Off'
if (devicechanged['Sonde Temp Int']) then
local temperature_int = tonumber(string.sub(otherdevices_svalues['Sonde Temp Int'],1,4))
if (temperature_int < (consigneconfort - hysteresis) ) then
print('Allumage du chauffage Mode Confort')
commandArray['Pompe a Chaleur']='On'
elseif (temperature_int > consigneconfort) then
print('Extinction du chauffage Mode Confort')
commandArray['Pompe a Chaleur']='Off'
end
if (temperature_ext < consigneswitch) then
commandArray['Vanne Chaudiere']='On'
commandArray['Vanne PaC']='Off'
if (devicechanged['Sonde Temp Int']) then
local temperature_int = tonumber(string.sub(otherdevices_svalues['Sonde Temp Int'],1,4))
if (temperature_int < (consigneconfort - hysteresis) ) then
print('Allumage du chauffage Mode Confort')
commandArray['Chaudiere']='On'
elseif (temperature_int > consigneconfort) then
print('Extinction du chauffage Mode Confort')
commandArray['Chaudiere']='Off'
end
elseif (otherdevices['Chauffage Mode Confort']=='Off')then
if (temperature_ext > (consigneswitch - hysteresis) ) then
commandArray['Vanne PaC']='On'
commandArray['Vanne Chaudiere']='Off'
if (devicechanged['Sonde Temp Int']) then
if (temperature_int < consigneeco ) then
print('Allumage du chauffage Mode Eco')
commandArray['Pompe a Chaleur']='On'
elseif (temperature_int > (consigneeco + hysteresis)) then
print('Extinction du chauffage Mode Eco')
commandArray['Pompe a Chaleur']='Off'
end
if (temperature_ext < consigneswitch) then
commandArray['Vanne Chaudiere']='On'
commandArray['Vanne PaC']='Off'
if (devicechanged['Sonde Temp Int']) then
if (temperature_int < consigneeco ) then
print('Allumage du chauffage Mode Eco')
commandArray['Chaudiere']='On'
elseif (temperature_int > consigneeco) then
print('Extinction du chauffage Mode Eco')
commandArray['Chaudiere']='Off'
end
end
end
end
end
end
end
end
end
end
end
return commandArray
Merci d'avance