スマートホーム煙探知器ガイド
action.devices.types.SMOKE_DETECTOR
- 煙探知器は、現在煙が検知されているかどうか、煙の濃度が高いかどうか、現在の煙の濃度を 100 万分単位で報告できます。
このタイプのデバイスは、煙探知器アイコンと、関連する類義語やエイリアスを示します。
デバイスの機能
サービスがサポートする属性や状態、EXECUTE レスポンスや QUERY レスポンスの作成方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必要なトレイト
これらのトレイトとコマンドは、デバイスに応じて必要です。
品質要件
- レイテンシ: 1000 ミリ秒 以下でなければなりません。
- 信頼性: 97% 以上である必要があります。
デバイスの例: シンプルな煙探知器
このセクションでは、上記のデバイスタイプとトレイトに基づく一般的な「煙探知器」を表すインテント ペイロードの例について説明します。実装でトレイトを追加または削除する場合は、その変更を反映するようにレスポンスを修正してください。
SYNC レスポンスの例
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.SMOKE_DETECTOR", "traits": [ "action.devices.traits.SensorState" ], "name": { "name": "Simple smoke detector" }, "willReportState": true, "attributes": { "sensorStatesSupported": [ { "name": "SmokeLevel", "descriptiveCapabilities": { "availableStates": [ "smoke detected", "high", "no smoke detected" ] }, "numericCapabilities": { "rawValueUnit": "PARTS_PER_MILLION" } } ] }, "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, "currentSensorStateData": [ { "name": "SmokeLevel", "currentSensorState": "high", "rawValue": 200 } ] } } } }