あなたのAlexaコンソール
?
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Alexa.TemperatureSensor Interface

The Alexa.TemperatureSensor interface capability can be assigned to an endpoint that can sense temperature. This interface does not define any directives or events, but responds to ReportState directives with a StateReport events.

Directives

This interface responds to Alexa's requests for endpoint state.

ReportState

A ReportState directive is sent to request the state of an endpoint. The endpoint appliance-001 in this case, is specified in the message.

Example ReportState Request

{
  "directive": {
    "header": {
      "messageId": "abc-123-def-456",
      "correlationToken": "abcdef-123456",
      "namespace": "Alexa",
      "name": "ReportState",
      "payloadVersion": "3"
    },
    "endpoint": {
      "endpointId": "appliance-001",
      "cookie": {},
      "scope":{  
            "type":"BearerToken",
            "token":"access-token-from-skill"
      }
    },
    "payload": {
    }
  }
}

Properties and Events

For this interface, you must reply:

  • Synchronously, which means you send a Response to Alexa from the Lambda function.

When you send a Response, you should include the state of the interface properties in the context of the message.

Properties

Property Name Type Description
temperature Temperature A temperature for the endpoint that contains a temperature value and scale.

StateReport Event

Reports the state of the endpoint.

StateReport example

{
  "context": {
    "properties": [ {
      "namespace": "Alexa.TemperatureSensor",
      "name": "temperature",
      "value": {
        "value": 24.0,
        "scale": "CELSIUS"
      },
      "timeOfSample": "2017-02-03T16:20:50.52Z",
      "uncertaintyInMilliseconds": 1000
    } ]
  },
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "payloadVersion": "3",
      "messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg=="
    },
    "endpoint": {
      "endpointId": "appliance-001"
    },
    "payload": {}
  }
}

Additional Sample Code

See the sample request and response messages in the Alexa smart home GitHub repo:

TemperatureSensor

Interface Description
Alexa.ThermostatController Describes directives and events related to changing settings of a thermostat endpoint