Skip to content

Commit

Permalink
[miio] add zhimi.airpurifier.mc2 Purifier 2S (openhab#7944)
Browse files Browse the repository at this point in the history
* [miio] add zhimi.airpurifier.mc2 Purifier 2S

Adding "zhimi.airpurifier.mc2", "Mi Air Purifier 2S"

closes openhab#7931

* [miio] fixed indenting airpurifier

Signed-off-by: Marcel Verpaalen <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
  • Loading branch information
marcelrv authored and CSchlipp committed Jul 26, 2020
1 parent 3be6258 commit 487b96e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
46 changes: 46 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ However, for devices that are unsupported, you may override the value and try to
| XIAOMI MIJIA WIDETECH WDH318EFW1 Dehumidifier | miio:unsupported | nwt.derh.wdh318efw1 | No | |
| Mi Air Purifier mb1 | miio:basic | [zhimi.airpurifier.mb1](#zhimi-airpurifier-mb1) | Yes | |
| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc1](#zhimi-airpurifier-mc1) | Yes | |
| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc2](#zhimi-airpurifier-mc2) | Yes | |
| Mi Air Purifier virtual | miio:unsupported | zhimi.airpurifier.virtual | No | |
| Mi Air Purifier vtl m1 | miio:unsupported | zhimi.airpurifier.vtl_m1 | No | |
| Mi Remote v2 | miio:unsupported | chuangmi.ir.v2 | No | |
Expand Down Expand Up @@ -818,6 +819,27 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
| purifyvolume | Number | Purivied Volume |
| childlock | Switch | Child Lock |

### Mi Air Purifier 2S (<a name="zhimi-airpurifier-mc2">zhimi.airpurifier.mc2</a>) Channels

| Channel | Type | Description |
|------------------|---------|-------------------------------------|
| power | Switch | Power |
| mode | String | Mode |
| humidity | Number | Humidity |
| aqi | Number | Air Quality Index |
| averageaqi | Number | Average Air Quality Index |
| led | Switch | LED Status |
| buzzer | Switch | Buzzer Status |
| filtermaxlife | Number | Filter Max Life |
| filterhours | Number | Filter Hours used |
| usedhours | Number | Run Time |
| motorspeed | Number | Motor Speed |
| filterlife | Number | Filter Life |
| favoritelevel | Number | Favorite Level |
| temperature | Number | Temperature |
| purifyvolume | Number | Purivied Volume |
| childlock | Switch | Child Lock |

### Mi Smart Fan (<a name="zhimi-fan-v1">zhimi.fan.v1</a>) Channels

| Channel | Type | Description |
Expand Down Expand Up @@ -2330,6 +2352,30 @@ Number purifyvolume "Purivied Volume" (G_airpurifier) {channel="miio:basic:airpu
Switch childlock "Child Lock" (G_airpurifier) {channel="miio:basic:airpurifier:childlock"}
```

### Mi Air Purifier 2S (zhimi.airpurifier.mc2) item file lines

note: Autogenerated example. Replace the id (airpurifier) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.

```java
Group G_airpurifier "Mi Air Purifier 2S" <status>
Switch power "Power" (G_airpurifier) {channel="miio:basic:airpurifier:power"}
String mode "Mode" (G_airpurifier) {channel="miio:basic:airpurifier:mode"}
Number humidity "Humidity" (G_airpurifier) {channel="miio:basic:airpurifier:humidity"}
Number aqi "Air Quality Index" (G_airpurifier) {channel="miio:basic:airpurifier:aqi"}
Number averageaqi "Average Air Quality Index" (G_airpurifier) {channel="miio:basic:airpurifier:averageaqi"}
Switch led "LED Status" (G_airpurifier) {channel="miio:basic:airpurifier:led"}
Switch buzzer "Buzzer Status" (G_airpurifier) {channel="miio:basic:airpurifier:buzzer"}
Number filtermaxlife "Filter Max Life" (G_airpurifier) {channel="miio:basic:airpurifier:filtermaxlife"}
Number filterhours "Filter Hours used" (G_airpurifier) {channel="miio:basic:airpurifier:filterhours"}
Number usedhours "Run Time" (G_airpurifier) {channel="miio:basic:airpurifier:usedhours"}
Number motorspeed "Motor Speed" (G_airpurifier) {channel="miio:basic:airpurifier:motorspeed"}
Number filterlife "Filter Life" (G_airpurifier) {channel="miio:basic:airpurifier:filterlife"}
Number favoritelevel "Favorite Level" (G_airpurifier) {channel="miio:basic:airpurifier:favoritelevel"}
Number temperature "Temperature" (G_airpurifier) {channel="miio:basic:airpurifier:temperature"}
Number purifyvolume "Purivied Volume" (G_airpurifier) {channel="miio:basic:airpurifier:purifyvolume"}
Switch childlock "Child Lock" (G_airpurifier) {channel="miio:basic:airpurifier:childlock"}
```

### Mi Smart Fan (zhimi.fan.v1) item file lines

note: Autogenerated example. Replace the id (fan) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public enum MiIoDevices {
DEHUMIDIFIER_FW1("nwt.derh.wdh318efw1", "XIAOMI MIJIA WIDETECH WDH318EFW1 Dehumidifier", THING_TYPE_UNSUPPORTED),
ZHIMI_AIRPURIFIER_MB1("zhimi.airpurifier.mb1", "Mi Air Purifier mb1", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_MC1("zhimi.airpurifier.mc1", "Mi Air Purifier 2S", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_MC2("zhimi.airpurifier.mc2", "Mi Air Purifier 2S", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_VIRTUAL("zhimi.airpurifier.virtual", "Mi Air Purifier virtual", THING_TYPE_UNSUPPORTED),
ZHIMI_AIRPURIFIER_VTL_M1("zhimi.airpurifier.vtl_m1", "Mi Air Purifier vtl m1", THING_TYPE_UNSUPPORTED),
CHUANGMI_IR2("chuangmi.ir.v2", "Mi Remote v2", THING_TYPE_UNSUPPORTED),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"zhimi.airpurifier.sa1",
"zhimi.airpurifier.sa2",
"zhimi.airpurifier.mb1",
"zhimi.airpurifier.mc1"
"zhimi.airpurifier.mc1",
"zhimi.airpurifier.mc2"
],
"channels": [
{
Expand Down

0 comments on commit 487b96e

Please sign in to comment.