स्मार्ट होम माइक्रोवेव गाइड

action.devices.types.MICROWAVE - माइक्रोवेव के साथ इंटरैक्शन में, चालू और बंद करना, टाइमर सेट करना, कुकिंग मोड और फ़ूड प्रीसेट में बदलाव करना, और नॉन-पाकिंग मोड में बदलाव करना शामिल हो सकता है.

इस टाइप से पता चलता है कि डिवाइस को माइक्रोवेव आइकॉन और इससे जुड़े कुछ समानार्थी शब्द और उपनाम मिल चुके हैं.

डिवाइस की क्षमताएं

लागू करने के बारे में जानकारी के लिए, उससे जुड़े Trait दस्तावेज़ देखें. जैसे, एट्रिब्यूट और कहा जाता है कि आपकी सेवा में किन सुविधाओं का इस्तेमाल किया जाना चाहिए. साथ ही, EXECUTE और QUERY रिस्पॉन्स बनाने का तरीका भी देखें.

ज़रूरी traits

अगर आपके डिवाइस पर लागू हो, तो ये विशेषताएं और निर्देश ज़रूरी हैं. अगर आपके डिवाइस पर ये सुविधाएं काम नहीं करती हैं, तो QUERY या EXECUTE रिस्पॉन्स में functionNotSupported का गड़बड़ी कोड डालें. ज़्यादा जानकारी के लिए गड़बड़ियां और अपवाद देखें.

अगर आपके डिवाइस पर लागू हो, तो इन विशेषताओं का सुझाव दिया जाता है. हालांकि, आपको अपने मौजूदा प्रॉडक्ट की सुविधाओं का इस्तेमाल करने के लिए, उपलब्ध सभी विशेषताओं का मिलान करने की आज़ादी है.

क्वालिटी के लिए ज़रूरी शर्तें

  • इंतज़ार का समय: 3000 मि.से. या इससे कम होना चाहिए.
  • विश्वसनीयता: 97% या इससे ज़्यादा होना चाहिए.

उदाहरण डिवाइस: सामान्य माइक्रोवेव

इस सेक्शन में, उदाहरण के तौर पर दिए गए इंटेंट पेलोड शामिल हैं. इनमें डिवाइस के टाइप और ऊपर दी गई विशेषताओं के आधार पर, एक सामान्य "माइक्रोवेव" को दिखाया गया है. अगर लागू करने की प्रक्रिया में एट्रिब्यूट जोड़े या हटाए जाते हैं, तो उन बदलावों को दिखाने के लिए अपने जवाबों में बदलाव करें.

सिंक के जवाब का नमूना

अनुरोध करें
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
जवाब
{
  "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"
        }
      }
    ]
  }
}

क्वेरी के जवाब का उदाहरण

अनुरोध करें
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "isRunning": true,
        "isPaused": false,
        "timerRemainingSec": 60,
        "currentCookingMode": "WARM"
      }
    }
  }
}

EXECUTE के निर्देशों का उदाहरण

कुक

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Cook रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.Cook",
                "params": {
                  "start": true,
                  "cookingMode": "MICROWAVE"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentCookingMode": "MICROWAVE"
        }
      }
    ]
  }
}

TimerStart

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Timer रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654522",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerStart",
                "params": {
                  "timerTimeSec": 60
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654522",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 60
        }
      }
    ]
  }
}

TimerAdjust

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Timer रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654524",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerAdjust",
                "params": {
                  "timerTimeSec": -10
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654524",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 50
        }
      }
    ]
  }
}

TimerPause

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Timer रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654526",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654526",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 60,
          "timerPaused": true
        }
      }
    ]
  }
}

TimerResume

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Timer रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": 60,
          "timerPaused": false
        }
      }
    ]
  }
}

TimerCancel

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Timer रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654530",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.TimerCancel"
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654530",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "timerRemainingSec": -1
        }
      }
    ]
  }
}

StartStop

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.StartStop रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.StartStop",
                "params": {
                  "start": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "isRunning": true,
          "isPaused": false
        }
      }
    ]
  }
}

डिवाइस ERRORS

गड़बड़ियों और अपवादों की पूरी सूची देखें.