acc-ua / homebridge-xiaomi-humidifier

Xiaomi Humidifier plugin for HomeBridge.
9 stars 9 forks source link

homebridge-mi-humidifier

Xiaomi Humidifier plugin for HomeBridge. Plugin is based on On HomeKit Fan service currently.

Thanks for Mr.Yin , nfarina(the author of homebridge), OpenMiHome, aholstenson(the author of miio), all other developer and testers.

Installation

  1. Install HomeBridge, please follow it's README.
    If you are using Raspberry Pi, please read Running-HomeBridge-on-a-Raspberry-Pi.
  2. Make sure you can see HomeBridge in your iOS devices, if not, please go back to step 1.
  3. Install packages.
    npm install -g miio homebridge-xiaomi-humidifier

    Configuration

    "type" is optional, "Fan" value means that device will be displayed as Fan device, otherwise - as Humidifier/Dehumidifier device (iOS 11 and above)

"platforms": [{
    "platform": "MiHumidifierPlatform",
    "deviceCfgs": [{
        "ip": "192.168.1.xxx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "deviceName": "room Humidifer",
        "deviceDisable": false,
        "temperatureName": "room temperature",
        "temperatureDisable": false,
        "humidityName": "room humidity",
        "humidityDisable": false,
        "buzzerSwitchName": "Humidifer buzzer switch",
        "buzzerSwitchDisable": true,
        "ledBulbName": "Humidifer led switch",
        "ledBulbDisable": true,
        "type":"Fan"  
    }]
}]

Get token

Open command prompt or terminal. Run following command:

miio --discover

Wait until you get output similar to this:

Device ID: xxxxxxxx   
Model info: Unknown   
Address: 192.168.88.xx   
Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx via auto-token   
Support: Unknown   

"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" is token.
If token is "???", then reset device and connect device created Wi-Fi hotspot.
Run following command:

miio --discover --sync

Wait until you get output.
For more information about token, please refer to OpenMiHome and miio.

Version Logs

0.0.1

1.support for XiaoMi Humidifier as Fan Service (HomeKit Humidifier type is not available yet).