คู่มือซาวด์บาร์สตรีมมิงสมาร์ทโฮม
action.devices.types.STREAMING_SOUNDBAR
- อุปกรณ์นี้ใช้ทั้งลําโพงและสตรีมมิงสติ๊กหรือกล่องสตรีมมิง อุปกรณ์นี้มอบประสบการณ์การสตรีมนอกเหนือจากความสามารถในการซาวด์บาร์
ประเภทนี้เป็นการระบุว่าอุปกรณ์จะได้รับไอคอนซาวด์บาร์สตรีมมิง รวมถึงคําพ้องความหมายและชื่อแทนที่เกี่ยวข้องบางรายการ
ความสามารถของอุปกรณ์
อ่านรายละเอียดเกี่ยวกับลักษณะการใช้งาน เช่น แอตทริบิวต์และรัฐที่บริการควรรองรับ ตลอดจนวิธีสร้างการตอบกลับ "EXECUTE" และ "QUERY"
ลักษณะเฉพาะที่จําเป็น
ต้องมีลักษณะเฉพาะและคําสั่งเหล่านี้ หากเกี่ยวข้องกับอุปกรณ์ของคุณ
-
action.devices.traits.AppSelector
-
action.devices.traits.MediaState
-
action.devices.traits.OnOff
-
action.devices.traits.TransportControl
-
action.devices.traits.Volume
ลักษณะเฉพาะที่แนะนํา
ขอแนะนําให้ใช้รูปแบบเหล่านี้หากเกี่ยวข้องกับอุปกรณ์ของคุณ อย่างไรก็ตาม คุณสามารถผสมและจับคู่จากลักษณะทั้งหมดที่มีอยู่เพื่อให้ตรงกับฟังก์ชันการทํางานของผลิตภัณฑ์ที่มีอยู่ได้ดีที่สุด
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 3000 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
อุปกรณ์ตัวอย่าง: ซาวด์บาร์สตรีมมิงที่เรียบง่าย
ส่วนนี้ประกอบด้วยเพย์โหลดตัวอย่างของตัวอย่างที่สื่อถึง "ซาวด์บาร์สตรีมมิง" ทั่วไปตามประเภทอุปกรณ์และลักษณะเฉพาะข้างต้น หากคุณเพิ่มหรือนําลักษณะเฉพาะออกจากการใช้งาน ให้แก้ไขคําตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบกลับ SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.STREAMING_SOUNDBAR", "traits": [ "action.devices.traits.AppSelector", "action.devices.traits.MediaState", "action.devices.traits.OnOff", "action.devices.traits.TransportControl", "action.devices.traits.Volume" ], "name": { "name": "Simple streaming soundbar" }, "willReportState": true, "attributes": { "availableApplications": [ { "key": "youtube", "names": [ { "name_synonym": [ "YouTube" ], "lang": "en" } ] } ], "transportControlSupportedCommands": [ "NEXT", "PREVIOUS", "PAUSE", "STOP", "RESUME" ], "volumeMaxLevel": 11, "volumeCanMuteAndUnmute": true, "supportActivityState": true, "supportPlaybackState": true }, "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, "currentApplication": "youtube", "currentVolume": 10, "isMuted": false, "activityState": "ACTIVE", "playbackState": "PAUSED" } } } }
ตัวอย่างคําสั่ง EXECUTE
ติดตั้งแอป
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.AppSelector
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.appInstall", "params": { "newApplication": "youtube" } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentApplication": "youtube" } } ] } }
การค้นหาแอป
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.AppSelector
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.appSearch", "params": { "newApplication": "youtube" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentApplication": "youtube" } } ] } }
เลือกแอป
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.AppSelector
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.appSelect", "params": { "newApplication": "youtube" } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentApplication": "youtube" } } ] } }
ปิด
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.OnOff
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }
ปิดคําบรรยายสื่อ
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaClosedCaptioningOff" } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
ปิดคําบรรยายสื่อ
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaClosedCaptioningOn", "params": { "closedCaptioningLanguage": "en" } } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
สื่อถัดไป
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654528", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaNext" } ] } ] } } ] }
{ "requestId": "6894439706274654528", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "FAST_FORWARDING" } } ] } }
หยุดสื่อชั่วคราว
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654530", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaPause" } ] } ] } } ] }
{ "requestId": "6894439706274654530", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PAUSED" } } ] } }
สื่อก่อนหน้า
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654532", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaPrevious" } ] } ] } } ] }
{ "requestId": "6894439706274654532", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "REWINDING" } } ] } }
เล่นสื่อต่อ
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654534", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaResume" } ] } ] } } ] }
{ "requestId": "6894439706274654534", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
หยุดสื่อ
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TransportControl
{ "requestId": "6894439706274654536", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaStop" } ] } ] } } ] }
{ "requestId": "6894439706274654536", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "STOPPED" } } ] } }
ปิดเสียง
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.Volume
{ "requestId": "6894439706274654540", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mute", "params": { "mute": true } } ] } ] } } ] }
{ "requestId": "6894439706274654540", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentVolume": 10, "isMuted": true } } ] } }
ตั้งระดับเสียง
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.Volume
{ "requestId": "6894439706274654538", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.setVolume", "params": { "volumeLevel": 11 } } ] } ] } } ] }
{ "requestId": "6894439706274654538", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentVolume": 11, "isMuted": false } } ] } }