No announcement yet.

Thermostat Temp an Integer?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Thermostat Temp an Integer?

    All the thermostat temp functions (HAI_Set_Temp, Raise_Temp, Lower_Temp etc) pass the temp value as an integer. Shouldn't it be of type Double as you can set .5 values. Well, I can set .5's on my RC-80 and OmniProII anyway..

    The plugin will read a .5 setpoint temp and display it on the HVAC web page (22.5 for example), but you can't set a .5 value from the web or by using the Thermostat functions as you can only pass whole values as it's a integer.

    Working as designed? Or is there a workaround?

    EDIT: Just worked it out, I set my RC-80 to Fahrenheit (My part of the world is Celsius) and you can't go 0.5 steps. Which makes sense as Fahrenheit is very small steps anyway. Rick, any chance of making this a double for us Celsius people? Unless you can overload VB and have two functions with the same name, with different parameter types and it picks the correct one. Eg One with an Int for the temp (so as not to break everyone else) and have 1 with a Double for the temp. You can do this in C, just got that good at VB yet so I have no idea if it's possible!



  • #2

    HAI makes it even more limiting than you can imagine!

    Here is how it works - there are temperature values, in F and C, for all of the numbers from 0 to 255. This is the temperature decode table that the panel uses. I do not even get to specify a temperature - only one of the numbers from 0 to 255. There are functions that convert temperatures into the numerical value. You'll note that there is not a 0.5 different, but actually something more along the lines of 0.7 or 0.9. Thus, you can specify a double value, but it is going to get converted to the number nearest to it in the decode table anyway.

    For example, when I enter the temperature on the left, the temperature on the right is what I get:
    68 --> 68
    69 --> 68.9
    70 --> 69.8
    71 --> 70.7

    There is no such thing as 69, 69.1, 69.2, etc. in the HAI/OnQ systems.

    I hope that answers your question - sorry I can't make it more precise.

    Rick Tinker (a.k.a. "Tink")


    • #3
      But if you learn to think in Celsius . . .

      68 --> 20
      69 --> 20.5
      70 --> 21
      71 --> 21.5

      So the thermostat thinks in .5 degree Celsius increments. Still pretty limiting . . .


      • #4
        True Rocco.

        The functions to set a temp are setting the real temp not the value the omni uses.
        So In Rocco's example when in Celsius the HAI plugin would only process even numbers back to the panel. I can't pass "71" as a value so to set 21.5 because the plugin would take that as the temp 71 not the Omni value 71.

        As Rocco said, the thermostat's and temperature sensors think in 0.5 degree increments.

        The plugin sort of supports 0.5 increments as just looking at the web interface to HS now shows my inside temp to be 21.5 my current heat setpoint is 17.5 (as I last changed it from the thermostat itself) and oustide is 19.5. So it reads and understands 0.5's without a problem.

        So the smarts are already there to support it, sounds like the only thing we are missing are the function to support Celsius (eg Doubles). It would be like telling everyone using Fahrenheit they could only set even number temps.



        • #5
          Side note:

          Using HAI_WhatIsTemp returns the correct Celsius temp as a double, well with the .5 anyway.

          6/04/2004 5:52:22 PM~!~HAI TEST~!~Main Stat is 22.5

          So we can read doubles ok, just can't set a heatpoint/coolpoint with one.