Alexa.ThermostatController.HVAC.Componentsインターフェース1.0
Alexaが接続されたサーモスタットデバイスや暖房、換気、空調(HVAC)システムで、おおよそのエネルギー使用量を推測できるようにするには、AlexaスキルにAlexa.ThermostatController.HVAC.Componentsインターフェースを実装します。HVAC.Componentsインターフェースを使用すると、ユーザーはAlexaエネルギーダッシュボードでエネルギー使用量を管理しやすくなります。詳細については、Smart Home Energy Overviewを参照してください。
通常、HVAC.Componentsインターフェースは、Alexa.ThermostatControllerインターフェースおよびAlexa.TemperatureSensorインターフェースと併せて使用します。
HVACシステムは、暖房システム、冷却システム、換気ファンとして作成できます。これらの各コンポーネントは、低、中、高などの複数の段階をサポートできます。接続されたHVACシステムのおおよその電力使用量を推測するには、AlexaにHVACシステムが各段階に設定されていた時間を通知する必要があります。
HVAC.Componentsインターフェースがサポートするロケールについては、Alexaインターフェースとサポートしている言語の一覧を参照してください。メッセージプロパティの定義については、Alexaインターフェースのメッセージとプロパティを参照してください。
発話
Alexa.ThermostatController.HVAC.Componentsインターフェースには発話は定義されません。代わりに、スキルがAlexaにエネルギー使用量をレポートします。
コンポーネントの運転段階
以下は、HVACコンポーネントが設定される可能性のある運転段階の一覧です。コンポーネントがサポートする段階数を検出応答で指定します。
| コンポーネントが3段階をサポートする場合 | コンポーネントが2段階をサポートする場合 | コンポーネントが1段階をサポートする場合 | 
|---|---|---|
| - OFF— オフ- STAGE_1— 低- STAGE_2— 中- STAGE_3— 高 | - OFF— オフ- STAGE_1— 低- STAGE_2— 高 | - OFF— オフ- STAGE_1— オン | 
プロパティ
以下の表は、Alexa.ThermostatController.HVAC.Componentsインターフェースが定義するプロパティを示しています。検出応答で、サポートするプロパティを指定します。すべてのプロパティはオプションです。サーモスタットデバイスまたはHVACシステムのコンポーネントに対応するプロパティのみを含めてください。
| プロパティ | 説明 | 型 | 
|---|---|---|
| primaryHeaterOperation | プライマリ暖房コンポーネントの現在の運転段階です。通常、メインの暖房メカニズムはヒートポンプです。 | 文字列 | 
| auxiliaryHeaterOperation | 補助暖房がオンかオフかを示します。有効な値は ONとOFFです。通常、補助暖房のメカニズムは電気抵抗加熱です。 | 文字列 | 
| coolerOperation | 冷却コンポーネントの現在の運転段階です。 | 文字列 | 
| fanOperation | 換気コンポーネントの現在の運転段階です。 | 文字列 | 
検出
Alexa.ThermostatController.HVAC.Componentsをサポートするエンドポイントは、Alexa.Discoveryの標準検出メカニズムを使用して表します。
Alexaからスキルに状態レポートリクエストが送信されたら、レポートするプロパティのretrievableをtrueに設定します。変更レポートでAlexaにプロアクティブにレポートする場合はプロパティのproactivelyReportedをtrueに設定します。
表示カテゴリーにはTHERMOSTATを使用します。表示カテゴリーの一覧は、表示カテゴリーを参照してください。
HVAC.Componentsには、標準の検出応答フィールドのほかに、次のフィールドを含むconfigurationオブジェクトを含めます。フィールドはすべて任意です。サーモスタットデバイスまたはHVACシステムのコンポーネントに対応するフィールドのみを含めてください。
| フィールド | 説明 | 型 | 
|---|---|---|
| numberOfPrimaryHeaterOperations | プライマリ暖房コンポーネントがサポートする運転段階の数です。 primaryHeaterOperationプロパティをサポートする場合は、必ずこのフィールドを含めてください。有効な値は、1、2、3のいずれかです。 | 整数 | 
| numberOfCoolerOperations | 冷却コンポーネントがサポートする運転段階の数です。 coolerOperationプロパティをサポートする場合は、必ずこのフィールドを含めてください。有効な値は、1、2、3のいずれかです。 | 整数 | 
| numberOfFanOperations | 換気ファンコンポーネントがサポートする運転段階の数です。 fanOperationプロパティをサポートする場合は、必ずこのフィールドを含めてください。有効な値は、1、2、3のいずれかです。換気ファンが3段階よりも多くの速度をサポートする場合は、速度を3つの範囲に分け、それぞれの速度範囲を運転段階にマッピングします。 | 整数 | 
検出応答の例
以下は、サーモスタットを制御し、Alexa.ThermostatController.HVAC.Componentsインターフェース、Alexa.ThermostatControllerインターフェース、Alexa.TemperatureSensorインターフェースをサポートするAlexaスキルのDiscover.Responseメッセージの例です。この例では、エンドポイントは設定値が2つのサーモスタットで、モードは2つ、スケジューリングはサポートしていません。
この例のHVACシステムは、primaryHeaterOperation、auxiliaryHeaterOperation、fanOperationをサポートしていますが、coolerOperationはサポートしていません。
エアコンのDiscover.Response例については、エアコン用の検出応答の例を参照してください。
{
  "event": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "Discover.Response",
      "payloadVersion": "3",
      "messageId": "一意の識別子、バージョン4 UUIDが望ましい"
    },
    "payload": {
      "endpoints": [
        {
          "endpointId": "エンドポイントの一意のID",
          "manufacturerName": "エンドポイントのメーカー名",
          "description": "サーモスタットメーカー製のスマートサーモスタット",
          "friendlyName": "廊下のサーモスタット",
          "displayCategories": ["THERMOSTAT", "TEMPERATURE_SENSOR"],
          "cookie": {},
          "capabilities": [
            {
              "type": "AlexaInterface",
              "interface": "Alexa.ThermostatController.HVAC.Components",
              "version": "1.0",
              "properties": {
                "supported": [
                  {
                    "name": "primaryHeaterOperation"
                  },
                  {
                    "name": "auxiliaryHeaterOperation"
                  },
                  {
                    "name": "fanOperation"
                  },
                ],
                "retrievable": true,
                "proactivelyReported": true
              },
              "configuration": {
                "numberOfPrimaryHeaterOperations": 3,
                "numberOfFanOperations": 2
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.ThermostatController",
              "version": "3.1",
              "properties": {
                "supported": [
                  {
                    "name": "lowerSetpoint"
                  },
                  {
                    "name": "upperSetpoint"
                  },
                  {
                    "name": "thermostatMode"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              },
              "configuration": {
                "supportedModes": [ "HEAT", "AUTO" ],
                "supportsScheduling": false
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.TemperatureSensor",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "temperature"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.EndpointHealth",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "connectivity"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa",
              "version": "3"
            }
          ]
        }
      ]
    }
  }
}
状態レポート
Alexaはエンドポイントの状態についての情報をリクエストするために、ReportStateディレクティブを送信します。AlexaがReportStateディレクティブを送信したら、それに対する応答としてStateReportイベントを送信します。応答には、contextオブジェクトのすべてのretrievableプロパティの現在の状態を含めます。retrievableプロパティは検出応答で特定します。状態レポートの詳細については、状態および変更レポートについてを参照してください。
StateReport応答の例
この例のHVACシステムは、primaryHeaterOperation、auxiliaryHeaterOperation、fanOperationをサポートしていますが、coolerOperationはサポートしていません。
{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "messageId": "一意の識別子、バージョン4 UUIDが望ましい",
      "correlationToken": "リクエストに一致するopaque相関トークン",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "OAuth2.0ベアラートークン"
      },
      "endpointId": "エンドポイントID"
    },
    "payload": {}
  },
  "context": {
    "properties": [
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "primaryHeaterOperation",
        "value": "STAGE_2",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "auxiliaryHeaterOperation",
        "value": "OFF",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "fanOperation",
        "value": "STAGE_1",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "thermostatMode",
        "value": "HEAT",
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "targetSetpoint",
        "value": {
          "value": 20.0,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.TemperatureSensor",
        "name": "temperature",
        "value": {
          "value": 19.9,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 1000
      }
    ]
  }
}
変更レポート
エンドポイントの状態の変化をプロアクティブにレポートするために、ChangeReportイベントを送信します。プロアクティブにレポートするプロパティは検出応答で特定します。変更レポートの詳細については、状態および変更レポートについてを参照してください。
payloadには変更されたプロパティの値が含まれ、contextにはその他の関連プロパティの値が含まれます。
通常モードのChangeReportイベントの例
以下は、プライマリ暖房の段階が上がった後のChangeReportの例です。この例のHVACシステムは、primaryHeaterOperation、auxiliaryHeaterOperation、fanOperationをサポートしていますが、coolerOperationはサポートしていません。
{  
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "ChangeReport",
      "messageId": "一意の識別子、バージョン4 UUIDが望ましい",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "OAuth2.0ベアラートークン"
      },
      "endpointId": "エンドポイントID"
    },
    "payload": {
      "change": {
        "cause": {
          "type": "PERIODIC_POLL"
        },
        "properties": [
          {
            "namespace": "Alexa.ThermostatController.HVAC.Components",
            "name": "PrimaryHeaterOperation",
            "value": "STAGE_2",
            "timeOfSample": "2017-02-03T16:20:50Z",
            "uncertaintyInMilliseconds": 0
          }
        ]
      }
    }
  },
  "context": {
    "properties": [
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "auxiliaryHeaterOperation",
        "value": "OFF",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "fanOperation",
        "value": "STAGE_1",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "thermostatMode",
        "value": "AUTO",
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "targetSetpoint",
        "value": {
          "value": 18.0,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.TemperatureSensor",
        "name": "temperature",
        "value": {
          "value": 19.1,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 1000
      },
      {
        "namespace": "Alexa.EndpointHealth",
        "name": "connectivity",
        "value": {
          "value": "OK"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 0
      }
    ]
  }
}
非常モードのChangeReportイベントの例
以下は、補助暖房がオンになり、換気ファンの段階が上がった後のChangeReportの例です。この例のHVACシステムは、primaryHeaterOperation、auxiliaryHeaterOperation、fanOperationをサポートしていますが、coolerOperationはサポートしていません。
{  
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "ChangeReport",
      "messageId": "一意の識別子、バージョン4 UUIDが望ましい",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "OAuth2.0ベアラートークン"
      },
      "endpointId": "エンドポイントID"
    },
    "payload": {
      "change": {
        "cause": {
          "type": "PERIODIC_POLL"
        },
        "properties": [
          {
            "namespace": "Alexa.ThermostatController.HVAC.Components",
            "name": "auxiliaryHeaterOperation",
            "value": "ON",
            "timeOfSample": "2017-02-03T16:20:50Z",
            "uncertaintyInMilliseconds": 0
          },
          {
            "namespace": "Alexa.ThermostatController.HVAC.Components",
            "name": "fanOperation",
            "value": "STAGE_2",
            "timeOfSample": "2017-02-03T16:20:50Z",
            "uncertaintyInMilliseconds": 0
          }
        ]
      }
    }
  },
  "context": {
    "properties": [
      {
        "namespace": "Alexa.ThermostatController.HVAC.Components",
        "name": "PrimaryHeaterOperation",
        "value": "OFF",
        "timeOfSample": "2017-02-03T16:20:50Z",
        "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "thermostatMode",
        "value": "AUTO",
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.ThermostatController",
        "name": "targetSetpoint",
        "value": {
          "value": 18.0,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 500
      },
      {
        "namespace": "Alexa.TemperatureSensor",
        "name": "temperature",
        "value": {
          "value": 19.1,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 1000
      },
      {
        "namespace": "Alexa.EndpointHealth",
        "name": "connectivity",
        "value": {
          "value": "OK"
        },
        "timeOfSample": "2017-02-03T16:20:50.52Z",
        "uncertaintyInMilliseconds": 0
      }
    ]
  }
}
関連トピック
- ENERGY STAR® Program Requirements For Connected Thermostat Products(英語)
- OpenADR 2.0 Demand Response Program(英語)
- Alexa.AutomationManagement
- Alexa.DeviceUsage.Estimation
- Alexa.DeviceUsage.Meter
最終更新日: 2024 年 07 月 11 日