스마트 홈 온도 조절기 가이드

action.devices.types.THERMOSTAT - 온도 조절기는 설정값과 모드가 있는 온도 관리 기기입니다. 따라서 온도 조절기는 온도 타겟과 달리 모드 및 설정 (예: 높음/낮음)만 있을 수 있는 히터 및 에어컨과 구별됩니다.

이 유형은 기기에서 온도 조절기 아이콘과 일부 관련 동의어 및 별칭을 가져온다는 것을 나타냅니다.

이 유형의 기기는 온도를 제어하지만 일부 난방/냉방 실내 기기에는 다른 제어 기능과 높음/낮음 모드가 있지만 온도 제어 기능은 없습니다.

기기 기능

서비스에서 지원해야 하는 속성 및 상태, EXECUTE 및 QUERY 응답을 빌드하는 방법과 같은 구현 세부정보는 해당 트레잇 문서를 참고하세요.

필수 트레잇

이러한 트레잇과 명령어는 기기에 해당하는 경우 필요합니다. 기기가 이러한 트레잇을 지원하지 않는 경우 QUERY 또는 EXECUTE 응답에 functionNotSupported 오류 코드를 입력합니다. 자세한 내용은 오류 및 예외를 참고하세요.

온도 조절기 명령어는 EXECUTE 인텐트에서 자주 체이닝됩니다. *난방 72도로 설정해 줘* 라고 말하는 사용자는 모드 명령어와 온도 설정을 차례로 생성합니다.

품질 요구사항

  • 지연 시간: 700ms 이하여야 합니다.
  • 안정성: 97% 이상이어야 합니다.

기기 예: 간단한 온도 조절기

이 섹션에는 위의 기기 유형 및 트레잇을 기반으로 일반적인 'Thermostat'을 나타내는 인텐트 페이로드의 예가 포함되어 있습니다. 구현에서 트레잇을 추가하거나 삭제하는 경우 이러한 변경사항을 반영하도록 응답을 수정합니다.

샘플 SYNC 응답

요청
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
응답
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.THERMOSTAT",
        "traits": [
          "action.devices.traits.TemperatureSetting"
        ],
        "name": {
          "name": "Simple thermostat"
        },
        "willReportState": true,
        "attributes": {
          "availableThermostatModes": [
            "off",
            "heat",
            "cool",
            "heatcool",
            "on"
          ],
          "thermostatTemperatureRange": {
            "minThresholdCelsius": 15,
            "maxThresholdCelsius": 30
          },
          "thermostatTemperatureUnit": "F"
        },
        "deviceInfo": {
          "manufacturer": "smart-home-inc",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        }
      }
    ]
  }
}

샘플 QUERY 응답

요청
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "thermostatMode": "cool",
        "thermostatTemperatureSetpoint": 23,
        "thermostatTemperatureAmbient": 25.1,
        "thermostatHumidityAmbient": 45.3
      }
    }
  }
}

샘플 EXECUTE 명령어

ThermostatTemperatureSetpoint

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TemperatureSetting 참조를 참고하세요.

요청
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.ThermostatTemperatureSetpoint",
                "params": {
                  "thermostatTemperatureSetpoint": 22
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "cool",
          "thermostatTemperatureSetpoint": 22,
          "thermostatTemperatureAmbient": 25.1
        }
      }
    ]
  }
}

ThermostatTemperatureSetRange

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TemperatureSetting 참조를 참고하세요.

요청
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.ThermostatTemperatureSetRange",
                "params": {
                  "thermostatTemperatureSetpointHigh": 26,
                  "thermostatTemperatureSetpointLow": 22
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "heatcool",
          "thermostatTemperatureSetpointHigh": 26,
          "thermostatTemperatureSetpointLow": 22,
          "thermostatTemperatureAmbient": 25.1
        }
      }
    ]
  }
}

ThermostatSetMode

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TemperatureSetting 참조를 참고하세요.

요청
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.ThermostatSetMode",
                "params": {
                  "thermostatMode": "heatcool"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "heatcool",
          "thermostatTemperatureSetpointHigh": 26,
          "thermostatTemperatureSetpointLow": 22,
          "thermostatTemperatureAmbient": 25.1
        }
      }
    ]
  }
}

기기 오류

오류 및 예외의 전체 목록을 참고하세요.
  • inHeatOrCool - 기기가 명시적인 난방 또는 냉방 모드이므로 난방/냉방/범위 명령어가 실패했습니다.
  • inHeatCool - 기기가 난방 또는 냉방 모드이므로 난방 또는 냉방 명령어가 실패했습니다.
  • lockedToRange - 기기가 온도 범위 또는 모드로 잠겨 있으며 요청된 변경사항을 적용할 수 없습니다.
  • rangeTooClose - 난방-냉방 범위의 온도 포인트가 서로 너무 가깝습니다.