diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 064de3d512e28..6f1d6d3f483f4 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -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 | | @@ -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 (zhimi.airpurifier.mc2) 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 (zhimi.fan.v1) Channels | Channel | Type | Description | @@ -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" +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. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index b7fbe5393ab14..244e0735b480d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java @@ -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), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json index ae5e035cb9fdb..58703ac57ec1e 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json @@ -11,7 +11,8 @@ "zhimi.airpurifier.sa1", "zhimi.airpurifier.sa2", "zhimi.airpurifier.mb1", - "zhimi.airpurifier.mc1" + "zhimi.airpurifier.mc1", + "zhimi.airpurifier.mc2" ], "channels": [ {