Akıllı Ev Klima Ünitesi Kılavuzu

action.devices.types.AC_UNIT: Klima birimleri termostatlara benzer ancak ısıtmayı desteklemez ve sıcaklık hedeflerinin ayarlanmasını desteklemeyebilir.

Bu tür, cihazın Klima Ünitesi simgesinin yanı sıra bazı ilgili eş anlamlıları ve takma adları aldığını belirtir.

Cihaz özellikleri

Hizmetinizin desteklemesi gereken özellikler ve durumlar ile EXECUTE ve QUERY yanıtlarının nasıl oluşturulacağı gibi uygulama ayrıntıları için ilgili özellik belgelerine bakın.

Gerekli özellikler

Bu özellikler ve komutlar, cihazınız için geçerliyse gereklidir. Cihazınız bu özellikleri desteklemiyorsa bir QUERY veya EXECUTE yanıtına functionNotSupported hata kodunu girin. Daha fazla bilgi için Hatalar ve istisnalar bölümüne bakın.

Kalite gereksinimleri

  • Gecikme: En fazla 1000 ms olmalıdır.
  • Güvenilirlik: En az %97 olmalıdır.

Örnek cihaz: Basit klima ünitesi

Bu bölümde, cihaz türüne ve yukarıdaki özelliklere göre ortak bir "Klima Birimi"ni temsil eden örnek amaç yükleri yer almaktadır. Uygulamanızda özellik ekler veya kaldırırsanız yanıtlarınızı bu değişiklikleri yansıtacak şekilde değiştirin.

Örnek Senkronizasyon yanıtı

İstek
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.AC_UNIT",
        "traits": [
          "action.devices.traits.FanSpeed",
          "action.devices.traits.OnOff",
          "action.devices.traits.TemperatureSetting"
        ],
        "name": {
          "name": "Simple AC unit"
        },
        "willReportState": true,
        "attributes": {
          "availableFanSpeeds": {
            "speeds": [
              {
                "speed_name": "low_key",
                "speed_values": [
                  {
                    "speed_synonym": [
                      "Low",
                      "Slow"
                    ],
                    "lang": "en"
                  }
                ]
              },
              {
                "speed_name": "high_key",
                "speed_values": [
                  {
                    "speed_synonym": [
                      "High",
                      "Speed 2"
                    ],
                    "lang": "en"
                  }
                ]
              }
            ],
            "ordered": true
          },
          "availableThermostatModes": [
            "off",
            "cool",
            "fan-only",
            "on"
          ],
          "thermostatTemperatureUnit": "C"
        },
        "deviceInfo": {
          "manufacturer": "smart-home-inc",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        }
      }
    ]
  }
}

Örnek QUERY yanıtı

İstek
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "on": true,
        "currentFanSpeedSetting": "low_key",
        "thermostatMode": "cool",
        "thermostatTemperatureAmbient": 25,
        "thermostatTemperatureSetpoint": 20
      }
    }
  }
}

Örnek EXECUTE komutları

SetFanSpeed

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.FanSpeed referansına bakın.

İstek
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.SetFanSpeed",
                "params": {
                  "fanSpeed": "high_key"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentFanSpeedSetting": "high_key"
        }
      }
    ]
  }
}

OnOff

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.OnOff referansına bakın.

İstek
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "on": true
        }
      }
    ]
  }
}

ThermostatTemperatureSetpoint

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TemperatureSetting referansına bakın.

İstek
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.ThermostatTemperatureSetpoint",
                "params": {
                  "thermostatTemperatureSetpoint": 22
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "cool",
          "thermostatTemperatureSetpoint": 22,
          "thermostatTemperatureAmbient": 25.1
        }
      }
    ]
  }
}

ThermostatSetMode

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TemperatureSetting referansına bakın.

İstek
{
  "requestId": "6894439706274654522",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.ThermostatSetMode",
                "params": {
                  "thermostatMode": "cool"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654522",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "cool",
          "thermostatTemperatureSetpoint": 22,
          "thermostatTemperatureAmbient": 25.1
        }
      }
    ]
  }
}

Cihaz ERRORS

Hataların ve istisnaların tam listesini inceleyin.