Skip to content

Commit

Permalink
The device will added as Air Purifier in Home app as the release of i…
Browse files Browse the repository at this point in the history
…OS 11.
  • Loading branch information
seikan committed Sep 22, 2017
1 parent 597d86a commit fd3ab91
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 111 deletions.
44 changes: 41 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# homebridge-mi-air-purifier

This is Xiaomi Mi Air Purifier plugin for [Homebridge](https://github.com/nfarina/homebridge). Since Apple Homekit is not supporting air purifier device yet, this plugin will add the air purifier as **Fan** and **Air Quality Sensor** to your Home app.
This is Xiaomi Mi Air Purifier plugin for [Homebridge](https://github.com/nfarina/homebridge). This plugin will add the air purifier and **Air Quality Sensor** to your Home app. This version is working with iOS 11 to add the device as air purifier in Home app.

![mi-air-purifier](https://cloud.githubusercontent.com/assets/73107/26249685/1d0ae78c-3cda-11e7-8b64-71e8d4323a3e.jpg)

### Features

* Switch on / off.

* Switch auto / manual mode.

* Turn parental mode on / off.

* Control modes:

- `Idle / Off`: Lift fan speed to 0% from Home app.
Expand Down Expand Up @@ -48,13 +52,47 @@ This is Xiaomi Mi Air Purifier plugin for [Homebridge](https://github.com/nfarin


2. Add following accessory to the `config.json`.
2. Make sure your Homebridge server is same network with your air purifier, then run following command to discover the token.

```
miio --discover --sync
```



3. You may need to wait few minutes until you get the response similar to below:

```
Device ID: 49466088
Model info: Unknown
Address: 192.168.1.8
Token: 6f7a65786550386c700a6b526666744d via auto-token
Support: Unknown
```


4. Record down the `Address` and `Token` values as we need it in our configuration file later.

5. If you are getting `??????????????` for your token value, please reset your device and connect your Homebridge server directly to the access point advertised by the device.

6. Then run the command again.

```
miio --discover --sync
```


7. Add following accessory to the `config.json`.

```
"accessories": [
{
"accessory": "MiAirPurifier",
"name": "Air Purifier",
"ip": "ADDRESS_OF_THE_AIR_PURIFIER",
"token": "TOKEN_FROM_STEP_3".
"showTemperature": true,
"showHumidity": true,
"showAirQuality": true
Expand All @@ -66,7 +104,7 @@ This is Xiaomi Mi Air Purifier plugin for [Homebridge](https://github.com/nfarin


3. Restart Homebridge, and your Mi air purifier will be discovered automatically.
8. Restart Homebridge, and your Mi air purifier will be added to Home app.



Expand Down
Loading

0 comments on commit fd3ab91

Please sign in to comment.