Thermostat Programming

123

Senior Member
Know all about programming a thermostat? If so, I need your help!

I'm writing a driver to communicate with an ELK M1 and I'm stuck on how to properly handle a Thermostat. It doesn't help that I don't have a programmable Thermostat to test my code ...

What puzzles me is when a thermostat is in "Automatic Mode" and automagically switches between heating and cooling. Let's assume our Thermostat has the following properties:

HeatingSetPoint -> If the room temperature drops below this value then the furnace turns on.
CoolingSetPoint -> If the room temperature rises above this value then the air-conditioner turns on.
CurrentSetPoint -> Value is equal to the Set Point currently in effect (i.e. the HeatingSetPoint or CoolingSetPoint).

If you are in Heating Mode then the CurrentSetPoint = HeatingSetPoint.
If you are in Cooling Mode then the CurrentSetPoint = CoolingSetPoint.
If you are in Automatic Mode then you must determine if the current temperature falls within one of three zones:
  1. Heating
  2. Comfort
  3. Cooling
Code:
<----Heating Zone->|<-Comfort Zone->|<-Cooling Zone----->
-------------------H----------------C--------------------

H = HeatingSetPoint
C = CoolingSetPoint

If the current temperature is:
  • In the Heating Zone (i.e. less than the HeatingSetPoint) then CurrentSetPoint = HeatingSetPoint.
  • In the Cooling Zone (i.e. greater than the CoolingSetPoint) then CurrentSetPoint = CoolingSetPoint
Now here's the part that stumps me:
If the current temperature is within the Comfort Zone, what is the value of the CurrentSetPoint?
 
Know all about programming a thermostat? If so, I need your help!

I'm writing a driver to communicate with an ELK M1 and I'm stuck on how to properly handle a Thermostat. It doesn't help that I don't have a programmable Thermostat to test my code ...

What puzzles me is when a thermostat is in "Automatic Mode" and automagically switches between heating and cooling. Let's assume our Thermostat has the following properties:

HeatingSetPoint -> If the room temperature drops below this value then the furnace turns on.
CoolingSetPoint -> If the room temperature rises above this value then the air-conditioner turns on.
CurrentSetPoint -> Value is equal to the Set Point currently in effect (i.e. the HeatingSetPoint or CoolingSetPoint).

If you are in Heating Mode then the CurrentSetPoint = HeatingSetPoint.
If you are in Cooling Mode then the CurrentSetPoint = CoolingSetPoint.
If you are in Automatic Mode then you must determine if the current temperature falls within one of three zones:
  1. Heating
  2. Comfort
  3. Cooling
Code:
<----Heating Zone->|<-Comfort Zone->|<-Cooling Zone----->
-------------------H----------------C--------------------

H = HeatingSetPoint
C = CoolingSetPoint

If the current temperature is:
  • In the Heating Zone (i.e. less than the HeatingSetPoint) then CurrentSetPoint = HeatingSetPoint.
  • In the Cooling Zone (i.e. greater than the CoolingSetPoint) then CurrentSetPoint = CoolingSetPoint
Now here's the part that stumps me:
If the current temperature is within the Comfort Zone, what is the value of the CurrentSetPoint?



A simple way would be to use the setpoint that is closest to the actual temperature. This has problems that if the deadband is low, the current setpoint can toggle between heat and cool setpoint.

A more advanced solution, and more accurate, would be to see what was used last in the HVAC and use the corresponding setpoint. (That was in the winter it will always display the heat, and only switch to cool setpoint when it gets hot).
 
...
see what was used last in the HVAC and use the corresponding setpoint.
...

Someone had posted a similar question in another forum and the response was, when in the Comfort Zone, you simply can't determine the CurrentSetPoint (in Auto Mode). Your suggestion refutes this statement; the CurrentSetPoint should be based on whatever cycle the HVAC just completed.

I like your suggestion but I don't believe I can determine the HVAC's last cycle (i.e. was it heating or cooling).

If I poll the M1 for the current state of Thermostat #1, it will reply with eight properties:
  1. Thermostat Number
  2. Mode (Off/Heat/Cool/Auto/EmergencyHeat)
  3. Hold (True/False)
  4. Fan (On/Auto)
  5. Temperature
  6. HeatSetPoint
  7. CoolSetPoint
  8. Humidity
All of them represent the current state of the HVAC. If it reports it is in Mode=Auto, you can't tell if the last cycle was heating or cooling.

Why so difficult??? :blink:
 
...
see what was used last in the HVAC and use the corresponding setpoint.
...

Someone had posted a similar question in another forum and the response was, when in the Comfort Zone, you simply can't determine the CurrentSetPoint (in Auto Mode). Your suggestion refutes this statement; the CurrentSetPoint should be based on whatever cycle the HVAC just completed.

I like your suggestion but I don't believe I can determine the HVAC's last cycle (i.e. was it heating or cooling).

If I poll the M1 for the current state of Thermostat #1, it will reply with eight properties:
  1. Thermostat Number
  2. Mode (Off/Heat/Cool/Auto/EmergencyHeat)
  3. Hold (True/False)
  4. Fan (On/Auto)
  5. Temperature
  6. HeatSetPoint
  7. CoolSetPoint
  8. Humidity
All of them represent the current state of the HVAC. If it reports it is in Mode=Auto, you can't tell if the last cycle was heating or cooling.

Why so difficult??? :blink:


Perhaps your driver can track the current temperature in relation to the cool/heat set points and you can determine what was done last. With some elegance you should be able to accurately determine the last cycle. I dont see any other way to do it without either communicating directly with the thermostat or sensing the HVAC directly.

I am not too familiar with the m1 protocol and did not know it did not report current thermostat status.
 
Thanks for your suggestion; however, tracking temperatures in order to infer the HVAC's past behaviour sounds like more effort than I'm willing to invest. Plus the approach doesn't work when the driver is initialized ... there's no temperature history so you can't determine the CurrentSetPoint ... and you're back to square one.

Unless someone has another approach to solve this puzzle, I'll set the CurrentSetPoint to equal the current room temperature when in Auto Mode. Kind of meaningless but better than null or zero ... I guess. :blink:
 
Back
Top