Akıllı ev Isıtıcı Kılavuzu

action.devices.types.HEATER: Isıtıcılar termostatlara benzer ancak soğutmayı desteklemez ve sıcaklık hedeflerinin ayarlanmasını desteklemeyebilir.

Bu tür, cihazın Isıtıcı 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.

Cihazınız için geçerliyse bu özellikler önerilir. Bununla birlikte, mevcut ürün işlevselliğinize en iyi şekilde uyması için mevcut tüm özellikleri bir arada kullanabilirsiniz.

Kalite gereksinimleri

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

Örnek cihaz: Basit ısıtıcı

Bu bölümde, cihaz türüne ve yukarıdaki özelliklere göre ortak bir "Isıtıcı"yı temsil eden örnek amaç yükleri yer alı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.HEATER",
        "traits": [
          "action.devices.traits.FanSpeed",
          "action.devices.traits.TemperatureSetting"
        ],
        "name": {
          "name": "Simple heater"
        },
        "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"
                    ],
                    "lang": "en"
                  }
                ]
              }
            ],
            "ordered": true
          },
          "availableThermostatModes": [
            "off",
            "heat",
            "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,
        "currentFanSpeedSetting": "low_key",
        "thermostatMode": "heat",
        "thermostatTemperatureSetpoint": 30,
        "thermostatTemperatureAmbient": 25
      }
    }
  }
}

Ö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": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.SetFanSpeed",
                "params": {
                  "fanSpeed": "high_key"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentFanSpeedSetting": "high_key"
        }
      }
    ]
  }
}

ThermostatTemperatureSetpoint

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

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

ThermostatSetMode

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.ThermostatSetMode",
                "params": {
                  "thermostatMode": "heat"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "thermostatMode": "heat",
          "thermostatTemperatureSetpoint": 30,
          "thermostatTemperatureAmbient": 25
        }
      }
    ]
  }
}

Cihaz ERRORS

Hataların ve istisnaların tam listesini inceleyin.