-
Notifications
You must be signed in to change notification settings - Fork 55
DeviceSchemas
A collection of schemas showing different ids and parameter.
If you add any entries please:
-
Preserve alphabetical order of devices on this page
-
Pretty print the entries to be indented and sorted on key. E.g. in Python:
json.dumps(schema, indent=4, sort_keys=True) # note probably will escape non-ascii characters
or:
json.dumps(schema, indent=4, sort_keys=True, ensure_ascii=False)
For non-Chinese readers, https://translate.google.com/ is great for determining what some items are.
See https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP_DEPRECATED.md for instructions on how to get the schema for your device(s).
https://www.alfawise.com/products/alfawise-v8s-pro-e30b-robot-vacuum-cleaner-with-smart-mopping
[
{
"mode": "rw",
"code": "Power",
"name": "开关",
"property": {
"type": "bool"
},
"id": 1,
"type": "obj",
"desc": "开关机控制。\n下发: 发送控制指令给主机,主机依据指令状态进行开关机操作。\n上报:\n当主机使用遥控器关机或者长时间静止进入关机状态后,主机会上报一个关机数据。\n当主机处于关机状态时,通过遥控器或者触摸主机的按键,主机会进入开机状态,主机会上报一个开机数据。"
},
{
"mode": "ro",
"code": "Error",
"scope": "fault",
"name": "故障",
"property": {
"label": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14"],
"type": "bitmap",
"maxlen": 14
},
"id": 11,
"type": "obj",
"desc": "0:无报警1:主动轮过载 2:前跌落触发 3:左跌落触发 4:右跌落触发 5:机器离地 6:左碰撞卡住 7:右碰撞卡住 8:边刷缠绕 9:电量低于20% 10:尘盒未安装 11:风扇异常 12:滚刷异常 13:电池故障14:水箱未安装"
},
{
"mode": "ro",
"code": "battery",
"name": "剩余电量",
"property": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 14,
"type": "obj",
"desc": "机器定时上报电量百分比, 0% - 100%"
},
{
"mode": "rw",
"code": "power_go",
"name": "暂停",
"property": {
"type": "bool"
},
"id": 25,
"type": "obj",
"desc": "0:暂停 1:工作"
},
{
"mode": "rw",
"code": "directioncontrol",
"name": "方向控制",
"property": {
"range": ["forward", "backward", "turnleft", "turnright", "stop"],
"type": "enum"
},
"id": 26,
"type": "obj",
"desc": "前/后/左/右/停"
},
{
"mode": "rw",
"code": "mode",
"name": "工作模式",
"property": {
"range": ["idle", "auto", "spot", "single", "wallfollow", "chargego"],
"type": "enum"
},
"id": 27,
"type": "obj",
"desc": "idle 空闲模式、auto 自动模式 、spot 定点模式、single 单间模式、wallfollow 沿边模式、chargego 回充模式"
},
{
"mode": "ro",
"code": "Status",
"name": "状态",
"property": {
"range": ["standby", "working", "fault", "sleep", "workcompleted", "charging", "chargecompleted", "pause"],
"type": "enum"
},
"id": 28,
"type": "obj",
"desc": "0: 待机 1: 工作中 2: 故障 3: 休眠 4: 工作完成 5: 充电 6: 充电完成 7:暂停"
},
{
"mode": "wr",
"code": "Find_robot",
"name": "寻找机器人",
"property": {
"type": "bool"
},
"id": 29,
"type": "obj",
"desc": "App触发下发1"
},
{
"mode": "rw",
"code": "Fan_seepage",
"name": "清扫强度",
"property": {
"range": ["low", "normal", "high"],
"type": "enum"
},
"id": 30,
"type": "obj",
"desc": ""
}
]
1 AC switch - AC110~240V AC (US grounded style plug shape)
Affiliate Link Smart Plug WiFi Remote Control On App Hiwild Mini Socket Compatible with Alexa (Smart Wi-Fi Plug) (Smart Wi-Fi Plug)
[
{
"mode": "rw",
"code": "switch_1",
"name": "????",
"property": {
"type": "bool"
},
"iconname": "icon-dp_power2",
"id": 1,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "countdown",
"name": "???",
"property": {
"unit": "?",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1,
"type": "value"
},
"iconname": "icon-dp_time2",
"id": 11,
"type": "obj",
"desc": "???????????????"
},
{
"mode": "rw",
"code": "randomTime",
"name": "????",
"property": {
"type": "string",
"maxlen": 255
},
"id": 101,
"type": "obj",
"desc": "?6????? #1??/#2??/#3#4????(min)/#5#6????(min),??42?"
},
{
"mode": "rw",
"code": "cycleTime",
"name": "????",
"property": {
"type": "string",
"maxlen": 255
},
"id": 102,
"type": "obj",
"desc": "?10????? #1??/#2??/#3#4????(min)/#5#6????(min)/#7#8????(min)/#9#10????(min)\n??:00(??)01(??)02(??)04(??)08(??)10(??)20(??)40(??)"
},
{
"mode": "rw",
"code": "normalTime",
"name": "????",
"property": {
"type": "string",
"maxlen": 255
},
"id": 103,
"type": "obj",
"desc": "?6????? #1??/#2??/#3#4????(min)/#5#6????(min),??42?"
}
]
https://www.kogan.com/au/buy/kogan-smarterhome-17l-smart-glass-kettle/
[
{
"mode":"rw",
"code":"Power",
"name":"烧开",
"property":{
"type":"bool"
},
"iconname":"icon-dp_power",
"id":1,
"type":"obj",
"desc":""
},
{
"mode":"ro",
"code":"tempcurrent",
"name":"Current Temeperature",
"property":{
"unit":"℃",
"min":0,
"max":100,
"scale":0,
"step":1,
"type":"value"
},
"iconname":"icon-dp_light2",
"id":5,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"cancel",
"name":"取消",
"property":{"type":"bool"},
"id":101,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"tem",
"name":"保温",
"property":{
"range":["40","50","60","80","90","currenttemp"],
"type":"enum"
},
"id":102,
"type":"obj",
"desc":"单位℃"
}
]
'Expower' branded bulb. No obvious model number https://www.amazon.co.uk/Expower-Dimmable-Control-Smartphone-Equivalent/dp/B075Q9NHF2
See https://github.com/codetheweb/tuyapi/issues/5#issuecomment-361212775 for some thoughts on payload.
{
"schema": [
{
"code": "led_switch",
"desc": "",
"iconname": "icon-dp_power",
"id": 1,
"mode": "rw",
"name": "开关",
"property": {
"type": "bool"
},
"type": "obj"
},
{
"code": "work_mode",
"desc": "",
"iconname": "icon-dp_mode",
"id": 2,
"mode": "rw",
"name": "工作模式",
"property": {
"range": [
"white",
"colour",
"scene",
"scene_1",
"scene_2",
"scene_3",
"scene_4"
],
"type": "enum"
},
"type": "obj"
},
{
"code": "bright_value",
"desc": "",
"iconname": "icon-dp_sun",
"id": 3,
"mode": "rw",
"name": "亮度值",
"property": {
"max": 255,
"min": 25,
"scale": 0,
"step": 1,
"type": "value",
"unit": ""
},
"type": "obj"
},
{
"code": "temp_value",
"desc": "",
"iconname": "icon-dp_light",
"id": 4,
"mode": "rw",
"name": "冷暖值",
"property": {
"max": 255,
"min": 0,
"scale": 0,
"step": 1,
"type": "value",
"unit": ""
},
"type": "obj"
},
{
"code": "colour_data",
"desc": "rgbhsv",
"id": 5,
"mode": "rw",
"name": "彩光模式数",
"property": {
"maxlen": 14,
"type": "string"
},
"type": "obj"
},
{
"code": "scene_data",
"desc": "rgbhsv",
"id": 6,
"mode": "rw",
"name": "情景模式数",
"property": {
"maxlen": 14,
"type": "string"
},
"type": "obj"
},
{
"code": "flash_scene_1",
"desc": "",
"id": 7,
"mode": "rw",
"name": "柔光情景",
"property": {
"maxlen": 14,
"type": "string"
},
"type": "obj"
},
{
"code": "flash_scene_2",
"desc": "",
"id": 8,
"mode": "rw",
"name": "缤纷情景",
"property": {
"maxlen": 44,
"type": "string"
},
"type": "obj"
},
{
"code": "flash_scene_3",
"desc": "",
"id": 9,
"mode": "rw",
"name": "炫彩情景",
"property": {
"maxlen": 14,
"type": "string"
},
"type": "obj"
},
{
"code": "flash_scene_4",
"desc": "",
"id": 10,
"mode": "rw",
"name": "斑斓情景",
"property": {
"maxlen": 44,
"type": "string"
},
"type": "obj"
}
]
}
For models with the Rec Tec Grills Wi-Pellet WiFi controller (standard on RT-340, RT-590, RT-700, and available as upgrade to RT-300 & RT-680)
[
{
"mode": "rw",
"code": "Power",
"name": "Switch",
"property": {
"type": "bool"
},
"iconname": "icon-dp_power",
"id": 1,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "Set_temp",
"name": "Set Temperature",
"property": {
"unit": "",
"min": 0,
"max": 65535,
"scale": 0,
"step": 5,
"type": "value"
},
"id": 102,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "Actual_temp",
"name": "Actual Temperature",
"property": {
"unit": "",
"min": 0,
"max": 65535,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 103,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "Min_feedrate",
"name": "Minimum Feeding Amount",
"property": {
"unit": "",
"min": 0,
"max": 255,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 104,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "Food_temp1",
"name": "Food Temperature 1",
"property": {
"unit": "",
"min": 0,
"max": 65535,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 105,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "Food_temp2",
"name": "Food Temperature 2",
"property": {
"unit": "",
"min": 0,
"max": 65535,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 106,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "Temp_adjust",
"name": "Temperature Calibration",
"property": {
"unit": "",
"min": -128,
"max": 127,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 107,
"type": "obj",
"desc": ""
},
{
"mode": "wr",
"code": "Temp_unit",
"name": "Temperature Unit Switching",
"property": {
"type": "bool"
},
"id": 108,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "ER1",
"name": "ER1 Alarm",
"property": {
"type": "bool"
},
"id": 109,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "ER2",
"name": "ER2 Alarm",
"property": {
"type": "bool"
},
"id": 110,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "ER3",
"name": "ER3 Alarm",
"property": {
"type": "bool"
},
"id": 111,
"type": "obj",
"desc": ""
}
]
https://fccid.io/2AJ5F-SM-PW701U/User-Manual/User-Manual-3200205
Affiliate link Smart Plug, SKYROKU 2 Pack SM-PW701U Wi-Fi Plug No Hub Required, Works with Alexa Echo Control Your Devices from Anywhere
Single Switch (110v and 220v):
[
{
"code": "switch_on",
"name": "\u5f00\u5173",
"iconname": "icon-dp_power2",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 1,
"desc": ""
},
{
"code": "countdown",
"name": "\u5012\u8ba1\u65f6",
"iconname": "icon-dp_time",
"passive": True,
"mode": "rw",
"property": {
"scale": 0,
"min": 0,
"max": 86400,
"step": 1,
"type": "value",
"unit": "\u79d2"
},
"type": "obj",
"id": 2,
"desc": ""
}
]
Amazon (germany) link TECKIN WLAN Smart Steckdose Intelligente Plug Wifi Amazon Alexa [Echo, Echo Dot] und Google Home 10A-2200W - 2 Packs
[{
"mode": "rw",
"code": "switch_on",
"name": "开关",
"property": {
"type": "bool"
},
"iconname": "icon-dp_power3",
"id": 1,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "countdown",
"name": "倒计时",
"property": {
"unit": "秒",
"min": 0,
"max": 86400,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 2,
"type": "obj",
"passive": true,
"desc": ""
},
{
"mode": "ro",
"code": "add_ele",
"name": "增加电量",
"property": {
"unit": "度",
"min": 0,
"max": 500000,
"scale": 3,
"step": 100,
"type": "value"
},
"id": 3,
"type": "obj",
"desc": "上报的为放大100倍之后的值,即上报56,实际值为0.56度"
},
{
"mode": "ro",
"code": "cur_current",
"name": "当前电流",
"property": {
"unit": "mA",
"min": 0,
"max": 30000,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 4,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "cur_power",
"name": "当前功率",
"property": {
"unit": "W",
"min": 0,
"max": 50000,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 5,
"type": "obj",
"desc": ""
},
{
"mode": "ro",
"code": "cur_voltage",
"name": "电压",
"property": {
"unit": "V",
"min": 0,
"max": 3000,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 6,
"type": "obj",
"desc": ""
}]
2.4GHz WiFi Color/Temp Smart Bulb
https://www.gearbest.com/smart-bulbs/pp_009660355322.html?wid=1433363
[
{
"mode":"rw",
"code":"led_switch",
"name":"开关",
"property": {
"type":"bool"
},
"iconname":"icon-dp_power2",
"id":1,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"work_mode",
"name":"模式",
"property": {
"range": ["white","colour","scene","scene_1","scene_2","scene_3","scene_4"],
"type":"enum"
},
"iconname":"icon-dp_mode",
"id":2,
"type":"obj",
"desc":"white:白光模式;colour:彩光模式;scene:场景模式;scene1-4:不同场景模式切换;可根据产品实际功能更改。"
},
{
"mode":"rw",
"code":"bright_value",
"name":"亮度",
"property": {
"unit":"",
"min":25,
"max":255,
"scale":0,
"step":1,
"type":"value"
},
"iconname":"icon-dp_light",
"id":3,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"temp_value",
"name":"冷暖",
"property": {
"unit":"",
"min":0,
"max":255,
"scale":0,
"step":1,
"type":"value"
},
"iconname":"icon-dp_sun",
"id":4,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"colour_data",
"name":"彩光模式数",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_light2",
"id":5,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"scene_data",
"name":"情景模式数",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_direction",
"id":6,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"flash_scene_1",
"name":"柔光模式",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_flower",
"id":7,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"flash_scene_2",
"name":"缤纷模式",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_dust",
"id":8,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"flash_scene_3",
"name":"炫彩模式",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_puzzle",
"id":9,
"type":"obj",
"desc":""
},
{
"mode":"rw",
"code":"flash_scene_4",
"name":"斑斓模式",
"property": {
"type":"string",
"maxlen":255
},
"iconname":"icon-dp_smile",
"id":10,
"type":"obj",
"desc":""
}
]
2.4GHz WiFi Color/Temp Smart Bulb
https://www.gearbest.com/smart-bulbs/pp_009552781601.html
[
{
"mode": "rw",
"code": "switch_led",
"name": "开关",
"property": {
"type": "bool"
},
"id": 20,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "work_mode",
"name": "模式",
"property": {
"range": ["white","colour","scene","music"],
"type": "enum"
},
"id": 21,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "bright_value",
"name": "亮度值",
"property": {
"unit": "",
"min": 10,
"max": 1000,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 22,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "temp_value",
"name": "冷暖值",
"property": {
"unit": "",
"min": 0,
"max": 1000,
"scale": 0,
"step": 1,
"type": "value"
},
"id": 23,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "colour_data",
"name": "彩光",
"property": {
"type": "string",
"maxlen": 255
},
"id": 24,
"type": "obj",
"desc": ""
},
{
"mode": "rw",
"code": "scene_data",
"name": "场景",
"property": {
"type": "string",
"maxlen": 255
},
"id": 25,
"type": "obj",
"desc": ""
}
]
4 AC switches 1 USB switch (note usb switch controls 4 USB ports) - 110v
Affiliate Link Jinvoo WiFi Smart Power Strip Surge Protector Plus 4 Outlet 4 USB Ports Charging Station,Works with Amazon Alexa
[
{
"code": "switch_s1",
"name": "\u5f00\u5173s1",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 1,
"desc": ""
},
{
"code": "switch_s2",
"name": "\u5f00\u5173s2",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 2,
"desc": ""
},
{
"code": "switch_s3",
"name": "\u5f00\u5173s3",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 3,
"desc": ""
},
{
"code": "switch_s4",
"name": "\u5f00\u5173s4",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 4,
"desc": ""
},
{
"code": "switch_usb",
"name": "\u5f00\u5173usb",
"mode": "rw",
"property": {
"type": "bool"
},
"type": "obj",
"id": 5,
"desc": ""
},
{
"code": "switch_all",
"name": "\u5168\u90e8\u5f00\u5173\u63a7\u5236",
"mode": "rw",
"property": {
"scale": 0,
"min": 0,
"max": 1,
"step": 1,
"type": "value",
"unit": "m"
},
"type": "obj",
"id": 6,
"desc": ""
}
]