Akıllı Ev Mikrodalga Fırın Kılavuzu

action.devices.types.MICROWAVE: Mikrodalga fırınlarla etkileşimler kapsamında başlatma ve durdurma, zamanlayıcı ayarlama, pişirme modları ile yemek ayarlarını yapma ve pişirme dışı modları ayarlama gibi işlemler yer alabilir.

Bu tür, cihazın Mikrodalga simgesinin yanı sıra bazı eş anlamlı kelimeleri 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 3000 ms olmalıdır.
  • Güvenilirlik: En az %97 olmalıdır.

Örnek cihaz: Sade mikrodalga fırın

Bu bölümde, cihaz türüne ve yukarıdaki özelliklere göre yaygın bir "Mikrodalga"yı 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.MICROWAVE",
        "traits": [
          "action.devices.traits.Cook",
          "action.devices.traits.Timer",
          "action.devices.traits.StartStop"
        ],
        "name": {
          "name": "Simple microwave"
        },
        "willReportState": true,
        "attributes": {
          "supportedCookingModes": [
            "DEFROST",
            "MICROWAVE",
            "WARM"
          ],
          "maxTimerLimitSec": 6039,
          "pausable": true
        },
        "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,
        "isRunning": true,
        "isPaused": false,
        "timerRemainingSec": 60,
        "currentCookingMode": "WARM"
      }
    }
  }
}

Örnek EXECUTE komutları

Yemek Yapma

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

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

TimerStart

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

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

TimerAdjust

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

İstek
{
  "requestId": "6894439706274654524",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerAdjust",
                "params": {
                  "timerTimeSec": -10
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654524",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 50
        }
      }
    ]
  }
}

TimerPause

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

İstek
{
  "requestId": "6894439706274654526",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654526",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 60,
          "timerPaused": true
        }
      }
    ]
  }
}

TimerResume

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

İstek
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 60,
          "timerPaused": false
        }
      }
    ]
  }
}

TimerCancel

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

İstek
{
  "requestId": "6894439706274654530",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerCancel"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654530",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": -1
        }
      }
    ]
  }
}

StartStop

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

İstek
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.StartStop",
                "params": {
                  "start": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "isRunning": true,
          "isPaused": false
        }
      }
    ]
  }
}

Cihaz ERRORS

Hataların ve istisnaların tam listesini inceleyin.