Announcement

Collapse
No announcement yet.

need help with thermostat API

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

    need help with thermostat API

    Hi;

    I'm trying to write a plugin for the Aprilaire thermostats, but I seem to be stuck.
    I'm not a .NET framework programmer but have experience with Java programming. I have spent the last few weeks reading the developer and thermostats forum to try and get help.

    It appears the thermostat API used the hspi class with the IThermostatAPI to implement, allow you to interface between homeseer and your thermostat plugin. This appears to have gone away (IThermostatAPI is now undefined.) This appears to be replaced by the Device Type interface, but what I do not understand is how you link the thermostat API to homeseer HS3. There seems to be no documentation on how this is done.

    There was a Thermostat API calls published June 2006, but this is probably obsolete with the IThermostatAPI gone.

    Can anybody explain how this now works for thermostats? I want to develop this Aprilaire plugin for myself and anybody else who wants it.

    Thanks,
    -Gary

    #2
    The thermostat API as it was in HS2 (which is likely to be in the 2006 stuff you read) has gone, it is now replaced with a device API/type/sub-type. Say you have five devices, they all have their API set as thermostat however they all have types as particular parts of the thermostats (say Operating_State, Setpoint etc). You also have sub-types for particular set points for example (Heating_1, Cooling_1 etc).

    These are documented in the help file, be aware that there is also ControlUse pairs for devices. These are worthwhile programming in now before you go too far as there are ControlUse pairs for thermostat modes and also set points - these seem to be of relevance in integration with things like IFTTT and Alexa.

    Comment


      #3
      This is what I figured. The API/Type/Sub_Type constructs appear to be a way for your plugin to tell homeseer what thermostat functionality it supports. What I do not seem to understand is how homeseer maps onto the plugin api for the thermostat. Can you explain this to me with perhaps a simple code example? Any help you can give me would be most appreciated since I'm new to .NET programming framework. Thanks.

      An example out of the documentation is as follows:

      Dim DT As New DeviceAPI.DeviceTypeInfo
      DT.Device_API = DeviceAPI.DeviceTypeInfo.eDeviceAPI.Thermostat
      DT.Device_Type = DeviceAPI.DeviceTypeInfo.eDeviceType_Thermostat.Mode_Set
      dv.DeviceType_Set(hs) = DT
      hs.SaveEventsDevices

      This appears to be setting up a device that has an API of Thermostat (I understand that a thermostat consists of a parent device with children) and a device type of Mode_Set.
      What I do not understand at this point is what homeseer will call in the plugin when it wants to do a thermostat Mode_Set. Is there any documentation on what is the Thermostat API (function calls, input parameters, return values). Does it still interface with the hspi class, if so how? This is the documentation I'm missing before I can code an Aprilaire thermostat plugin.

      Thanks,
      -Gary
      Last edited by garyb; September 4, 2017, 03:55 PM.

      Comment

      Working...
      X