|
楼主 |
发表于 2018-1-31 21:31:35
|
显示全部楼层
朋友,按你的帖子已经成功了。但是在homekit中使用小米无线开关控制sonoff的时候要用两个动作分别控制sonoff的开和关。请问homebridge中如何实现sonoff的switch.toggle,我在config.json中分别试了以下这两段代码都无法实现sonoff的switch.toggle。麻烦您再给看看,如何让没有homeassistant的情况下,homekit+homebridge实现sonoff的switch.toggle。
{
"accessory": "mqtt-switch-tasmota",
"name": "Sonoff_5",
"url": "mqtt://192.168.1.55:1883",
"username": "pi",
"password": "1234567890",
"topics": {
"statusGet": "stat/S5/POWER",
"statusSet": "cmnd/S5/POWER"
}
},
{
"accessory": "mqtt-switch-tasmota",
"switchType": "outlet",
"name": "Sonoff_6",
"url": "mqtt://192.168.1.55:1883",
"username": "pi",
"password": "1234567890",
"topics": {
"statusGet": "stat/S6/RESULT",
"statusSet": "cmnd/S6/POWER",
"stateGet": "tele/S6/STATE"
},
"onValue": "ON",
"offValue": "OFF",
"activityTopic": "tele/S6/LWT",
"activityParameter": "Online",
"startCmd": "cmnd/S6/TelePeriod",
"startParameter": "60",
"manufacturer": "ITEAD",
"model": "Sonoff",
"serialNumberMAC": "68:C6:3A:A3:BE:E1"
}
|
|