Smart-Home-Joghurtmaschine – Bedienungsanleitung

action.devices.types.YOGURTMAKER – Interaktionen mit Joghurtmaschinen können das Starten und Beenden, das Einstellen eines Timers, das Anpassen von Kochmodi oder Lebensmittelvoreinstellungen oder das Anpassen verschiedener anderer Einstellungen umfassen.

Dieser Typ gibt an, dass dem Gerät das Symbol „Joghurtmaschine“ und einige zugehörige Synonyme und Aliasse zugewiesen werden.

Gerätefunktionen

In der entsprechenden Dokumentation zu Merkmalen finden Sie Implementierungsdetails wie Attribute und Status, die Ihr Dienst unterstützen sollte, sowie Informationen zum Erstellen von EXECUTE- und QUERY-Antworten.

Erforderliche Merkmale

Diese Merkmale und Befehle sind erforderlich, sofern sie für Ihr Gerät gelten. Wenn Ihr Gerät diese Eigenschaften nicht unterstützt, geben Sie den Fehlercode functionNotSupported in einer QUERY- oder EXECUTE-Antwort ein. Weitere Informationen finden Sie unter Fehler und Ausnahmen.

Diese Eigenschaften werden empfohlen, sofern sie für Ihr Gerät gelten. Sie können jedoch alle verfügbaren Merkmale kombinieren, um sie bestmöglich an Ihre vorhandenen Produktfunktionen anzupassen.

Qualitätsanforderungen

  • Latenz:muss kleiner oder gleich 800 ms sein.
  • Zuverlässigkeit:muss mindestens 97% betragen.

Beispielgerät: Einfache Joghurtmaschine

Dieser Abschnitt enthält Beispiel-Intent-Nutzlasten für einen gängigen „Joghurtbereiter“ basierend auf den oben genannten Gerätetypen und -merkmalen. Wenn Sie in Ihrer Implementierung Merkmale hinzufügen oder entfernen, ändern Sie Ihre Antworten entsprechend, um diese Änderungen widerzuspiegeln.

Beispiel für eine SYNC-Antwort

Anfrage
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
Antwort
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.YOGURTMAKER",
        "traits": [
          "action.devices.traits.Cook",
          "action.devices.traits.StartStop",
          "action.devices.traits.Timer",
          "action.devices.traits.OnOff"
        ],
        "name": {
          "name": "Simple yogurt maker"
        },
        "willReportState": true,
        "attributes": {
          "supportedCookingModes": [
            "COOK"
          ],
          "foodPresets": [
            {
              "food_preset_name": "yogurt_key",
              "supported_units": [
                "CUPS",
                "OUNCES"
              ],
              "food_synonyms": [
                {
                  "synonym": [
                    "Yogurt",
                    "Yoghurt"
                  ],
                  "lang": "en"
                }
              ]
            },
            {
              "food_preset_name": "coconut_yogurt_key",
              "supported_units": [
                "CUPS",
                "OUNCES"
              ],
              "food_synonyms": [
                {
                  "synonym": [
                    "Coconut yogurt",
                    "Vegan yogurt"
                  ],
                  "lang": "en"
                }
              ]
            }
          ],
          "maxTimerLimitSec": 30,
          "pausable": true
        },
        "deviceInfo": {
          "manufacturer": "smart-home-inc",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        }
      }
    ]
  }
}

Beispiel für eine QUERY-Antwort

Anfrage
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
Antwort
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "on": true,
        "isRunning": true,
        "isPaused": false,
        "timerRemainingSec": 30,
        "currentCookingMode": "COOK",
        "currentFoodPreset": "yogurt_key"
      }
    }
  }
}

Beispielbefehle für EXECUTE

Kochen

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Cook-Referenz.

Anfrage
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.Cook",
                "params": {
                  "start": false,
                  "cookingMode": "COOK"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Antwort
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentCookingMode": "NONE",
          "currentFoodPreset": "NONE"
        }
      }
    ]
  }
}

StartStop

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.StartStop-Referenz.

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

TimerStart

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Timer-Referenz.

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

TimerAdjust

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Timer-Referenz.

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

TimerPause

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Timer-Referenz.

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

TimerResume

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Timer-Referenz.

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

TimerCancel

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.Timer-Referenz.

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

OnOff

Weitere Informationen zu den Befehlsparametern finden Sie in der action.devices.traits.OnOff-Referenz.

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

GERÄTEFEHLER

Eine vollständige Liste der Fehler und Ausnahmen