此部分将引导你接入小米无线插座至HomeBridge

首先请确认您安装了Homebridge,如果没有安装请参阅前面的教程。

本插件需要miio支持,请确认您已安装miio

目前支持的设备

1.MiPlugBase(米家智能插座基础版)
2.MiPlugBaseWithUSB(小米智能插座_USB版)
3.MiIntelligencePinboard(米家智能插线板)
4.MiQingPinboard(青米智能插线板_五孔位版)
5.MiQingPinboardWithUSB(青米智能插线板_USB版)


参数解析

参数 意义 示例值
type 设备类型 string PlugBase
ip 设备ip string 192.168.50.1
token 设备token string 47495361bbf65ac41f5e9369dba01b34
outletName 插座名字 string 客厅插座
outletDisable 是否禁用插座 true/false false
temperatureName 插座温度名字 string 客厅插座温度
temperatureDisable 是否禁用插座温度 true/false false
switchLEDName 插座LED灯开关名字 string 客厅插座LED灯
switchLEDDisable 是否禁用插座LED灯开关 true/false false
switchUSBName 插座USB开关名字 string 客厅插座USB
switchUSBDisable 是否禁用插座USB开关 true/false false

  1. 安装插件 homebridge-mi-outlet
  2. 修改config.json,按照如下例子进行添加:
"platforms": [{
    "platform": "MiOutletPlatform",
    "deviceCfgs": [{
        "type": "MiPlugBase",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "living room outlet",
        "outletDisable": false,
        "temperatureName": "living room outlet temperature",
        "temperatureDisable": false,
        "switchLEDName": "living room led light switch",
        "switchLEDDisable": false
    }, {
        "type": "MiPlugBaseWithUSB",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "study room outlet",
        "outletDisable": false,
        "temperatureName": "study room outlet temperature",
        "temperatureDisable": false,
        "switchUSBName": "study room outlet usb switch",
        "switchUSBDisable": false
    }, {
        "type": "MiIntelligencePinboard",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "master room outlet",
        "outletDisable": false,
        "temperatureName": "master room outlet temperature",
        "temperatureDisable": false,
        "switchLEDName": "master room led light switch",
        "switchLEDDisable": false
    }, {
        "type": "MiQingPinboard",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "dining room outlet",
        "outletDisable": false,
        "temperatureName": "dining room outlet temperature",
        "temperatureDisable": false
    }, {
        "type": "MiQingPinboardWithUSB",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "kitchen room outlet",
        "outletDisable": false,
        "temperatureName": "kitchen room outlet temperature",
        "temperatureDisable": false
    }]
}]
  1. 保存config.json,启动Homebridge进行测试。