スマートホーム煙探知器ガイド
action.devices.types.SMOKE_DETECTOR
- 煙探知器は、現在煙が検出された場合、煙濃度が高い場合、現在の煙濃度を 100 万分の 1 単位で報告できます。
このデバイスは、煙探知器アイコン、関連する類義語、エイリアスを受け取ることを示します。
デバイスの機能
サービスがサポートする属性や状態、EXECUTE レスポンスと QUERY レスポンスの構築方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必要な特性
これらのトレイトとコマンドは、お使いのデバイスに必須です。
品質要件
- レイテンシ: 1,000 ミリ秒以下にする必要があります。
- 信頼性: 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 } ] } } } }