本帖最后由 ptlzx 于 2018-4-22 21:46 编辑
直接用root过的安卓手机或模拟器,打开/data/data/com.xiaomi.smarthome/files/里面有个.json文件,所有你已经录制的遥控码都在里面。效果见后图:
问一下如何重复使用自定义开关,我定义两个Custom段,代码检测通过,执行就出错,一个就可以。日志显示:Type Error: Cannot read property 'indexOf' of undefined
{
"type": "Custom",
"ip": "192.168.31.xx",
"token": "xxx",
"Name": "[b][color=#ff0000]Custom-1[/color][/b]",
"data": {
"on": {
"0": "0|xxx",
"1": "2|xxx",
"2": "5|xxx"
},
"off": {
"0": "1|xxx"
}
}
},
{
"type": "Custom",
"ip": "192.168.31.xx",
"token": "xxx",
"Name": "[b][color=#ff0000]Custom-2[/color][/b]",
"data": {
"on": {
"0": "0|xxx",
"1": "2|xxx",
"2": "5|xxx"
},
"off": {
"0": "1|xxx"
}
}
},
|