此部分将引导你接入小米空气净化器至HomeBridge

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

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

当前支持的设备:

1.MiAirPurifier(小米空气净化器)
2.MiAirPurifier2(小米空气净化器2)
3.MiAirPurifierPro(小米空气净化器Pro)
4.MiAirPurifier2S(小米空气净化器2S)


参数解析

参数 意义 示例值
type 设备类型 string AirPurifier
ip 设备ip string 192.168.50.1
token 设备token string 32a81458d48f4da8456c014037066857
airPurifierDisable 是否显示并启用净化器 true/false true
airPurifierName 空气净化器名称 string 空气净化器
silentModeSwitchDisable 是否显示静音模式按钮 true/false true
silentModeSwitchName 静音模式按钮名称 string 静音模式
buzzerSwitchDisable 是否显示蜂鸣器开关按钮 true/false true
buzzerSwitchName 蜂鸣器开关按钮名称 string 净化器蜂鸣器开关
ledBulbDisable 是否显示led灯开关 true/false true
ledBulbName led灯泡名字 string 净化器led灯
airQualityDisable 是否显示空气质量 true/false true
airQualityName 空气质量名称 string 空气质量

  1. 安装插件 homebridge-mi-airpurifier
  2. 修改config.json,按照如下例子进行添加:
"platforms": [{
    "platform": "MiAirPurifierPlatform",
    "deviceCfgs": [{
        "type": "MiAirPurifier",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "airPurifierDisable": false,
        "airPurifierName": "AirPurifier",
        "silentModeSwitchDisable": false,
        "silentModeSwitchName": "AirPurifier Silent Mode Switch",
        "buzzerSwitchDisable": true,
        "buzzerSwitchName": "AirPurifier Buzzer Switch",
        "ledBulbDisable": true,
        "ledBulbName": "AirPurifier LED Switch",
        "airQualityDisable": false,
        "airQualityName": "AirQuality"
    }, {
        "type": "MiAirPurifier2",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "airPurifierDisable": false,
        "airPurifierName": "AirPurifier",
        "silentModeSwitchDisable": false,
        "silentModeSwitchName": "AirPurifier Silent Mode Switch",
        "temperatureDisable": false,
        "temperatureName": "Temperature",
        "humidityDisable": false,
        "humidityName": "Humidity",
        "buzzerSwitchDisable": true,
        "buzzerSwitchName": "AirPurifier Buzzer Switch",
        "ledBulbDisable": true,
        "ledBulbName": "AirPurifier LED Switch",
        "airQualityDisable": false,
        "airQualityName": "AirQuality"
    }, {
        "type": "MiAirPurifierPro",
        "ip": "192.168.88.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "airPurifierDisable": false,
        "airPurifierName": "AirPurifier",
        "silentModeSwitchDisable": false,
        "silentModeSwitchName": "AirPurifier Silent Mode Switch",
        "temperatureDisable": false,
        "temperatureName": "Temperature",
        "humidityDisable": false,
        "humidityName": "Humidity",
        "buzzerSwitchDisable": true,
        "buzzerSwitchName": "AirPurifier Buzzer Switch",
        "ledBulbDisable": true,
        "ledBulbName": "AirPurifier LED Switch",
        "airQualityDisable": false,
        "airQualityName": "AirQuality"
    }]
}]
  1. 保存config.json,启动Homebridge进行测试。