Panduan Oven Smart Home

action.devices.types.OVEN - Interaksi dengan oven melibatkan kemampuan untuk memanggang atau memanggang pada suhu tertentu. Suhu fisik di dalam oven berbeda-beda karena oven sedang dipanaskan, sehingga pengukuran ini juga perlu dipantau. Oven memiliki waktu memasak yang membatasi durasi pemanggangan.

Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Oven dan beberapa hal terkait sinonim dan alias.

Oven memiliki tata bahasa berbasis jenis untuk action.devices.traits.OnOff dan action.devices.traits.TemperatureControl:
  • Jika perangkat mendukung OnOff, Memanaskan terlebih dahulu oven akan mengirimkan action.devices.commands.OnOff perintah.
  • Jika perangkat mendukung TemperatureControl, Memanaskan oven terlebih dahulu ke suhu 350 derajat akan mengirimkan perintah untuk menyetel oven ke suhu tersebut.

Kemampuan perangkat

Lihat dokumentasi sifat yang sesuai untuk detail penerapan, seperti atribut dan status yang harus didukung layanan Anda, serta cara membangun respons EXECUTE dan QUERY.

Ciri yang diperlukan

Sifat dan perintah ini diperlukan, jika berlaku untuk perangkat seluler. Jika perangkat Anda tidak mendukung ciri ini, masukkan kode kesalahan functionNotSupported dalam respons QUERY atau EXECUTE. Lihat Error dan pengecualian untuk info selengkapnya.

Fitur ini direkomendasikan, jika berlaku untuk perangkat Anda. Namun, Anda bebas memadupadankan semua sifat yang tersedia agar cocok dengan yang ada fungsionalitas produk.

Persyaratan kualitas

  • Latensi: harus kurang dari atau sama dengan 3.000 md.
  • Keandalan: harus lebih dari atau sama dengan 97%.

Perangkat contoh: Oven sederhana

Bagian ini berisi contoh payload intent yang mewakili "Oven" umum berdasarkan jenis dan karakteristik perangkat di atas. Jika Anda menambahkan atau menghapus ciri khas dalam implementasi Anda, ubah respons Anda untuk mencerminkan perubahan tersebut.

Contoh respons SYNC

Minta
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
Respons
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.OVEN",
        "traits": [
          "action.devices.traits.Cook",
          "action.devices.traits.OnOff",
          "action.devices.traits.TemperatureControl",
          "action.devices.traits.Timer",
          "action.devices.traits.StartStop"
        ],
        "name": {
          "name": "Simple oven"
        },
        "willReportState": true,
        "attributes": {
          "supportedCookingModes": [
            "BAKE",
            "CONVECTION_BAKE",
            "ROAST"
          ],
          "maxTimerLimitSec": 3600,
          "temperatureRange": {
            "minThresholdCelsius": 65,
            "maxThresholdCelsius": 288
          },
          "temperatureUnitForUX": "F"
        },
        "deviceInfo": {
          "manufacturer": "smart-home-inc",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        }
      }
    ]
  }
}

Contoh respons QUERY

Minta
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "on": true,
        "isRunning": true,
        "temperatureSetpointCelsius": 175,
        "currentCookingMode": "BAKE",
        "timerRemainingSec": -1
      }
    }
  }
}

Contoh perintah EXECUTE

Inspirasi Memasak

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Cook alamat IP internal.

Minta
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.Cook",
                "params": {
                  "start": true,
                  "cookingMode": "ROAST"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentCookingMode": "ROAST"
        }
      }
    ]
  }
}

OnOff

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.OnOff alamat IP internal.

Minta
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "on": true
        }
      }
    ]
  }
}

SetTemperature

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.TemperatureControl alamat IP internal.

Minta
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.SetTemperature",
                "params": {
                  "temperature": 200
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "temperatureSetpointCelsius": 200,
          "temperatureAmbientCelsius": 100
        }
      }
    ]
  }
}

TimerStart

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Timer alamat IP internal.

Minta
{
  "requestId": "6894439706274654522",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerStart",
                "params": {
                  "timerTimeSec": 300
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654522",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 300
        }
      }
    ]
  }
}

TimerAdjust

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Timer alamat IP internal.

Minta
{
  "requestId": "6894439706274654524",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerAdjust",
                "params": {
                  "timerTimeSec": -10
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654524",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 290
        }
      }
    ]
  }
}

TimerPause

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Timer alamat IP internal.

Minta
{
  "requestId": "6894439706274654526",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654526",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 300,
          "timerPaused": true
        }
      }
    ]
  }
}

TimerResume

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Timer alamat IP internal.

Minta
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 300,
          "timerPaused": false
        }
      }
    ]
  }
}

TimerCancel

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.Timer alamat IP internal.

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

StartStop

Untuk detail tambahan tentang parameter perintah, lihat action.devices.traits.StartStop alamat IP internal.

Minta
{
  "requestId": "6894439706274654532",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.StartStop",
                "params": {
                  "start": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Respons
{
  "requestId": "6894439706274654532",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "isRunning": true
        }
      }
    ]
  }
}

Perangkat ERRORS

Lihat daftar lengkap error dan pengecualian.