Panduan Unit AC Smart Home
action.devices.types.AC_UNIT
- Unit AC mirip dengan termostat, tetapi tidak mendukung penghangat dan mungkin tidak mendukung penyetelan target suhu.
Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Unit Penyejuk Udara dan beberapa hal terkait sinonim dan alias.
Kemampuan perangkat
Lihat dokumentasi sifat yang sesuai untuk detail penerapan, seperti atribut dan status yang harus didukung layanan Anda, serta cara membangun respons EXECUTE dan QUERY.
Ciri yang diperlukan
Sifat dan perintah ini diperlukan, jika berlaku untuk
perangkat seluler. Jika perangkat Anda tidak mendukung ciri ini, masukkan kode kesalahan
functionNotSupported
dalam respons QUERY atau EXECUTE. Lihat
Error dan pengecualian untuk info selengkapnya.
Persyaratan kualitas
- Latensi: harus kurang dari atau sama dengan 1.000 md.
- Keandalan: harus lebih dari atau sama dengan 97%.
Perangkat contoh: Unit AC sederhana
Bagian ini berisi contoh payload intent yang mewakili "Unit AC" umum berdasarkan jenis dan karakteristik perangkat di atas. Jika Anda menambahkan atau menghapus ciri khas dalam implementasi Anda, ubah respons Anda untuk mencerminkan perubahan tersebut.
Contoh respons SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.AC_UNIT", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple AC unit" }, "willReportState": true, "attributes": { "availableFanSpeeds": { "speeds": [ { "speed_name": "low_key", "speed_values": [ { "speed_synonym": [ "Low", "Slow" ], "lang": "en" } ] }, { "speed_name": "high_key", "speed_values": [ { "speed_synonym": [ "High", "Speed 2" ], "lang": "en" } ] } ], "ordered": true }, "availableThermostatModes": [ "off", "cool", "fan-only", "on" ], "thermostatTemperatureUnit": "C" }, "deviceInfo": { "manufacturer": "smart-home-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" } } ] } }
Contoh tanggapan QUERY
{ "requestId": "6894439706274654514", "inputs": [ { "intent": "action.devices.QUERY", "payload": { "devices": [ { "id": "123" } ] } } ] }
{ "requestId": "6894439706274654514", "payload": { "devices": { "123": { "status": "SUCCESS", "online": true, "on": true, "currentFanSpeedSetting": "low_key", "thermostatMode": "cool", "thermostatTemperatureAmbient": 25, "thermostatTemperatureSetpoint": 20 } } } }
Contoh perintah EXECUTE
SetFanSpeed
Untuk detail tambahan
tentang parameter perintah,
lihat
action.devices.traits.FanSpeed
alamat IP internal.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetFanSpeed", "params": { "fanSpeed": "high_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentFanSpeedSetting": "high_key" } } ] } }
OnOff
Untuk detail tambahan
tentang parameter perintah,
lihat
action.devices.traits.OnOff
alamat IP internal.
{ "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 } } ] } }
ThermostatTemperatureSetpoint
Untuk detail tambahan
tentang parameter perintah,
lihat
action.devices.traits.TemperatureSetting
alamat IP internal.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
ThermostatSetMode
Untuk detail tambahan
tentang parameter perintah,
lihat
action.devices.traits.TemperatureSetting
alamat IP internal.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "cool" } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }