This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Air conditioning
#1
Dear readers,

I am looking for the following:
I have an air conditioning control but when the desired temperature is reached the fan continues to run.
now I want to switch off the air conditioning completely on the basis of the desired temperature and the current temperature and also on again with a hysteresis.

Desired temperature 5/2/14
Current temperature 5/1/14
air conditioning on off 6/1/0 1 byte object and must have a 0 for off and a 3 for heating and 9 for cooling

Can someone please help?
Reply
#2
Hello, here is a script, you can make it resident.

Code:
summer = grp.getvalue('6/1/1') -- boolean if '0' is winter, if '1' is summer
winter = not summer
 
current = grp.getvalue('5/1/14')
setpoint = grp.getvalue('5/2/14')
running = grp.getvalue('6/1/0') ~= 0

hysteresis = 0.5

value = nil

if (running and summer) then
  if current < (setpoint - hysteresis) then
    value = 0 -- off
  end
elseif (summer and current > (setpoint + hysteresis) ) then
  value = 9 -- cooling
end

if(running and winter) then
  if current > (setpoint + hysteresis) then
    value = 0 -- off
  end
elseif (winter and current < (setpoint - hysteresis) ) then
  value = 3 -- heating
end

if value then
  grp.write('6/1/0', value)
end
Reply


Forum Jump: