Welcome to the Google Home Developer Center, the new destination for learning how to develop smart home actions. Note: You'll continue building actions in the Actions console.
संग्रह की मदद से व्यवस्थित रहें अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.

स्मार्ट होम अवन गाइड

action.devices.types.OVEN - अवन के साथ होने वाले इंटरैक्शन में, कुछ तापमानों पर बेक या भूनने की सुविधा शामिल होती है. अवन का अंदर का तापमान अलग होता है, क्योंकि अवन गर्म हो रहा होता है. इसलिए, इस पर भी नज़र रखी जा सकती है. अवन का खाना पकाने का समय, खाना बनाने में लगने वाले समय को सीमित करता है.

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

action.devices.traits.OnOff और action.devices.traits.TemperatureControl के लिए, अवन के टाइप पर आधारित व्याकरण होते हैं:
  • अगर डिवाइस पर OnOff काम करता है, तो ओवन को पहले से गर्म करें पर action.devices.commands.OnOff निर्देश भेजा जाएगा.
  • अगर डिवाइस पर TemperatureControl काम करता है, तो ओवन को 350 डिग्री पर पहले से गर्म कर लें. ऐसा करने से, अवन को उस तापमान पर सेट करने के लिए निर्देश भेजा जाएगा.

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

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

ज़रूरी विशेषताएं

अगर ये एट्रिब्यूट और निर्देश आपके डिवाइस पर लागू होते हैं, तो वे ज़रूरी हैं.

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

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

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

उदाहरण डिवाइस: साधारण अवन

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

SYNC जवाब का नमूना

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

नमूना QUERY प्रतिक्रिया

अनुरोध
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
जवाब दें
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "on": true,
        "isRunning": true,
        "temperatureSetpointCelsius": 175,
        "currentCookingMode": "BAKE",
        "timerRemainingSec": -1
      }
    }
  }
}

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": "ROAST"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब दें
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentCookingMode": "ROAST"
        }
      }
    ]
  }
}

बंद है

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

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

तापमान सेट करें

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

अनुरोध
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.SetTemperature",
                "params": {
                  "temperature": 200
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब दें
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "temperatureSetpointCelsius": 200,
          "temperatureAmbientCelsius": 100
        }
      }
    ]
  }
}

टाइमरस्टार्ट

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

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

टाइमर एडजस्ट करें

कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए, 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": 290
        }
      }
    ]
  }
}

टाइमर रोकें

कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए, 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": 300,
          "timerPaused": true
        }
      }
    ]
  }
}

टाइमर फिर से शुरू करें

कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए, 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": 300,
          "timerPaused": false
        }
      }
    ]
  }
}

टाइमर रद्द करें

कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए, 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
        }
      }
    ]
  }
}

स्टार्टस्टॉप

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

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

डिवाइस की गड़बड़ियां

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