스마트 홈 수도꼭지 가이드
action.devices.types.FAUCET
- 수도꼭지는 다양한 양과 사전 설정으로 액체를 분사할 수 있습니다. 수도꼭지에는 다양한 모드가 있을 수 있으며 각 모드에는 자체 관련 설정이 있습니다. 이는 분수대에 따라 다르며 일반화된 형식으로 해석됩니다.
이 유형은 기기가 수도꼭지 아이콘과 일부 관련 동의어 및 별칭을 가져온다는 것을 나타냅니다.
기기 기능
서비스에서 지원해야 하는 속성 및 상태, EXECUTE 및 QUERY 응답을 빌드하는 방법과 같은 구현 세부정보는 해당 트레잇 문서를 참고하세요.
추천 트레잇
기기에 해당하는 경우 이러한 트레잇을 사용하는 것이 좋습니다. 하지만 기존 제품 기능에 가장 적합하도록 사용 가능한 모든 트레잇을 자유롭게 조합할 수 있습니다.
-
action.devices.traits.Dispense
-
action.devices.traits.StartStop
-
action.devices.traits.TemperatureControl
품질 요구사항
- 지연 시간: 800ms 이하여야 합니다.
- 안정성: 97% 이상이어야 합니다.
기기 예: 간단한 수도꼭지
이 섹션에는 위의 기기 유형 및 트레잇을 기반으로 일반적인 'Faucet'을 나타내는 인텐트 페이로드의 예가 포함되어 있습니다. 구현에서 트레잇을 추가하거나 삭제하는 경우 이러한 변경사항을 반영하도록 응답을 수정합니다.
샘플 SYNC 응답
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.FAUCET", "traits": [ "action.devices.traits.Dispense", "action.devices.traits.TemperatureControl", "action.devices.traits.OnOff" ], "name": { "name": "Simple faucet" }, "willReportState": true, "attributes": { "supportedDispenseItems": [ { "item_name": "water_key", "item_name_synonyms": [ { "lang": "en", "synonyms": [ "Water" ] }, { "lang": "es", "synonyms": [ "Agua" ] }, { "lang": "fr", "synonyms": [ "Eau" ] } ], "supported_units": [ "TEASPOONS", "TABLESPOONS", "FLUID_OUNCES", "CUPS", "PINTS", "QUARTS", "GALLONS", "MILLILITERS", "LITERS", "DECILITERS" ], "default_portion": { "amount": 2, "unit": "CUPS" } } ], "supportedDispensePresets": [ { "preset_name": "cat_water_bowl_key", "preset_name_synonyms": [ { "lang": "en", "synonyms": [ "Cat water bowl", "Cat water dish", "Cat water cup" ] }, { "lang": "es", "synonyms": [ "Plato de agua para gato", "Bebedero para gato" ] }, { "lang": "fr", "synonyms": [ "Bol d'eau de chat", "Bac \u00e0 eau pour chat", "Tasse d'eau de chat" ] } ] } ], "temperatureRange": { "minThresholdCelsius": 25, "maxThresholdCelsius": 100 }, "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": false, "temperatureSetpointCelsius": 30, "dispenseItems": [ { "itemName": "water_key", "amountLastDispensed": { "amount": 2.5, "unit": "CUPS" }, "isCurrentlyDispensing": false } ] } } } }
샘플 EXECUTE 명령어
분배
명령어 매개변수에 관한 자세한 내용은
action.devices.traits.Dispense
참조를 참고하세요.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Dispense", "params": { "amount": 1, "unit": "CUPS", "item": "water_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "dispenseItems": [ { "itemName": "water_key", "amountLastDispensed": { "amount": 1, "unit": "CUPS" }, "isCurrentlyDispensing": true } ] } } ] } }
SetTemperature
명령어 매개변수에 관한 자세한 내용은
action.devices.traits.TemperatureControl
참조를 참고하세요.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetTemperature", "params": { "temperature": 65 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "temperatureSetpointCelsius": 65 } } ] } }
OnOff
명령어 매개변수에 관한 자세한 내용은
action.devices.traits.OnOff
참조를 참고하세요.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }