Announcement

Collapse
No announcement yet.

Thermostat API Calls

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thermostat API Calls

    Hello All,

    As it seems to come up in discussion every so often in this forum, here is the official HomeSeer Thermostat API as of version 3 of the SDK. The tables are copied straight from the SDK, so I apologize if they are a bit sloppy.

    Best Regards,

    RJ Walsh
    HomeSeer Technologies, LLC


    <TABLE class=whs2 cellSpacing=0 width="100%" x-use-null-cells><SCRIPT language=JavaScript><!--if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells cellspacing='0' width='100%' border='1' bordercolor='black' bordercolorlight='black' bordercolordark='black'>");//--></SCRIPT><COLGROUP><COL class=whs3><COL class=whs4><COL class=whs5><COL class=whs6><TBODY><TR class=whs7 vAlign=top><TD class=whs8 width="19.82%" bgColor=#000080>Property / Function Name





    </TD><TD class=whs10 width="30.17%" bgColor=#000080>Parameters</TD><TD class=whs11 width="9.59%" bgColor=#000080>Return Data Type</TD><TD class=whs12 width="40.4%" bgColor=#000080>Description</TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">NThermostats











    </TD><TD class=whs14 width="30.17%">











    </TD><TD class=whs15 width="9.59%">Integer











    </TD><TD class=whs16 width="40.4%">1's based number representing the number of thermostats that the plug-in is managing.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">ThermLoc











    </TD><TD class=whs14 width="30.17%">
    • Thermostat number (NThermostats) as Integer
    • Thermostat number (NThermostats) as Integer

    </TD><TD class=whs15 width="9.59%">String











    </TD><TD class=whs16 width="40.4%">Call ThermName(x) for each thermostat to retrieve the name for the thermostat.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">NTemps











    </TD><TD class=whs14 width="30.17%">
    • Thermostat number (NThermostats) as Integer
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsStat(x,y) for each temperature reading that each thermostat supports to determine if there is a full thermostat there or (Return=False) if it is only a temperature sensor.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">SupportsCoolSet











    </TD><TD class=whs14 width="30.17%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsDirect(x,y) for each SupportsStat=True to determine if the thermostat supports direct temperature setting. The return of False means that the thermostat supports setbacks rather than direct temperature setting.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">SupportsHold











    </TD><TD class=whs14 width="30.17%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsHold(x,y) for each SupportsStat=True, to determine if the thermostat supports a hold mode on the thermostat.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">SupportsHoldOverride











    </TD><TD class=whs14 width="30.17%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsHoldOverride(x,y) for each SupportsStat=True to determine if the thermostat supports overriding the settings of the thermostat when it is in the HOLD mode. The return value indicating True if commands sent while in Hold mode are carried out by the thermostat.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">NumSetbacks











    </TD><TD class=whs14 width="30.17%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsAux(x,y) for each SupportsStat=True to determine if the thermostat supports an auxiliary (emergency) heat mode.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="19.82%">SupportsOperating











    </TD><TD class=whs14 width="30.17%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs15 width="9.59%">Boolean











    </TD><TD class=whs16 width="40.4%">Call SupportsOperating(x,y) for each SupportsStat=True to determine if the thermostat supports a call to return whether the thermostat is currently calling for heat or cool. If the return is True, then you can ask the thermostat if it is currently heating or cooling.











    </TD></TR></TBODY></TABLE>


    <TABLE class=whs2 cellSpacing=0 width="100%" x-use-null-cells><TBODY><TR class=whs7 vAlign=top><TD class=whs8 width="18.58%" bgColor=#000080>Property / Function Name</TD><TD class=whs10 width="42.52%" bgColor=#000080>Parameters


    </TD><TD class=whs11 width="9.42%" bgColor=#000080>Return Data Type


    </TD><TD class=whs12 width="29.46%" bgColor=#000080>Description</TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetTemp













    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Double











    </TD><TD class=whs17 width="29.46%">Current Temperature











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetHeatSet













    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Double











    </TD><TD class=whs17 width="29.46%">Heating Setpoint Temperature











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetCoolSet













    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Double











    </TD><TD class=whs17 width="29.46%">Cooling Setpoint Temperature











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetModeSet











    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Integer











    </TD><TD class=whs17 width="29.46%">Current Thermostat Mode Setting











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetFanMode











    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Integer











    </TD><TD class=whs17 width="29.46%">Current Thermostat Fan Mode Setting











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetHoldMode











    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Integer











    </TD><TD class=whs17 width="29.46%">Current Thermostat Hold Mode Setting











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetCurrentMode











    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Integer











    </TD><TD class=whs17 width="29.46%">Current Thermostat Operating Mode.






    e.g. GetModeSet may return AUTO, and GetCurrentMode can then be used to determine if it is currently COOL, HEAT, or AUX)






    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="18.58%">GetOperating













    </TD><TD class=whs14 width="42.52%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="9.42%">Boolean











    </TD><TD class=whs17 width="29.46%">True if the thermostat is currently calling for Heat or Cool











    </TD></TR></TBODY></TABLE>


    <TABLE class=whs2 cellSpacing=0 width="100%" x-use-null-cells><SCRIPT language=JavaScript><!--if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells cellspacing='0' width='100%' border='1' bordercolor='black' bordercolorlight='black' bordercolordark='black'>");//--></SCRIPT><COLGROUP><COL class=whs3><COL class=whs4><COL class=whs5><COL class=whs6><TBODY><TR class=whs7 vAlign=top><TD class=whs8 width="16.38%" bgColor=#000080>Property / Function Name </TD><TD class=whs10 width="41.49%" bgColor=#000080>Parameters</TD><TD class=whs11 width="8.73%" bgColor=#000080>Return Data Type


    </TD><TD class=whs12 width="33.39%" bgColor=#000080>Description</TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="16.38%">CmdSetHeat















    </TD><TD class=whs14 width="41.49%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer <LI class=kadov-p style="MARGIN-LEFT: -20px">Temperature as Double
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="8.73%">Integer











    </TD><TD class=whs17 width="33.39%">Set the heat setpoint temperature.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="16.38%">CmdSetCool











    </TD><TD class=whs14 width="41.49%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer <LI class=kadov-p style="MARGIN-LEFT: -20px">Temperature as Double
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="8.73%">Integer











    </TD><TD class=whs17 width="33.39%">Set the cool setpoint temperature (If supported)











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="16.38%">CmdSetMode













    </TD><TD class=whs14 width="41.49%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer <LI class=kadov-p style="MARGIN-LEFT: -20px">Mode as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="8.73%">Integer











    </TD><TD class=whs17 width="33.39%">Set the thermostat operating mode.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="16.38%">CmdSetFan











    </TD><TD class=whs14 width="41.49%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer <LI class=kadov-p style="MARGIN-LEFT: -20px">Mode as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="8.73%">Integer











    </TD><TD class=whs17 width="33.39%">Set the thermostat fan operating mode.











    </TD></TR><TR class=whs7 vAlign=top><TD class=whs13 width="16.38%">CmdSetHold











    </TD><TD class=whs14 width="41.49%">
    • <LI class=kadov-p style="MARGIN-LEFT: -20px">Thermostat number (NThermostats) as Integer <LI class=kadov-p style="MARGIN-LEFT: -20px">Mode as Integer
    • Temperature Sensor (NTemps) as Integer

    </TD><TD class=whs16 width="8.73%">Integer











    </TD><TD class=whs17 width="33.39%">Set the thermostat hold mode. (If supported)











    </TD></TR></TBODY></TABLE>

    Information Return Values

    For the thermostat Mode:

    0=Off, 1=Heat, 2=Cool, 3=Auto, 4=Aux (If Supported, a.k.a. Emergency Heat)



    For the thermostat fan mode:

    0=Auto, 1=On



    For the thermostat hold mode:

    0=Off Hold, 1=Hold (if Supported)



    For the Cmd____ functions:

    0=Success, n <> 0 =Failure Error Code
    -RJ (HomeSeer Tech)

Working...
X