diff --git a/bundles/org.openhab.binding.miio/README.base.md b/bundles/org.openhab.binding.miio/README.base.md index 1171656d9..ef881f444 100644 --- a/bundles/org.openhab.binding.miio/README.base.md +++ b/bundles/org.openhab.binding.miio/README.base.md @@ -15,6 +15,8 @@ The following things types are available: | miio:generic | Generic type for discovered devices. Once the token is available and the device model is determined, this ThingType will automatically change to the appropriate ThingType | | miio:vacuum | For Xiaomi/RoboRock Robot Vacuum products | | miio:basic | For most other devices like yeelights, airpurifiers. Channels and commands are determined by database configuration | +| miio:gateway | Similar to basic, but with the Bridge feature, it can support to forward commands for connected devices | +| miio:lumi | Thing type for subdevices connected to the gateway. Note, these devices require a defined gateway to function | | miio:unsupported | For experimenting with other devices which use the Mi IO protocol or to build experimental support | # Discovery @@ -86,6 +88,7 @@ However, for devices that are unsupported, you may override the value and try to Note: Suggest to use the cloud communication only for devices that require it. It is unknown at this time if Xiaomi has a rate limit or other limitations on the cloud usage. e.g. if having many devices would trigger some throttling from the cloud side. +Note2: communications parameter is not available for lumi devices. Lumi devices communicate using the bridge/gateway. ### Example Thing file @@ -95,6 +98,11 @@ or in case of unknown models include the model information of a similar device t `Thing miio:vacuum:s50 "vacuum" @ "livingroom" [ host="192.168.15.20", token="xxxxxxx", deviceId="326xxxx", model="roborock.vacuum.s4", communication="direct", cloudServer="de" ]` +in case of gateway, instead of defining it as a Thing, use Bridge + +`Bridge miio:gateway:lumigateway "Mi Smarter Gateway" [ host="10.10.x.x", token="put here your token", deviceId="326xxxx", model="lumi.gateway.mieu01", communication="direct", cloudServer="de" ]` + + # Advanced: Unsupported devices Newer devices may not yet be supported. @@ -177,6 +185,9 @@ This will change the communication method and the Mi IO binding can communicate # Mi IO Devices !!!devices +note: Supported means we received feedback from users this device is working with the binding. +For devices with experimental support, we did not yet confirmation that channels are correctly working. +Please feedback your findings for these devices (e.g. Are all channels working, do they contain the right information, is controlling the devices working etc.) # Channels diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 4a429d74c..84c287bc9 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -15,6 +15,8 @@ The following things types are available: | miio:generic | Generic type for discovered devices. Once the token is available and the device model is determined, this ThingType will automatically change to the appropriate ThingType | | miio:vacuum | For Xiaomi/RoboRock Robot Vacuum products | | miio:basic | For most other devices like yeelights, airpurifiers. Channels and commands are determined by database configuration | +| miio:gateway | Similar to basic, but with the Bridge feature, it can support to forward commands for connected devices | +| miio:lumi | Thing type for subdevices connected to the gateway. Note, these devices require a defined gateway to function | | miio:unsupported | For experimenting with other devices which use the Mi IO protocol or to build experimental support | # Discovery @@ -86,6 +88,7 @@ However, for devices that are unsupported, you may override the value and try to Note: Suggest to use the cloud communication only for devices that require it. It is unknown at this time if Xiaomi has a rate limit or other limitations on the cloud usage. e.g. if having many devices would trigger some throttling from the cloud side. +Note2: communications parameter is not available for lumi devices. Lumi devices communicate using the bridge/gateway. ### Example Thing file @@ -95,6 +98,11 @@ or in case of unknown models include the model information of a similar device t `Thing miio:vacuum:s50 "vacuum" @ "livingroom" [ host="192.168.15.20", token="xxxxxxx", deviceId="326xxxx", model="roborock.vacuum.s4", communication="direct", cloudServer="de" ]` +in case of gateway, instead of defining it as a Thing, use Bridge + +`Bridge miio:gateway:lumigateway "Mi Smarter Gateway" [ host="10.10.x.x", token="put here your token", deviceId="326xxxx", model="lumi.gateway.mieu01", communication="direct", cloudServer="de" ]` + + # Advanced: Unsupported devices Newer devices may not yet be supported. @@ -176,350 +184,372 @@ This will change the communication method and the Mi IO binding can communicate # Mi IO Devices -Currently the miio binding supports more than 310 different models. +Currently the miio binding supports more than 330 different models. -| Device | ThingType | Device Model | Supported | Remark | -|------------------------------|------------------|------------------------|-----------|------------| -| AUX Smart Air Conditioner | miio:unsupported | aux.aircondition.v1 | No | | -| Mi Air Frying Pan | miio:basic | [careli.fryer.maf01](#careli-fryer-maf01) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Fryer (3.5L) | miio:basic | [careli.fryer.maf02](#careli-fryer-maf02) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Air Frying Pan | miio:basic | [careli.fryer.maf03](#careli-fryer-maf03) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Qingping Air Monitor Lite | miio:basic | [cgllc.airm.cgdn1](#cgllc-airm-cgdn1) | Yes | | -| Mi Multifunction Air Monitor | miio:basic | [cgllc.airmonitor.b1](#cgllc-airmonitor-b1) | Yes | | -| Qingping Air Monitor | miio:basic | [cgllc.airmonitor.s1](#cgllc-airmonitor-s1) | Yes | | -| Mi Universal Remote | miio:unsupported | chuangmi.ir.v2 | No | | -| Mi Smart Power Plug 2 (Wi-Fi and Bluetooth Gateway) | miio:basic | [chuangmi.plug.212a01](#chuangmi-plug-212a01) | Yes | | -| Mi Smart Plug WiFi | miio:basic | [chuangmi.plug.hmi205](#chuangmi-plug-hmi205) | Yes | | -| Mi Smart Plug (WiFi) | miio:basic | [chuangmi.plug.hmi206](#chuangmi-plug-hmi206) | Yes | | -| Mi Smart Wi-Fi Plug (Bluetooth Gateway) | miio:basic | [chuangmi.plug.hmi208](#chuangmi-plug-hmi208) | Yes | | -| Mi Plug Mini | miio:basic | [chuangmi.plug.m1](#chuangmi-plug-m1) | Yes | | -| Mi Smart Plug (Wi-Fi) Basic | miio:basic | [chuangmi.plug.m3](#chuangmi-plug-m3) | Yes | | -| Mi Smart Power Plug | miio:basic | [chuangmi.plug.v1](#chuangmi-plug-v1) | Yes | | -| Mi Smart Power Plug v2 | miio:basic | [chuangmi.plug.v2](#chuangmi-plug-v2) | Yes | | -| MIJIA Smart Plug Enhanced | miio:basic | [chuangmi.plug.v3](#chuangmi-plug-v3) | Yes | | -| Mi Remote | miio:unsupported | chuangmi.remote.v2 | No | | -| Mi IH Rice Cooker | miio:unsupported | chunmi.cooker.normal1 | No | | -| Mi IH Rice Cooker | miio:unsupported | chunmi.cooker.normal2 | No | | -| Mi IH Rice Cooker 4L | miio:unsupported | chunmi.cooker.normal4 | No | | -| Mi IH Pressure Rice Cooker | miio:unsupported | chunmi.cooker.press1 | No | | -| Mi IH Pressure Rice Cooker | miio:unsupported | chunmi.cooker.press2 | No | | -| Gosund Smart Plug | miio:basic | [cuco.plug.cp1](#cuco-plug-cp1) | Yes | | -| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq](#deerma-humidifier-jsq) | Yes | | -| Mi S Smart Humidifer | miio:basic | [deerma.humidifier.jsq1](#deerma-humidifier-jsq1) | Yes | | -| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq5](#deerma-humidifier-jsq5) | Yes | | -| Mi Smart Humidifer S | miio:basic | [deerma.humidifier.jsqs](#deerma-humidifier-jsqs) | Yes | | -| Mi Smart Humidifier | miio:basic | [deerma.humidifier.mjjsq](#deerma-humidifier-mjjsq) | Yes | | -| Mi Fresh Air Ventilator A1-150 | miio:basic | [dmaker.airfresh.a1](#dmaker-airfresh-a1) | Yes | | -| Mi Fresh Air Ventilator | miio:basic | [dmaker.airfresh.t2017](#dmaker-airfresh-t2017) | Yes | | -| Mi Smart Standing Fan 2 Lite | miio:basic | [dmaker.fan.1c](#dmaker-fan-1c) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Standing Fan 1X | miio:basic | [dmaker.fan.p5](#dmaker-fan-p5) | Yes | | -| Mi Smart Standing Fan 1C | miio:basic | [dmaker.fan.p8](#dmaker-fan-p8) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Tower Fan | miio:basic | [dmaker.fan.p9](#dmaker-fan-p9) | Yes | | -| Mi Smart Standing Fan 2 | miio:basic | [dmaker.fan.p10](#dmaker-fan-p10) | Yes | | -| Mi Smart Standing Fan Pro | miio:basic | [dmaker.fan.p15](#dmaker-fan-p15) | Yes | Identified manual actions for execution
`action{"did":"off-delay-time-toggle","siid":3,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel. | -| Mi Smart Standing Fan 2 | miio:basic | [dmaker.fan.p18](#dmaker-fan-p18) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Robot Vacuum Mop 1C STYTJ01ZHM | miio:basic | [dreame.vacuum.mc1808](#dreame-vacuum-mc1808) | Yes | | -| Dreame Robot Vacuum-Mop F9 | miio:basic | [dreame.vacuum.p2008](#dreame-vacuum-p2008) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Dreame Robot Vacuum D9 | miio:basic | [dreame.vacuum.p2009](#dreame-vacuum-p2009) | Yes | | -| Dreame Bot W10 | miio:basic | [dreame.vacuum.p2027](#dreame-vacuum-p2027) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Dreame Bot Z10 Pro | miio:basic | [dreame.vacuum.p2028](#dreame-vacuum-p2028) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Trouver Robot LDS Vacuum-Mop Finder | miio:basic | [dreame.vacuum.p2036](#dreame-vacuum-p2036) | Yes | | -| Mi Robot Vacuum-Mop 2 Pro+ | miio:basic | [dreame.vacuum.p2041o](#dreame-vacuum-p2041o) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MOVA Z500 Robot Vacuum and Mop Cleaner | miio:basic | [dreame.vacuum.p2156o](#dreame-vacuum-p2156o) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MOVA L600 Robot Vacuum and Mop Cleaner | miio:basic | [dreame.vacuum.p2157](#dreame-vacuum-p2157) | Yes | | -| Dreame Bot D9 Max | miio:basic | [dreame.vacuum.p2259](#dreame-vacuum-p2259) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO ARIES For Bedroom | miio:basic | [huayi.light.ari013](#huayi-light-ari013) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO ARIES For Living Room | miio:basic | [huayi.light.aries](#huayi-light-aries) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO Fan Light | miio:basic | [huayi.light.fanwy](#huayi-light-fanwy) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO Fan Light(2020) | miio:basic | [huayi.light.fanwy2](#huayi-light-fanwy2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO PEGASUS For Living Room | miio:basic | [huayi.light.peg091](#huayi-light-peg091) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO PEGASUS For Bedroom | miio:basic | [huayi.light.peg093](#huayi-light-peg093) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO PISCES For Bedroom | miio:basic | [huayi.light.pis123](#huayi-light-pis123) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO PISCES For Living Room | miio:basic | [huayi.light.pisces](#huayi-light-pisces) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO TAURUS For Bedroom | miio:basic | [huayi.light.tau023](#huayi-light-tau023) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO TAURUS For Living Room | miio:basic | [huayi.light.taurus](#huayi-light-taurus) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO VIRGO For Bedroom | miio:basic | [huayi.light.vir063](#huayi-light-vir063) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO VIRGO For Living Room | miio:basic | [huayi.light.virgo](#huayi-light-virgo) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO Ceiling Light | miio:basic | [huayi.light.wy](#huayi-light-wy) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO LIANGCHEN(BLE Mesh) | miio:basic | [huayi.light.wy200](#huayi-light-wy200) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO SAG Downlight (BLE Mesh) | miio:basic | [huayi.light.wy201](#huayi-light-wy201) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO Bulb (BLE Mesh) | miio:basic | [huayi.light.wy202](#huayi-light-wy202) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO YONG Downlight (BLE Mesh) | miio:basic | [huayi.light.wy203](#huayi-light-wy203) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| huayi.light.wy204 | miio:basic | [huayi.light.wy204](#huayi-light-wy204) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO Heating Lamp | miio:basic | [huayi.light.wyheat](#huayi-light-wyheat) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| HUIZUO ZIWEI Ceiling Lamp | miio:basic | [huayi.light.zw131](#huayi-light-zw131) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MiJia Rice Cooker | miio:unsupported | hunmi.cooker.normal3 | No | | -| Jinxing Smart Air Conditioner | miio:unsupported | idelan.aircondition.v1 | No | | -| Aqara Wall Switch(No Neutral, Single Rocker) | miio:unsupported | lumi.ctrl_neutral1.v1 | No | | -| Aqara Wall Switch (No Neutral, Double Rocker) | miio:unsupported | lumi.ctrl_neutral2.v1 | No | | -| Xiaomiyoupin Curtain Controller (Wi-Fi) | miio:basic | [lumi.curtain.hagl05](#lumi-curtain-hagl05) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Air Purifier virtual | miio:basic | [lumi.gateway.mgl03](#lumi-gateway-mgl03) | Yes | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi smart Home Gateway Hub v1 | miio:basic | [lumi.gateway.v1](#lumi-gateway-v1) | Yes | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi smart Home GatewayHub v2 | miio:basic | [lumi.gateway.v2](#lumi-gateway-v2) | Yes | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi smart Home Gateway Hub v3 | miio:basic | [lumi.gateway.v3](#lumi-gateway-v3) | Yes | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi smart Home Gateway Hub | miio:basic | [lumi.gateway.mieu01](#lumi-gateway-mieu01) | Yes | Used to control the gateway itself. Controlling child devices currently only possible via rules | -| Midea AC-i Youth | miio:unsupported | midea.aircondition.v1 | No | | -| Midea Air Conditioner v2 | miio:unsupported | midea.aircondition.v2 | No | | -| Midea AC-Cool Golden | miio:unsupported | midea.aircondition.xa1 | No | | -| Mi Robot Vacuum-Mop Essential | miio:basic | [mijia.vacuum.v2](#mijia-vacuum-v2) | Yes | This device may be overwhelmed if refresh is too frequent, slowing down the responses. Suggest to increase refresh time to 120 seconds | -| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s1](#mmgg-pet_waterer-s1) | Yes | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s2](#mmgg-pet_waterer-s2) | Yes | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s3](#mmgg-pet_waterer-s3) | Yes | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| XIAOWAN Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s4](#mmgg-pet_waterer-s4) | Yes | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MR.BOND | miio:basic | [mrbond.airer.m1pro](#mrbond-airer-m1pro) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MR.BOND | miio:basic | [mrbond.airer.m1s](#mrbond-airer-m1s) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| MR.BOND | miio:basic | [mrbond.airer.m1super](#mrbond-airer-m1super) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| WIDETECH WDH318EFW1 Internet Dehumidifier | miio:basic | [nwt.derh.wdh318efw1](#nwt-derh-wdh318efw1) | Yes | | -| Philips Zhirui Ceiling Lamp Bedroom 40W | miio:basic | [philips.light.bceiling1](#philips-light-bceiling1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips Zhirui Ceiling Lamp Bedroom 28W | miio:basic | [philips.light.bceiling2](#philips-light-bceiling2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips ZhiRui E27 bulb | miio:basic | [philips.light.bulb](#philips-light-bulb) | Yes | | -| Philips ZhiRui E14 Candle Lamp Frosted version | miio:basic | [philips.light.candle](#philips-light-candle) | Yes | | -| Philips ZhiRui E14 Candle Lamp Crystal version | miio:basic | [philips.light.candle2](#philips-light-candle2) | Yes | | -| Mijia Philips Color Bulb | miio:basic | [philips.light.cbulb](#philips-light-cbulb) | Yes | | -| Philips Light | miio:basic | [philips.light.cbulbs](#philips-light-cbulbs) | Yes | | -| Philips Connected Ceiling | miio:basic | [philips.light.ceiling](#philips-light-ceiling) | Yes | | -| Philips Light | miio:basic | [philips.light.dcolor](#philips-light-dcolor) | Yes | | -| ZhiRui Dimmable Downlight | miio:basic | [philips.light.dlight](#philips-light-dlight) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips ZhiRui Downlight | miio:basic | [philips.light.downlight](#philips-light-downlight) | Yes | | -| Philips Wi-Fi bulb E27 White | miio:basic | [philips.light.hbulb](#philips-light-hbulb) | Yes | | -| Philips ZhiYi Ceiling Lamp FL 40W | miio:basic | [philips.light.lnblight1](#philips-light-lnblight1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips ZhiYi Ceiling Lamp FL 28W | miio:basic | [philips.light.lnblight2](#philips-light-lnblight2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips ZhiYi Ceiling Lamp FL 80W | miio:basic | [philips.light.lnlrlight](#philips-light-lnlrlight) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips Zhirui Ceiling Lamp Living room 80W | miio:basic | [philips.light.lrceiling](#philips-light-lrceiling) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Nordic 80W | miio:basic | [philips.light.mceil](#philips-light-mceil) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Nordic 40W | miio:basic | [philips.light.mceilm](#philips-light-mceilm) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Nordic 28W | miio:basic | [philips.light.mceils](#philips-light-mceils) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips Smart Lamp | miio:basic | [philips.light.mono1](#philips-light-mono1) | Yes | | -| Philips ZhiRui Bedside Lamp | miio:basic | [philips.light.moonlight](#philips-light-moonlight) | Yes | | -| Zhirui Ceiling Lamp Black 80W | miio:basic | [philips.light.obceil](#philips-light-obceil) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Black 40W | miio:basic | [philips.light.obceim](#philips-light-obceim) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Black 28W | miio:basic | [philips.light.obceis](#philips-light-obceis) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mijia Philips Study Desk Lamp | miio:basic | [philips.light.rwread](#philips-light-rwread) | Yes | | -| Zhirui Ceiling Lamp Starry 80W | miio:basic | [philips.light.sceil](#philips-light-sceil) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Starry 40W | miio:basic | [philips.light.sceilm](#philips-light-sceilm) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Starry 28W | miio:basic | [philips.light.sceils](#philips-light-sceils) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips EyeCare Connected Desk Lamp gen2. | miio:basic | [philips.light.sread1](#philips-light-sread1) | Yes | | -| Mijia Philips Desk Lamp 2S | miio:basic | [philips.light.sread2](#philips-light-sread2) | Yes | | -| Philips Connected Lights | miio:basic | [philips.light.virtual](#philips-light-virtual) | Yes | | -| Zhirui Ceiling Lamp Gorgeous 80W | miio:basic | [philips.light.xzceil](#philips-light-xzceil) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Gorgeous 40W | miio:basic | [philips.light.xzceim](#philips-light-xzceim) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Zhirui Ceiling Lamp Gorgeous 28W | miio:basic | [philips.light.xzceis](#philips-light-xzceis) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Philips ZhiYi Ceiling lamp | miio:basic | [philips.light.zyceiling](#philips-light-zyceiling) | Yes | | -| Philips ZhiYi Desk Lamp | miio:basic | [philips.light.zysread](#philips-light-zysread) | Yes | | -| Philips ZhiYi Strip | miio:basic | [philips.light.zystrip](#philips-light-zystrip) | Yes | | -| CHINGMI Smart Power Strip v1 | miio:basic | [qmi.powerstrip.v1](#qmi-powerstrip-v1) | Yes | | -| Rockrobo Xiaowa Sweeper v2 | miio:unsupported | roborock.sweeper.e2v2 | No | | -| Rockrobo Xiaowa Sweeper v3 | miio:unsupported | roborock.sweeper.e2v3 | No | | -| Roborock S6 Pure | miio:vacuum | [roborock.vacuum.a08](#roborock-vacuum-a08) | Yes | | -| Roborock T7 Pro | miio:vacuum | [roborock.vacuum.a09](#roborock-vacuum-a09) | Yes | | -| Roborock S6 MaxV | miio:vacuum | [roborock.vacuum.a10](#roborock-vacuum-a10) | Yes | | -| Roborock T7 | miio:vacuum | [roborock.vacuum.a11](#roborock-vacuum-a11) | Yes | | -| Roborock T7S | miio:vacuum | [roborock.vacuum.a14](#roborock-vacuum-a14) | Yes | | -| Roborock S7 | miio:vacuum | [roborock.vacuum.a15](#roborock-vacuum-a15) | Yes | | -| Roborock S4 Max | miio:vacuum | [roborock.vacuum.a19](#roborock-vacuum-a19) | Yes | | -| Roborock T7S Plus | miio:vacuum | [roborock.vacuum.a23](#roborock-vacuum-a23) | Yes | | -| Xiaowa C1 | miio:vacuum | [roborock.vacuum.c1](#roborock-vacuum-c1) | Yes | | -| Roborock Xiaowa E Series Vacuum v2 | miio:unsupported | roborock.vacuum.e2 | No | | -| Mi Robot Vacuum 1S | miio:vacuum | [roborock.vacuum.m1s](#roborock-vacuum-m1s) | Yes | | -| Roborock P5 | miio:vacuum | [roborock.vacuum.p5](#roborock-vacuum-p5) | Yes | | -| Roborock S4 | miio:vacuum | [roborock.vacuum.s4](#roborock-vacuum-s4) | Yes | | -| Roborock Vacuum S4v2 | miio:vacuum | [roborock.vacuum.s4v2](#roborock-vacuum-s4v2) | Yes | | -| Roborock S5 | miio:vacuum | [roborock.vacuum.s5](#roborock-vacuum-s5) | Yes | | -| Roborock S5 Max | miio:vacuum | [roborock.vacuum.s5e](#roborock-vacuum-s5e) | Yes | | -| Roborock S6 | miio:vacuum | [roborock.vacuum.s6](#roborock-vacuum-s6) | Yes | | -| Roborock T4 | miio:vacuum | [roborock.vacuum.t4](#roborock-vacuum-t4) | Yes | | -| Roborock Vacuum T4 v2 | miio:vacuum | [roborock.vacuum.t4v2](#roborock-vacuum-t4v2) | Yes | | -| Roborock Vacuum T4 v3 | miio:vacuum | [roborock.vacuum.t4v3](#roborock-vacuum-t4v3) | Yes | | -| Roborock T6 | miio:vacuum | [roborock.vacuum.t6](#roborock-vacuum-t6) | Yes | | -| Roborock Vacuum T6 v2 | miio:vacuum | [roborock.vacuum.t6v2](#roborock-vacuum-t6v2) | Yes | | -| Roborock Vacuum T6 v3 | miio:vacuum | [roborock.vacuum.t6v3](#roborock-vacuum-t6v3) | Yes | | -| Roborock Vacuum T7 | miio:vacuum | [roborock.vacuum.t7](#roborock-vacuum-t7) | Yes | | -| Roborock Vacuum T7p | miio:vacuum | [roborock.vacuum.t7p](#roborock-vacuum-t7p) | Yes | | -| Roborock Vacuum T7 v2 | miio:vacuum | [roborock.vacuum.t7pv2](#roborock-vacuum-t7pv2) | Yes | | -| Roborock Vacuum T7 v3 | miio:vacuum | [roborock.vacuum.t7pv3](#roborock-vacuum-t7pv3) | Yes | | -| Roborock Vacuum T7 v2 | miio:vacuum | [roborock.vacuum.t7v2](#roborock-vacuum-t7v2) | Yes | | -| Roborock Vacuum T7 v3 | miio:vacuum | [roborock.vacuum.t7v3](#roborock-vacuum-t7v3) | Yes | | -| Roborock Vacuum S6 | miio:vacuum | [rockrobo.vacuum.s6](#rockrobo-vacuum-s6) | Yes | | -| Mi Robot Vacuum | miio:vacuum | [rockrobo.vacuum.v1](#rockrobo-vacuum-v1) | Yes | | -| ROIDMI EVE vacuum | miio:basic | [roidmi.vacuum.v60](#roidmi-vacuum-v60) | Yes | | -| PTX OneKey Switch (WIFI) | miio:basic | [090615.switch.xswitch01](#090615-switch-xswitch01) | Yes | | -| PTX Twokey switch(wifi) | miio:basic | [090615.switch.xswitch02](#090615-switch-xswitch02) | Yes | | -| PTX ThreeKey Switch (WIFI) | miio:basic | [090615.switch.xswitch03](#090615-switch-xswitch03) | Yes | | -| SCISHARE Smart Capsule Coffee Machine | miio:basic | [scishare.coffee.s1102](#scishare-coffee-s1102) | Yes | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Xiaomi Scishare Smart Capsule Coffee Machine | miio:basic | [scishare.coffee.s1301](#scishare-coffee-s1301) | Yes | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Soocare Electric Toothbrush | miio:unsupported | soocare.toothbrush.x3 | No | | -| Viomi Internet Refrigerator iLive(French style 462L) | miio:unsupported | viomi.fridge.v3 | No | | -| Viomi Cleaning Robot V-RVCLM21B | miio:basic | [viomi.vacuum.v6](#viomi-vacuum-v6) | Yes | | -| Mi Robot Vacuum-Mop P | miio:basic | [viomi.vacuum.v7](#viomi-vacuum-v7) | Yes | | -| Mi Robot Vacuum-Mop P | miio:basic | [viomi.vacuum.v8](#viomi-vacuum-v8) | Yes | | -| Viomi S9 | miio:basic | [viomi.vacuum.v18](#viomi-vacuum-v18) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| VIOMI Internet Electric Water Heater 1A (60L) | miio:basic | [viomi.waterheater.e1](#viomi-waterheater-e1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Inverter Air Conditioner (1.5HP) | miio:basic | [xiaomi.aircondition.ma1](#xiaomi-aircondition-ma1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Inverter Air Conditioner (1.5HP, China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma2](#xiaomi-aircondition-ma2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Vertical Air Conditioner (2HP) | miio:basic | [xiaomi.aircondition.ma4](#xiaomi-aircondition-ma4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Vertical Air Conditioner C1 (2HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma5](#xiaomi-aircondition-ma5) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner C1 (1.5HP / Conventional / China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.ma6](#xiaomi-aircondition-ma6) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner C1 (1HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma9](#xiaomi-aircondition-ma9) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mc1](#xiaomi-aircondition-mc1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mc2](#xiaomi-aircondition-mc2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc4](#xiaomi-aircondition-mc4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc5](#xiaomi-aircondition-mc5) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Vertical Air Conditioner A (2HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc6](#xiaomi-aircondition-mc6) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Vertical Air Conditioner A (3HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc7](#xiaomi-aircondition-mc7) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Air Conditioner(1.5HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mc8](#xiaomi-aircondition-mc8) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Vertical Air Conditioner(2HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mc9](#xiaomi-aircondition-mc9) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Vertical Air Conditioner (2HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.c10](#xiaomi-aircondition-c10) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Vertical Air Conditioner (3HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.c11](#xiaomi-aircondition-c11) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner C (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mh1](#xiaomi-aircondition-mh1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner C (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mh2](#xiaomi-aircondition-mh2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Air Conditioner(1HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mh3](#xiaomi-aircondition-mh3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner X (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt1](#xiaomi-aircondition-mt1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Air Conditioner X (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt2](#xiaomi-aircondition-mt2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Gentle Breeze Air Conditioner (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt3](#xiaomi-aircondition-mt3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Gentle Breeze Air Conditioner (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt4](#xiaomi-aircondition-mt4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Gentle Breeze Vertical Air Conditioner (3HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt5](#xiaomi-aircondition-mt5) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Air Conditioner (1HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt7](#xiaomi-aircondition-mt7) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Ultra Electricity Saving Air Conditioner (1.5HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt8](#xiaomi-aircondition-mt8) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Wi-Fi Repeater 2 | miio:unsupported | xiaomi.repeater.v2 | No | | -| Mi Network Speaker | miio:unsupported | xiaomi.wifispeaker.v1 | No | | -| Uclean Smart Toilet Seat | miio:basic | [xjx.toilet.pro](#xjx-toilet-pro) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Uclean Smart Toilet pure | miio:basic | [xjx.toilet.pure](#xjx-toilet-pure) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Uclean Smart Toilet relax | miio:basic | [xjx.toilet.relax](#xjx-toilet-relax) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Whale Spout Smart Toilet Zero | miio:basic | [xjx.toilet.zero](#xjx-toilet-zero) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Yeelight Smart Bath Heater | miio:unsupported | yeelight.bhf_light.v2 | No | | -| Yeelight Smart Bath Heater Pro | miio:basic | [yeelink.bhf_light.v1](#yeelink-bhf_light-v1) | Yes | | -| Yeelight Smart Bath Heater | miio:basic | [yeelink.bhf_light.v2](#yeelink-bhf_light-v2) | Yes | | -| Mi Bedside Lamp | miio:basic | [yeelink.light.bslamp1](#yeelink-light-bslamp1) | Yes | | -| Mi Bedside Lamp 2 | miio:basic | [yeelink.light.bslamp2](#yeelink-light-bslamp2) | Yes | | -| Yeelight Bedside Lamp II | miio:basic | [yeelink.light.bslamp3](#yeelink-light-bslamp3) | Yes | | -| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling1](#yeelink-light-ceiling1) | Yes | | -| Yeelight Ceiling Light SE | miio:basic | [yeelink.light.ceiling2](#yeelink-light-ceiling2) | Yes | | -| Yeelight LED Ceiling Light | miio:basic | [yeelink.light.ceiling3](#yeelink-light-ceiling3) | Yes | | -| Yeelight LED Ceiling Light | miio:basic | [yeelink.light.ceiling4](#yeelink-light-ceiling4) | Yes | | -| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling4.ambi](#yeelink-light-ceiling4-ambi) | Yes | | -| Mi LED Ceiling Light | miio:basic | [yeelink.light.ceiling5](#yeelink-light-ceiling5) | Yes | | -| Yeelight HaoShi LED Ceiling Lamp Pro | miio:basic | [yeelink.light.ceiling6](#yeelink-light-ceiling6) | Yes | | -| Yeelight Haoshi Ceiling Lamp | miio:basic | [yeelink.light.ceiling7](#yeelink-light-ceiling7) | Yes | | -| LED Ceiling Light Crystal Plus | miio:basic | [yeelink.light.ceiling8](#yeelink-light-ceiling8) | Yes | | -| Yeelight HaoShi LED Ceiling Lamp Pro | miio:basic | [yeelink.light.ceiling9](#yeelink-light-ceiling9) | Yes | | -| Yeelight Crystal Pendant Lamp | miio:basic | [yeelink.light.ceiling10](#yeelink-light-ceiling10) | Yes | | -| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling10.ambi](#yeelink-light-ceiling10-ambi) | Yes | | -| Yeelight Ceiling Light 320 1S | miio:basic | [yeelink.light.ceiling11](#yeelink-light-ceiling11) | Yes | | -| Yeelight Stylized Ceiling Light Pro | miio:basic | [yeelink.light.ceiling12](#yeelink-light-ceiling12) | Yes | | -| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling13](#yeelink-light-ceiling13) | Yes | | -| Yeelight Ceiling Light Mini | miio:basic | [yeelink.light.ceiling14](#yeelink-light-ceiling14) | Yes | | -| Yeelight Ceiling Light 480 1S | miio:basic | [yeelink.light.ceiling15](#yeelink-light-ceiling15) | Yes | | -| Yeelight Xingyu Ceiling Light | miio:basic | [yeelink.light.ceiling16](#yeelink-light-ceiling16) | Yes | | -| Yeelight ShaoHua Celing Light | miio:basic | [yeelink.light.ceiling17](#yeelink-light-ceiling17) | Yes | | -| Yeelight Ceiling Light Pro | miio:basic | [yeelink.light.ceiling18](#yeelink-light-ceiling18) | Yes | | -| Yeelight Ceiling Light Pro | miio:basic | [yeelink.light.ceiling19](#yeelink-light-ceiling19) | Yes | | -| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling19.ambi](#yeelink-light-ceiling19-ambi) | Yes | | -| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling20](#yeelink-light-ceiling20) | Yes | | -| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling20.ambi](#yeelink-light-ceiling20-ambi) | Yes | | -| Mi Smart LED Living Room Ceiling Light | miio:basic | [yeelink.light.ceiling21](#yeelink-light-ceiling21) | Yes | | -| Mi Smart LED Ceiling Light | miio:basic | [yeelink.light.ceiling22](#yeelink-light-ceiling22) | Yes | | -| Mi Smart LED Ceiling Light (350mm) | miio:basic | [yeelink.light.ceiling23](#yeelink-light-ceiling23) | Yes | | -| Yeelight Jade Smart LED Ceiling Light C2001 | miio:basic | [yeelink.light.ceil26](#yeelink-light-ceil26) | Yes | | -| Yeelight Color Bulb | miio:basic | [yeelink.light.color1](#yeelink-light-color1) | Yes | | -| Yeelight LED Bulb (Color) | miio:basic | [yeelink.light.color2](#yeelink-light-color2) | Yes | | -| Mi LED Smart Bulb (White and Color) | miio:basic | [yeelink.light.color3](#yeelink-light-color3) | Yes | | -| Yeelight LED Bulb 1S(Color) | miio:basic | [yeelink.light.color4](#yeelink-light-color4) | Yes | | -| Mi Smart LED Bulb Essential (White and Color) | miio:basic | [yeelink.light.color5](#yeelink-light-color5) | Yes | | -| Yeelight Smart LED Bulb 1SE (color) | miio:basic | [yeelink.light.colora](#yeelink-light-colora) | Yes | | -| Yeelight LED Bulb (Tunable) | miio:basic | [yeelink.light.ct2](#yeelink-light-ct2) | Yes | | -| Mi LED Desk Lamp | miio:basic | [yeelink.light.lamp1](#yeelink-light-lamp1) | Yes | | -| Mi Smart LED Desk Lamp Pro | miio:basic | [yeelink.light.lamp2](#yeelink-light-lamp2) | Yes | | -| Yeelight LED Lamp | miio:basic | [yeelink.light.lamp3](#yeelink-light-lamp3) | Yes | | -| Mi LED Desk Lamp 1S | miio:basic | [yeelink.light.lamp4](#yeelink-light-lamp4) | Yes | | -| Yeelight Smart Desk Lamp Prime | miio:basic | [yeelink.light.lamp5](#yeelink-light-lamp5) | Yes | | -| Yeelight | miio:basic | [yeelink.light.lamp6](#yeelink-light-lamp6) | Yes | | -| Yeelight LED Light Sensor Desk Lamp V1 | miio:basic | [yeelink.light.lamp7](#yeelink-light-lamp7) | Yes | | -| Yeelight | miio:basic | [yeelink.light.lamp8](#yeelink-light-lamp8) | Yes | | -| Yeelight Star LED Table Lamp | miio:basic | [yeelink.light.lamp9](#yeelink-light-lamp9) | Yes | | -| Yeelight Star Floor Lamp | miio:basic | [yeelink.light.lamp10](#yeelink-light-lamp10) | Yes | | -| Yeelight Screen Light Bar | miio:basic | [yeelink.light.lamp15](#yeelink-light-lamp15) | Yes | | -| Yeelight Bulb | miio:basic | [yeelink.light.mono1](#yeelink-light-mono1) | Yes | | -| Yeelight White Bulb v2 | miio:basic | [yeelink.light.mono2](#yeelink-light-mono2) | Yes | | -| Yeelight LED Bulb 1S(Dimmable) | miio:basic | [yeelink.light.mono4](#yeelink-light-mono4) | Yes | | -| Yeelight LED Filament Bulb | miio:basic | [yeelink.light.mono5](#yeelink-light-mono5) | Yes | | -| Mi Smart LED Bulb | miio:basic | [yeelink.light.mono6](#yeelink-light-mono6) | Yes | | -| Yeelight LED smart bulb W3(dimmable) | miio:basic | [yeelink.light.monoa](#yeelink-light-monoa) | Yes | | -| Yeelight GU10 Smart Bulb W1(dimmable) | miio:basic | [yeelink.light.monob](#yeelink-light-monob) | Yes | | -| Yeelight Whiteglow Panel Light | miio:basic | [yeelink.light.panel1](#yeelink-light-panel1) | Yes | | -| Yeelight Lightstrip | miio:basic | [yeelink.light.strip1](#yeelink-light-strip1) | Yes | | -| Yeelight Lightstrip Plus | miio:basic | [yeelink.light.strip2](#yeelink-light-strip2) | Yes | | -| Yeelight Willow LED Lightstrip | miio:basic | [yeelink.light.strip4](#yeelink-light-strip4) | Yes | | -| Light Group (Mi & Yeelight) | miio:basic | [yeelink.light.virtual](#yeelink-light-virtual) | Yes | | -| Yeelight Smart Dual Control Module | miio:basic | [yeelink.switch.sw1](#yeelink-switch-sw1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Yeelight Smart Speaker | miio:unsupported | yeelink.wifispeaker.v1 | No | | -| Yilai Ceiling Light Aiyue 480 | miio:basic | [yilai.light.ceiling1](#yilai-light-ceiling1) | Yes | | -| Yilai Ceiling Lamp Hefeng 430 | miio:basic | [yilai.light.ceiling2](#yilai-light-ceiling2) | Yes | | -| Yilai Ceiling Lamp Hefeng Pro | miio:basic | [yilai.light.ceiling3](#yilai-light-ceiling3) | Yes | | -| Mi Water Purifier lx2 | miio:basic | [yunmi.waterpuri.lx2](#yunmi-waterpuri-lx2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier (Under Counter) | miio:basic | [yunmi.waterpuri.lx3](#yunmi-waterpuri-lx3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier lx4 | miio:basic | [yunmi.waterpuri.lx4](#yunmi-waterpuri-lx4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier 1A/400G Pro | miio:basic | [yunmi.waterpuri.lx5](#yunmi-waterpuri-lx5) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier (Under Counter) | miio:basic | [yunmi.waterpuri.lx6](#yunmi-waterpuri-lx6) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier 500G/500G Pro | miio:basic | [yunmi.waterpuri.lx7](#yunmi-waterpuri-lx7) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier 600G | miio:basic | [yunmi.waterpuri.lx8](#yunmi-waterpuri-lx8) | Yes | | -| Mi Water Purifier D1 | miio:basic | [yunmi.waterpuri.lx9](#yunmi-waterpuri-lx9) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier lx10 | miio:basic | [yunmi.waterpuri.lx10](#yunmi-waterpuri-lx10) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier C1 (Triple Setting) | miio:basic | [yunmi.waterpuri.lx11](#yunmi-waterpuri-lx11) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier S1 | miio:basic | [yunmi.waterpuri.lx12](#yunmi-waterpuri-lx12) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier v1 | miio:basic | [yunmi.waterpurifier.v1](#yunmi-waterpurifier-v1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier v2 | miio:basic | [yunmi.waterpurifier.v2](#yunmi-waterpurifier-v2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier (Under sink) v3 | miio:basic | [yunmi.waterpurifier.v3](#yunmi-waterpurifier-v3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Water Purifier v4 | miio:basic | [yunmi.waterpurifier.v4](#yunmi-waterpurifier-v4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Ventilation System | miio:basic | [zhimi.airfresh.va2](#zhimi-airfresh-va2) | Yes | | -| Smartmi Fresh Air System (Heating) | miio:basic | [zhimi.airfresh.va4](#zhimi-airfresh-va4) | Yes | | -| Mi Fresh Air Ventilator C1-80 | miio:basic | [zhimi.airfresh.ua1](#zhimi-airfresh-ua1) | Yes | | -| Mi PM2.5 Air Quality Monitor | miio:basic | [zhimi.airmonitor.v1](#zhimi-airmonitor-v1) | Yes | | -| Mi Air Purifier 2 (mini) | miio:basic | [zhimi.airpurifier.m1](#zhimi-airpurifier-m1) | Yes | | -| Mi Air Purifier 2 | miio:basic | [zhimi.airpurifier.m2](#zhimi-airpurifier-m2) | Yes | | -| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.ma1](#zhimi-airpurifier-ma1) | Yes | | -| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.ma2](#zhimi-airpurifier-ma2) | Yes | | -| Mi Air Purifier 3 | miio:basic | [zhimi.airpurifier.ma4](#zhimi-airpurifier-ma4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mb1](#zhimi-airpurifier-mb1) | Yes | | -| Mi Air Purifier 3/3H | miio:basic | [zhimi.airpurifier.mb3](#zhimi-airpurifier-mb3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Air Purifier 3C | miio:basic | [zhimi.airpurifier.mb4](#zhimi-airpurifier-mb4) | Yes | | -| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc1](#zhimi-airpurifier-mc1) | Yes | | -| Mi Air Purifier 2H | miio:basic | [zhimi.airpurifier.mc2](#zhimi-airpurifier-mc2) | Yes | | -| Mi Air Purifier Super | miio:basic | [zhimi.airpurifier.sa1](#zhimi-airpurifier-sa1) | Yes | | -| Mi Air Purifier MAX / MAX Pro | miio:basic | [zhimi.airpurifier.sa2](#zhimi-airpurifier-sa2) | Yes | | -| Mi Air Purifier v1 | miio:basic | [zhimi.airpurifier.v1](#zhimi-airpurifier-v1) | Yes | | -| Mi Air Purifier v2 | miio:basic | [zhimi.airpurifier.v2](#zhimi-airpurifier-v2) | Yes | | -| Mi Air Purifier v3 | miio:basic | [zhimi.airpurifier.v3](#zhimi-airpurifier-v3) | Yes | | -| Mi Air Purifier v5 | miio:basic | [zhimi.airpurifier.v5](#zhimi-airpurifier-v5) | Yes | | -| Mi Air Purifier Pro v6 | miio:basic | [zhimi.airpurifier.v6](#zhimi-airpurifier-v6) | Yes | | -| Mi Air Purifier Pro v7 | miio:basic | [zhimi.airpurifier.v7](#zhimi-airpurifier-v7) | Yes | | -| Mi Air Purifier Pro H | miio:basic | [zhimi.airpurifier.vb2](#zhimi-airpurifier-vb2) | Yes | | -| Mi Air Purifier virtual | miio:unsupported | zhimi.airpurifier.virtual | No | | -| Mi Air Purifier 2(Virtual) | miio:unsupported | zhimi.airpurifier.vtl_m1 | No | | -| Smartmi Air Purifier | miio:basic | [zhimi.airpurifier.za1](#zhimi-airpurifier-za1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Standing Fan | miio:basic | [zhimi.fan.sa1](#zhimi-fan-sa1) | Yes | | -| Mi Smart Fan | miio:basic | [zhimi.fan.v1](#zhimi-fan-v1) | Yes | | -| Smartmi DC Pedestal Fan | miio:basic | [zhimi.fan.v2](#zhimi-fan-v2) | Yes | | -| Smartmi DC Pedestal Fan | miio:basic | [zhimi.fan.v3](#zhimi-fan-v3) | Yes | | -| Smartmi Inverter Pedestal Fan | miio:basic | [zhimi.fan.za1](#zhimi-fan-za1) | Yes | | -| Smartmi Standing Fan 2 | miio:basic | [zhimi.fan.za3](#zhimi-fan-za3) | Yes | | -| Smartmi Standing Fan 2S | miio:basic | [zhimi.fan.za4](#zhimi-fan-za4) | Yes | | -| Smartmi Standing Fan 3 | miio:basic | [zhimi.fan.za5](#zhimi-fan-za5) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Space Heater S | miio:basic | [zhimi.heater.ma2](#zhimi-heater-ma2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Baseboard Heater E | miio:basic | [zhimi.heater.ma3](#zhimi-heater-ma3) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Mi Smart Space Heater S | miio:basic | [zhimi.heater.mc2](#zhimi-heater-mc2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Smart Fan | miio:basic | [zhimi.heater.na1](#zhimi-heater-na1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Smart Fan Heater | miio:basic | [zhimi.heater.nb1](#zhimi-heater-nb1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Radiant Heater Smart Version | miio:basic | [zhimi.heater.za1](#zhimi-heater-za1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Smart Convector Heater 1S | miio:basic | [zhimi.heater.za2](#zhimi-heater-za2) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Smart Convector Heater 1S | miio:basic | [zhimi.heater.zb1](#zhimi-heater-zb1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | -| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.ca1](#zhimi-humidifier-ca1) | Yes | | -| Smartmi Evaporative Humidifer 2 | miio:basic | [zhimi.humidifier.ca4](#zhimi-humidifier-ca4) | Yes | | -| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.cb1](#zhimi-humidifier-cb1) | Yes | | -| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.cb2](#zhimi-humidifier-cb2) | Yes | | -| Smartmi Humidifier | miio:basic | [zhimi.humidifier.v1](#zhimi-humidifier-v1) | Yes | | -| Mi AI Alarm | miio:unsupported | zimi.clock.myk01 | No | | -| Mi Smart Power Strip | miio:basic | [zimi.powerstrip.v2](#zimi-powerstrip-v2) | Yes | | +| Device | ThingType | Device Model | Supported | Remark | +|------------------------------------|------------------|------------------------|--------------|------------| +| AUX Smart Air Conditioner | miio:unsupported | aux.aircondition.v1 | No | | +| Mi Air Frying Pan | miio:basic | [careli.fryer.maf01](#careli-fryer-maf01) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Fryer (3.5L) | miio:basic | [careli.fryer.maf02](#careli-fryer-maf02) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Air Frying Pan | miio:basic | [careli.fryer.maf03](#careli-fryer-maf03) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Qingping Air Monitor Lite | miio:basic | [cgllc.airm.cgdn1](#cgllc-airm-cgdn1) | Yes | | +| Mi Multifunction Air Monitor | miio:basic | [cgllc.airmonitor.b1](#cgllc-airmonitor-b1) | Yes | | +| Qingping Air Monitor | miio:basic | [cgllc.airmonitor.s1](#cgllc-airmonitor-s1) | Yes | | +| Mi Universal Remote | miio:unsupported | chuangmi.ir.v2 | No | | +| Mi Smart Power Plug 2 (Wi-Fi and Bluetooth Gateway) | miio:basic | [chuangmi.plug.212a01](#chuangmi-plug-212a01) | Yes | | +| Mi Smart Plug WiFi | miio:basic | [chuangmi.plug.hmi205](#chuangmi-plug-hmi205) | Yes | | +| Mi Smart Plug (WiFi) | miio:basic | [chuangmi.plug.hmi206](#chuangmi-plug-hmi206) | Yes | | +| Mi Smart Wi-Fi Plug (Bluetooth Gateway) | miio:basic | [chuangmi.plug.hmi208](#chuangmi-plug-hmi208) | Yes | | +| Mi Plug Mini | miio:basic | [chuangmi.plug.m1](#chuangmi-plug-m1) | Yes | | +| Mi Smart Plug (Wi-Fi) Basic | miio:basic | [chuangmi.plug.m3](#chuangmi-plug-m3) | Yes | | +| Mi Smart Power Plug | miio:basic | [chuangmi.plug.v1](#chuangmi-plug-v1) | Yes | | +| Mi Smart Power Plug v2 | miio:basic | [chuangmi.plug.v2](#chuangmi-plug-v2) | Yes | | +| MIJIA Smart Plug Enhanced | miio:basic | [chuangmi.plug.v3](#chuangmi-plug-v3) | Yes | | +| Mi Remote | miio:unsupported | chuangmi.remote.v2 | No | | +| Mi IH Rice Cooker | miio:unsupported | chunmi.cooker.normal1 | No | | +| Mi IH Rice Cooker | miio:unsupported | chunmi.cooker.normal2 | No | | +| Mi IH Rice Cooker 4L | miio:unsupported | chunmi.cooker.normal4 | No | | +| Mi IH Pressure Rice Cooker | miio:unsupported | chunmi.cooker.press1 | No | | +| Mi IH Pressure Rice Cooker | miio:unsupported | chunmi.cooker.press2 | No | | +| Gosund Smart Plug | miio:basic | [cuco.plug.cp1](#cuco-plug-cp1) | Yes | | +| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq](#deerma-humidifier-jsq) | Yes | | +| Mi S Smart Humidifer | miio:basic | [deerma.humidifier.jsq1](#deerma-humidifier-jsq1) | Yes | | +| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq5](#deerma-humidifier-jsq5) | Yes | | +| Mi Smart Humidifer S | miio:basic | [deerma.humidifier.jsqs](#deerma-humidifier-jsqs) | Yes | | +| Mi Smart Humidifier | miio:basic | [deerma.humidifier.mjjsq](#deerma-humidifier-mjjsq) | Yes | | +| Mi Fresh Air Ventilator A1-150 | miio:basic | [dmaker.airfresh.a1](#dmaker-airfresh-a1) | Yes | | +| Mi Fresh Air Ventilator | miio:basic | [dmaker.airfresh.t2017](#dmaker-airfresh-t2017) | Yes | | +| Mi Smart Standing Fan 2 Lite | miio:basic | [dmaker.fan.1c](#dmaker-fan-1c) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Standing Fan 1X | miio:basic | [dmaker.fan.p5](#dmaker-fan-p5) | Yes | | +| Mi Smart Standing Fan 1C | miio:basic | [dmaker.fan.p8](#dmaker-fan-p8) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Tower Fan | miio:basic | [dmaker.fan.p9](#dmaker-fan-p9) | Yes | | +| Mi Smart Standing Fan 2 | miio:basic | [dmaker.fan.p10](#dmaker-fan-p10) | Yes | | +| Mi Smart Standing Fan Pro | miio:basic | [dmaker.fan.p15](#dmaker-fan-p15) | Yes | Identified manual actions for execution
`action{"did":"off-delay-time-toggle","siid":3,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel. | +| Mi Smart Standing Fan 2 | miio:basic | [dmaker.fan.p18](#dmaker-fan-p18) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Robot Vacuum Mop 1C STYTJ01ZHM | miio:basic | [dreame.vacuum.mc1808](#dreame-vacuum-mc1808) | Yes | | +| Dreame Robot Vacuum-Mop F9 | miio:basic | [dreame.vacuum.p2008](#dreame-vacuum-p2008) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Dreame Robot Vacuum D9 | miio:basic | [dreame.vacuum.p2009](#dreame-vacuum-p2009) | Yes | | +| Dreame Bot W10 | miio:basic | [dreame.vacuum.p2027](#dreame-vacuum-p2027) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Dreame Bot Z10 Pro | miio:basic | [dreame.vacuum.p2028](#dreame-vacuum-p2028) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Trouver Robot LDS Vacuum-Mop Finder | miio:basic | [dreame.vacuum.p2036](#dreame-vacuum-p2036) | Yes | | +| Mi Robot Vacuum-Mop 2 Pro+ | miio:basic | [dreame.vacuum.p2041o](#dreame-vacuum-p2041o) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MOVA Z500 Robot Vacuum and Mop Cleaner | miio:basic | [dreame.vacuum.p2156o](#dreame-vacuum-p2156o) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MOVA L600 Robot Vacuum and Mop Cleaner | miio:basic | [dreame.vacuum.p2157](#dreame-vacuum-p2157) | Yes | | +| Dreame Bot D9 Max | miio:basic | [dreame.vacuum.p2259](#dreame-vacuum-p2259) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO ARIES For Bedroom | miio:basic | [huayi.light.ari013](#huayi-light-ari013) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO ARIES For Living Room | miio:basic | [huayi.light.aries](#huayi-light-aries) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO Fan Light | miio:basic | [huayi.light.fanwy](#huayi-light-fanwy) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO Fan Light(2020) | miio:basic | [huayi.light.fanwy2](#huayi-light-fanwy2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO PEGASUS For Living Room | miio:basic | [huayi.light.peg091](#huayi-light-peg091) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO PEGASUS For Bedroom | miio:basic | [huayi.light.peg093](#huayi-light-peg093) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO PISCES For Bedroom | miio:basic | [huayi.light.pis123](#huayi-light-pis123) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO PISCES For Living Room | miio:basic | [huayi.light.pisces](#huayi-light-pisces) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO TAURUS For Bedroom | miio:basic | [huayi.light.tau023](#huayi-light-tau023) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO TAURUS For Living Room | miio:basic | [huayi.light.taurus](#huayi-light-taurus) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO VIRGO For Bedroom | miio:basic | [huayi.light.vir063](#huayi-light-vir063) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO VIRGO For Living Room | miio:basic | [huayi.light.virgo](#huayi-light-virgo) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO Ceiling Light | miio:basic | [huayi.light.wy](#huayi-light-wy) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO LIANGCHEN(BLE Mesh) | miio:basic | [huayi.light.wy200](#huayi-light-wy200) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO SAG Downlight (BLE Mesh) | miio:basic | [huayi.light.wy201](#huayi-light-wy201) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO Bulb (BLE Mesh) | miio:basic | [huayi.light.wy202](#huayi-light-wy202) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO YONG Downlight (BLE Mesh) | miio:basic | [huayi.light.wy203](#huayi-light-wy203) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| huayi.light.wy204 | miio:basic | [huayi.light.wy204](#huayi-light-wy204) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO Heating Lamp | miio:basic | [huayi.light.wyheat](#huayi-light-wyheat) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| HUIZUO ZIWEI Ceiling Lamp | miio:basic | [huayi.light.zw131](#huayi-light-zw131) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MiJia Rice Cooker | miio:unsupported | hunmi.cooker.normal3 | No | | +| Jinxing Smart Air Conditioner | miio:unsupported | idelan.aircondition.v1 | No | | +| IKEA E27 white spectrum opal | miio:lumi | [ikea.light.led1545g12](#ikea-light-led1545g12) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA E27 white spectrum clear | miio:lumi | [ikea.light.led1546g12](#ikea-light-led1546g12) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA E14 white spectrum | miio:lumi | [ikea.light.led1536g5](#ikea-light-led1536g5) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA GU10 white spectrum | miio:lumi | [ikea.light.led1537r6](#ikea-light-led1537r6) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA E27 warm white | miio:lumi | [ikea.light.led1623g12](#ikea-light-led1623g12) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA GU10 warm white | miio:lumi | [ikea.light.led1650r5](#ikea-light-led1650r5) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| IKEA E14 warm white | miio:lumi | [ikea.light.led1649c5](#ikea-light-led1649c5) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Aqara Wall Switch(No Neutral, Single Rocker) | miio:unsupported | lumi.ctrl_neutral1.v1 | No | | +| Aqara Wall Switch (No Neutral, Double Rocker) | miio:unsupported | lumi.ctrl_neutral2.v1 | No | | +| Xiaomiyoupin Curtain Controller (Wi-Fi) | miio:basic | [lumi.curtain.hagl05](#lumi-curtain-hagl05) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Air Purifier virtual | miio:gateway | [lumi.gateway.mgl03](#lumi-gateway-mgl03) | Experimental | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway if you have the developer key. Otherwise this binding provides experimental support for lumi subdevices
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi smart Home Gateway Hub | miio:gateway | [lumi.gateway.mieu01](#lumi-gateway-mieu01) | Yes | Used to control the gateway itself. Experimental support for controlling lumi subdevices | +| Mi smart Home Gateway Hub v1 | miio:gateway | [lumi.gateway.v1](#lumi-gateway-v1) | Experimental | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway if you have the developer key. Otherwise this binding provides experimental support for lumi subdevices
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi smart Home GatewayHub v2 | miio:gateway | [lumi.gateway.v2](#lumi-gateway-v2) | Experimental | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway if you have the developer key. Otherwise this binding provides experimental support for lumi subdevices
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi smart Home Gateway Hub v3 | miio:gateway | [lumi.gateway.v3](#lumi-gateway-v3) | Experimental | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway if you have the developer key. Otherwise this binding provides experimental support for lumi subdevices
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Aqara LED Light Bulb (Tunable White) | miio:lumi | [lumi.light.aqcn02](#lumi-light-aqcn02) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Door lock | miio:lumi | [lumi.lock.v1](#lumi-lock-v1) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Aqara Door Lock | miio:lumi | [lumi.lock.aq1](#lumi-lock-aq1) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Aqara Door Lock S2 | miio:lumi | [lumi.lock.acn02](#lumi-lock-acn02) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Aqara Door lock S2 Pro | miio:lumi | [lumi.lock.acn03](#lumi-lock-acn03) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Plug (Zigbee) | miio:lumi | [lumi.plug.mmeu01](#lumi-plug-mmeu01) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge. | +| Mi Window and Door Sensor | miio:lumi | [lumi.sensor_magnet.v2](#lumi-sensor_magnet-v2) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge. Note: Won't display the current status. Log only' | +| Mi Motion Sensor | miio:lumi | [lumi.sensor_motion.aq2](#lumi-sensor_motion-aq2) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge.Note: Won't display the current status, nor trigger events. Log only | +| Mi Motion Sensor | miio:lumi | [lumi.sensor_motion.v2](#lumi-sensor_motion-v2) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge.Note: Won't display the current status, nor trigger events. Log only | +| Mi Temperature and Humidity Sensor | miio:lumi | [lumi.sensor_ht.v1](#lumi-sensor_ht-v1) | Experimental | Needs to have the Xiaomi gateway configured in the binding as bridge.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Water Leak Sensor | miio:lumi | [lumi.sensor_wleak.aq1](#lumi-sensor_wleak-aq1) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge. | +| Aqara Temperature and Humidity Sensor | miio:lumi | [lumi.weather.v1](#lumi-weather-v1) | Yes | Needs to have the Xiaomi gateway configured in the binding as bridge. | +| Midea AC-i Youth | miio:unsupported | midea.aircondition.v1 | No | | +| Midea Air Conditioner v2 | miio:unsupported | midea.aircondition.v2 | No | | +| Midea AC-Cool Golden | miio:unsupported | midea.aircondition.xa1 | No | | +| Mi Robot Vacuum-Mop Essential | miio:basic | [mijia.vacuum.v2](#mijia-vacuum-v2) | Yes | This device may be overwhelmed if refresh is too frequent, slowing down the responses. Suggest to increase refresh time to 120 seconds | +| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s1](#mmgg-pet_waterer-s1) | Experimental | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s2](#mmgg-pet_waterer-s2) | Experimental | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mijia Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s3](#mmgg-pet_waterer-s3) | Experimental | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| XIAOWAN Smart Pet Water Dispenser | miio:basic | [mmgg.pet_waterer.s4](#mmgg-pet_waterer-s4) | Experimental | Identified manual actions for execution
`action{"did":"filter-reset-filter-life","siid":3,"aiid":1,"in":[]}`
`action{"did":"filter-cotton-reset-cotton-life","siid":5,"aiid":1,"in":[]}`
`action{"did":"remain-clean-time-reset-clean-time","siid":6,"aiid":1,"in":[]}`
Please test and feedback if they are working so they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MR.BOND | miio:basic | [mrbond.airer.m1pro](#mrbond-airer-m1pro) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MR.BOND | miio:basic | [mrbond.airer.m1s](#mrbond-airer-m1s) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| MR.BOND | miio:basic | [mrbond.airer.m1super](#mrbond-airer-m1super) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| WIDETECH WDH318EFW1 Internet Dehumidifier | miio:basic | [nwt.derh.wdh318efw1](#nwt-derh-wdh318efw1) | Yes | | +| Philips Zhirui Ceiling Lamp Bedroom 40W | miio:basic | [philips.light.bceiling1](#philips-light-bceiling1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips Zhirui Ceiling Lamp Bedroom 28W | miio:basic | [philips.light.bceiling2](#philips-light-bceiling2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips ZhiRui E27 bulb | miio:basic | [philips.light.bulb](#philips-light-bulb) | Yes | | +| Philips ZhiRui E14 Candle Lamp Frosted version | miio:basic | [philips.light.candle](#philips-light-candle) | Yes | | +| Philips ZhiRui E14 Candle Lamp Crystal version | miio:basic | [philips.light.candle2](#philips-light-candle2) | Yes | | +| Mijia Philips Color Bulb | miio:basic | [philips.light.cbulb](#philips-light-cbulb) | Yes | | +| Philips Light | miio:basic | [philips.light.cbulbs](#philips-light-cbulbs) | Yes | | +| Philips Connected Ceiling | miio:basic | [philips.light.ceiling](#philips-light-ceiling) | Yes | | +| Philips Light | miio:basic | [philips.light.dcolor](#philips-light-dcolor) | Yes | | +| ZhiRui Dimmable Downlight | miio:basic | [philips.light.dlight](#philips-light-dlight) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips ZhiRui Downlight | miio:basic | [philips.light.downlight](#philips-light-downlight) | Yes | | +| Philips Wi-Fi bulb E27 White | miio:basic | [philips.light.hbulb](#philips-light-hbulb) | Yes | | +| Philips ZhiYi Ceiling Lamp FL 40W | miio:basic | [philips.light.lnblight1](#philips-light-lnblight1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips ZhiYi Ceiling Lamp FL 28W | miio:basic | [philips.light.lnblight2](#philips-light-lnblight2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips ZhiYi Ceiling Lamp FL 80W | miio:basic | [philips.light.lnlrlight](#philips-light-lnlrlight) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips Zhirui Ceiling Lamp Living room 80W | miio:basic | [philips.light.lrceiling](#philips-light-lrceiling) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Nordic 80W | miio:basic | [philips.light.mceil](#philips-light-mceil) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Nordic 40W | miio:basic | [philips.light.mceilm](#philips-light-mceilm) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Nordic 28W | miio:basic | [philips.light.mceils](#philips-light-mceils) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips Smart Lamp | miio:basic | [philips.light.mono1](#philips-light-mono1) | Yes | | +| Philips ZhiRui Bedside Lamp | miio:basic | [philips.light.moonlight](#philips-light-moonlight) | Yes | | +| Zhirui Ceiling Lamp Black 80W | miio:basic | [philips.light.obceil](#philips-light-obceil) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Black 40W | miio:basic | [philips.light.obceim](#philips-light-obceim) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Black 28W | miio:basic | [philips.light.obceis](#philips-light-obceis) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mijia Philips Study Desk Lamp | miio:basic | [philips.light.rwread](#philips-light-rwread) | Yes | | +| Zhirui Ceiling Lamp Starry 80W | miio:basic | [philips.light.sceil](#philips-light-sceil) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Starry 40W | miio:basic | [philips.light.sceilm](#philips-light-sceilm) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Starry 28W | miio:basic | [philips.light.sceils](#philips-light-sceils) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips EyeCare Connected Desk Lamp gen2. | miio:basic | [philips.light.sread1](#philips-light-sread1) | Yes | | +| Mijia Philips Desk Lamp 2S | miio:basic | [philips.light.sread2](#philips-light-sread2) | Yes | | +| Philips Connected Lights | miio:basic | [philips.light.virtual](#philips-light-virtual) | Yes | | +| Zhirui Ceiling Lamp Gorgeous 80W | miio:basic | [philips.light.xzceil](#philips-light-xzceil) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Gorgeous 40W | miio:basic | [philips.light.xzceim](#philips-light-xzceim) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Zhirui Ceiling Lamp Gorgeous 28W | miio:basic | [philips.light.xzceis](#philips-light-xzceis) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Philips ZhiYi Ceiling lamp | miio:basic | [philips.light.zyceiling](#philips-light-zyceiling) | Yes | | +| Philips ZhiYi Desk Lamp | miio:basic | [philips.light.zysread](#philips-light-zysread) | Yes | | +| Philips ZhiYi Strip | miio:basic | [philips.light.zystrip](#philips-light-zystrip) | Yes | | +| CHINGMI Smart Power Strip v1 | miio:basic | [qmi.powerstrip.v1](#qmi-powerstrip-v1) | Yes | | +| Rockrobo Xiaowa Sweeper v2 | miio:unsupported | roborock.sweeper.e2v2 | No | | +| Rockrobo Xiaowa Sweeper v3 | miio:unsupported | roborock.sweeper.e2v3 | No | | +| Roborock S6 Pure | miio:vacuum | [roborock.vacuum.a08](#roborock-vacuum-a08) | Yes | | +| Roborock T7 Pro | miio:vacuum | [roborock.vacuum.a09](#roborock-vacuum-a09) | Yes | | +| Roborock S6 MaxV | miio:vacuum | [roborock.vacuum.a10](#roborock-vacuum-a10) | Yes | | +| Roborock T7 | miio:vacuum | [roborock.vacuum.a11](#roborock-vacuum-a11) | Yes | | +| Roborock T7S | miio:vacuum | [roborock.vacuum.a14](#roborock-vacuum-a14) | Yes | | +| Roborock S7 | miio:vacuum | [roborock.vacuum.a15](#roborock-vacuum-a15) | Yes | | +| Roborock S4 Max | miio:vacuum | [roborock.vacuum.a19](#roborock-vacuum-a19) | Yes | | +| Roborock T7S Plus | miio:vacuum | [roborock.vacuum.a23](#roborock-vacuum-a23) | Yes | | +| Xiaowa C1 | miio:vacuum | [roborock.vacuum.c1](#roborock-vacuum-c1) | Yes | | +| Roborock Xiaowa E Series Vacuum v2 | miio:unsupported | roborock.vacuum.e2 | No | | +| Mi Robot Vacuum 1S | miio:vacuum | [roborock.vacuum.m1s](#roborock-vacuum-m1s) | Yes | | +| Roborock P5 | miio:vacuum | [roborock.vacuum.p5](#roborock-vacuum-p5) | Yes | | +| Roborock S4 | miio:vacuum | [roborock.vacuum.s4](#roborock-vacuum-s4) | Yes | | +| Roborock Vacuum S4v2 | miio:vacuum | [roborock.vacuum.s4v2](#roborock-vacuum-s4v2) | Yes | | +| Roborock S5 | miio:vacuum | [roborock.vacuum.s5](#roborock-vacuum-s5) | Yes | | +| Roborock S5 Max | miio:vacuum | [roborock.vacuum.s5e](#roborock-vacuum-s5e) | Yes | | +| Roborock S6 | miio:vacuum | [roborock.vacuum.s6](#roborock-vacuum-s6) | Yes | | +| Roborock T4 | miio:vacuum | [roborock.vacuum.t4](#roborock-vacuum-t4) | Yes | | +| Roborock Vacuum T4 v2 | miio:vacuum | [roborock.vacuum.t4v2](#roborock-vacuum-t4v2) | Yes | | +| Roborock Vacuum T4 v3 | miio:vacuum | [roborock.vacuum.t4v3](#roborock-vacuum-t4v3) | Yes | | +| Roborock T6 | miio:vacuum | [roborock.vacuum.t6](#roborock-vacuum-t6) | Yes | | +| Roborock Vacuum T6 v2 | miio:vacuum | [roborock.vacuum.t6v2](#roborock-vacuum-t6v2) | Yes | | +| Roborock Vacuum T6 v3 | miio:vacuum | [roborock.vacuum.t6v3](#roborock-vacuum-t6v3) | Yes | | +| Roborock Vacuum T7 | miio:vacuum | [roborock.vacuum.t7](#roborock-vacuum-t7) | Yes | | +| Roborock Vacuum T7p | miio:vacuum | [roborock.vacuum.t7p](#roborock-vacuum-t7p) | Yes | | +| Roborock Vacuum T7 v2 | miio:vacuum | [roborock.vacuum.t7pv2](#roborock-vacuum-t7pv2) | Yes | | +| Roborock Vacuum T7 v3 | miio:vacuum | [roborock.vacuum.t7pv3](#roborock-vacuum-t7pv3) | Yes | | +| Roborock Vacuum T7 v2 | miio:vacuum | [roborock.vacuum.t7v2](#roborock-vacuum-t7v2) | Yes | | +| Roborock Vacuum T7 v3 | miio:vacuum | [roborock.vacuum.t7v3](#roborock-vacuum-t7v3) | Yes | | +| Roborock Vacuum S6 | miio:vacuum | [rockrobo.vacuum.s6](#rockrobo-vacuum-s6) | Yes | | +| Mi Robot Vacuum | miio:vacuum | [rockrobo.vacuum.v1](#rockrobo-vacuum-v1) | Yes | | +| ROIDMI EVE vacuum | miio:basic | [roidmi.vacuum.v60](#roidmi-vacuum-v60) | Yes | | +| PTX OneKey Switch (WIFI) | miio:basic | [090615.switch.xswitch01](#090615-switch-xswitch01) | Yes | | +| PTX Twokey switch(wifi) | miio:basic | [090615.switch.xswitch02](#090615-switch-xswitch02) | Yes | | +| PTX ThreeKey Switch (WIFI) | miio:basic | [090615.switch.xswitch03](#090615-switch-xswitch03) | Yes | | +| SCISHARE Smart Capsule Coffee Machine | miio:basic | [scishare.coffee.s1102](#scishare-coffee-s1102) | Experimental | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Xiaomi Scishare Smart Capsule Coffee Machine | miio:basic | [scishare.coffee.s1301](#scishare-coffee-s1301) | Experimental | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Soocare Electric Toothbrush | miio:unsupported | soocare.toothbrush.x3 | No | | +| Viomi Internet Refrigerator iLive(French style 462L) | miio:unsupported | viomi.fridge.v3 | No | | +| Viomi Cleaning Robot V-RVCLM21B | miio:basic | [viomi.vacuum.v6](#viomi-vacuum-v6) | Yes | | +| Mi Robot Vacuum-Mop P | miio:basic | [viomi.vacuum.v7](#viomi-vacuum-v7) | Yes | | +| Mi Robot Vacuum-Mop P | miio:basic | [viomi.vacuum.v8](#viomi-vacuum-v8) | Yes | | +| Viomi S9 | miio:basic | [viomi.vacuum.v18](#viomi-vacuum-v18) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| VIOMI Internet Electric Water Heater 1A (60L) | miio:basic | [viomi.waterheater.e1](#viomi-waterheater-e1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Inverter Air Conditioner (1.5HP) | miio:basic | [xiaomi.aircondition.ma1](#xiaomi-aircondition-ma1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Inverter Air Conditioner (1.5HP, China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma2](#xiaomi-aircondition-ma2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Vertical Air Conditioner (2HP) | miio:basic | [xiaomi.aircondition.ma4](#xiaomi-aircondition-ma4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Vertical Air Conditioner C1 (2HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma5](#xiaomi-aircondition-ma5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner C1 (1.5HP / Conventional / China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.ma6](#xiaomi-aircondition-ma6) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner C1 (1HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.ma9](#xiaomi-aircondition-ma9) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mc1](#xiaomi-aircondition-mc1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mc2](#xiaomi-aircondition-mc2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc4](#xiaomi-aircondition-mc4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc5](#xiaomi-aircondition-mc5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Vertical Air Conditioner A (2HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc6](#xiaomi-aircondition-mc6) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Vertical Air Conditioner A (3HP / Inverter / China Energy Label Level <1) | miio:basic | [xiaomi.aircondition.mc7](#xiaomi-aircondition-mc7) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Air Conditioner(1.5HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mc8](#xiaomi-aircondition-mc8) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Vertical Air Conditioner(2HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mc9](#xiaomi-aircondition-mc9) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Vertical Air Conditioner (2HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.c10](#xiaomi-aircondition-c10) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Vertical Air Conditioner (3HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.c11](#xiaomi-aircondition-c11) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner C (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mh1](#xiaomi-aircondition-mh1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner C (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mh2](#xiaomi-aircondition-mh2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Air Conditioner(1HP/Inverter/New China Energy Label Level 3) | miio:basic | [xiaomi.aircondition.mh3](#xiaomi-aircondition-mh3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner X (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt1](#xiaomi-aircondition-mt1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Air Conditioner X (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt2](#xiaomi-aircondition-mt2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Gentle Breeze Air Conditioner (1HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt3](#xiaomi-aircondition-mt3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Gentle Breeze Air Conditioner (1.5HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt4](#xiaomi-aircondition-mt4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Gentle Breeze Vertical Air Conditioner (3HP / Inverter / New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt5](#xiaomi-aircondition-mt5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Air Conditioner (1HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt7](#xiaomi-aircondition-mt7) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Ultra Electricity Saving Air Conditioner (1.5HP/Inverter/New China Energy Label Level 1) | miio:basic | [xiaomi.aircondition.mt8](#xiaomi-aircondition-mt8) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Wi-Fi Repeater 2 | miio:unsupported | xiaomi.repeater.v2 | No | | +| Mi Network Speaker | miio:unsupported | xiaomi.wifispeaker.v1 | No | | +| Uclean Smart Toilet Seat | miio:basic | [xjx.toilet.pro](#xjx-toilet-pro) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Uclean Smart Toilet pure | miio:basic | [xjx.toilet.pure](#xjx-toilet-pure) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Uclean Smart Toilet relax | miio:basic | [xjx.toilet.relax](#xjx-toilet-relax) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Whale Spout Smart Toilet Zero | miio:basic | [xjx.toilet.zero](#xjx-toilet-zero) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Yeelight Smart Bath Heater | miio:unsupported | yeelight.bhf_light.v2 | No | | +| Yeelight Smart Bath Heater Pro | miio:basic | [yeelink.bhf_light.v1](#yeelink-bhf_light-v1) | Yes | | +| Yeelight Smart Bath Heater | miio:basic | [yeelink.bhf_light.v2](#yeelink-bhf_light-v2) | Yes | | +| Mi Bedside Lamp | miio:basic | [yeelink.light.bslamp1](#yeelink-light-bslamp1) | Yes | | +| Mi Bedside Lamp 2 | miio:basic | [yeelink.light.bslamp2](#yeelink-light-bslamp2) | Yes | | +| Yeelight Bedside Lamp II | miio:basic | [yeelink.light.bslamp3](#yeelink-light-bslamp3) | Yes | | +| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling1](#yeelink-light-ceiling1) | Yes | | +| Yeelight Ceiling Light SE | miio:basic | [yeelink.light.ceiling2](#yeelink-light-ceiling2) | Yes | | +| Yeelight LED Ceiling Light | miio:basic | [yeelink.light.ceiling3](#yeelink-light-ceiling3) | Yes | | +| Yeelight LED Ceiling Light | miio:basic | [yeelink.light.ceiling4](#yeelink-light-ceiling4) | Yes | | +| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling4.ambi](#yeelink-light-ceiling4-ambi) | Yes | | +| Mi LED Ceiling Light | miio:basic | [yeelink.light.ceiling5](#yeelink-light-ceiling5) | Yes | | +| Yeelight HaoShi LED Ceiling Lamp Pro | miio:basic | [yeelink.light.ceiling6](#yeelink-light-ceiling6) | Yes | | +| Yeelight Haoshi Ceiling Lamp | miio:basic | [yeelink.light.ceiling7](#yeelink-light-ceiling7) | Yes | | +| LED Ceiling Light Crystal Plus | miio:basic | [yeelink.light.ceiling8](#yeelink-light-ceiling8) | Yes | | +| Yeelight HaoShi LED Ceiling Lamp Pro | miio:basic | [yeelink.light.ceiling9](#yeelink-light-ceiling9) | Yes | | +| Yeelight Crystal Pendant Lamp | miio:basic | [yeelink.light.ceiling10](#yeelink-light-ceiling10) | Yes | | +| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling10.ambi](#yeelink-light-ceiling10-ambi) | Yes | | +| Yeelight Ceiling Light 320 1S | miio:basic | [yeelink.light.ceiling11](#yeelink-light-ceiling11) | Yes | | +| Yeelight Stylized Ceiling Light Pro | miio:basic | [yeelink.light.ceiling12](#yeelink-light-ceiling12) | Yes | | +| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling13](#yeelink-light-ceiling13) | Yes | | +| Yeelight Ceiling Light Mini | miio:basic | [yeelink.light.ceiling14](#yeelink-light-ceiling14) | Yes | | +| Yeelight Ceiling Light 480 1S | miio:basic | [yeelink.light.ceiling15](#yeelink-light-ceiling15) | Yes | | +| Yeelight Xingyu Ceiling Light | miio:basic | [yeelink.light.ceiling16](#yeelink-light-ceiling16) | Yes | | +| Yeelight ShaoHua Celing Light | miio:basic | [yeelink.light.ceiling17](#yeelink-light-ceiling17) | Yes | | +| Yeelight Ceiling Light Pro | miio:basic | [yeelink.light.ceiling18](#yeelink-light-ceiling18) | Yes | | +| Yeelight Ceiling Light Pro | miio:basic | [yeelink.light.ceiling19](#yeelink-light-ceiling19) | Yes | | +| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling19.ambi](#yeelink-light-ceiling19-ambi) | Yes | | +| Yeelight Ceiling Light | miio:basic | [yeelink.light.ceiling20](#yeelink-light-ceiling20) | Yes | | +| Yeelight LED Ceiling Ambi Lamp | miio:basic | [yeelink.light.ceiling20.ambi](#yeelink-light-ceiling20-ambi) | Yes | | +| Mi Smart LED Living Room Ceiling Light | miio:basic | [yeelink.light.ceiling21](#yeelink-light-ceiling21) | Yes | | +| Mi Smart LED Ceiling Light | miio:basic | [yeelink.light.ceiling22](#yeelink-light-ceiling22) | Yes | | +| Mi Smart LED Ceiling Light (350mm) | miio:basic | [yeelink.light.ceiling23](#yeelink-light-ceiling23) | Yes | | +| Yeelight Jade Smart LED Ceiling Light C2001 | miio:basic | [yeelink.light.ceil26](#yeelink-light-ceil26) | Yes | | +| Yeelight Color Bulb | miio:basic | [yeelink.light.color1](#yeelink-light-color1) | Yes | | +| Yeelight LED Bulb (Color) | miio:basic | [yeelink.light.color2](#yeelink-light-color2) | Yes | | +| Mi LED Smart Bulb (White and Color) | miio:basic | [yeelink.light.color3](#yeelink-light-color3) | Yes | | +| Yeelight LED Bulb 1S(Color) | miio:basic | [yeelink.light.color4](#yeelink-light-color4) | Yes | | +| Mi Smart LED Bulb Essential (White and Color) | miio:basic | [yeelink.light.color5](#yeelink-light-color5) | Yes | | +| Yeelight Smart LED Bulb 1SE (color) | miio:basic | [yeelink.light.colora](#yeelink-light-colora) | Yes | | +| Yeelight LED Bulb (Tunable) | miio:basic | [yeelink.light.ct2](#yeelink-light-ct2) | Yes | | +| Mi LED Desk Lamp | miio:basic | [yeelink.light.lamp1](#yeelink-light-lamp1) | Yes | | +| Mi Smart LED Desk Lamp Pro | miio:basic | [yeelink.light.lamp2](#yeelink-light-lamp2) | Yes | | +| Yeelight LED Lamp | miio:basic | [yeelink.light.lamp3](#yeelink-light-lamp3) | Yes | | +| Mi LED Desk Lamp 1S | miio:basic | [yeelink.light.lamp4](#yeelink-light-lamp4) | Yes | | +| Yeelight Smart Desk Lamp Prime | miio:basic | [yeelink.light.lamp5](#yeelink-light-lamp5) | Yes | | +| Yeelight | miio:basic | [yeelink.light.lamp6](#yeelink-light-lamp6) | Yes | | +| Yeelight LED Light Sensor Desk Lamp V1 | miio:basic | [yeelink.light.lamp7](#yeelink-light-lamp7) | Yes | | +| Yeelight | miio:basic | [yeelink.light.lamp8](#yeelink-light-lamp8) | Yes | | +| Yeelight Star LED Table Lamp | miio:basic | [yeelink.light.lamp9](#yeelink-light-lamp9) | Yes | | +| Yeelight Star Floor Lamp | miio:basic | [yeelink.light.lamp10](#yeelink-light-lamp10) | Yes | | +| Yeelight Screen Light Bar | miio:basic | [yeelink.light.lamp15](#yeelink-light-lamp15) | Yes | | +| Yeelight Bulb | miio:basic | [yeelink.light.mono1](#yeelink-light-mono1) | Yes | | +| Yeelight White Bulb v2 | miio:basic | [yeelink.light.mono2](#yeelink-light-mono2) | Yes | | +| Yeelight LED Bulb 1S(Dimmable) | miio:basic | [yeelink.light.mono4](#yeelink-light-mono4) | Yes | | +| Yeelight LED Filament Bulb | miio:basic | [yeelink.light.mono5](#yeelink-light-mono5) | Yes | | +| Mi Smart LED Bulb | miio:basic | [yeelink.light.mono6](#yeelink-light-mono6) | Yes | | +| Yeelight LED smart bulb W3(dimmable) | miio:basic | [yeelink.light.monoa](#yeelink-light-monoa) | Yes | | +| Yeelight GU10 Smart Bulb W1(dimmable) | miio:basic | [yeelink.light.monob](#yeelink-light-monob) | Yes | | +| Yeelight Whiteglow Panel Light | miio:basic | [yeelink.light.panel1](#yeelink-light-panel1) | Yes | | +| Yeelight Lightstrip | miio:basic | [yeelink.light.strip1](#yeelink-light-strip1) | Yes | | +| Yeelight Lightstrip Plus | miio:basic | [yeelink.light.strip2](#yeelink-light-strip2) | Yes | | +| Yeelight Willow LED Lightstrip | miio:basic | [yeelink.light.strip4](#yeelink-light-strip4) | Yes | | +| Light Group (Mi & Yeelight) | miio:basic | [yeelink.light.virtual](#yeelink-light-virtual) | Yes | | +| Yeelight Smart Dual Control Module | miio:basic | [yeelink.switch.sw1](#yeelink-switch-sw1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Yeelight Smart Speaker | miio:unsupported | yeelink.wifispeaker.v1 | No | | +| Yilai Ceiling Light Aiyue 480 | miio:basic | [yilai.light.ceiling1](#yilai-light-ceiling1) | Yes | | +| Yilai Ceiling Lamp Hefeng 430 | miio:basic | [yilai.light.ceiling2](#yilai-light-ceiling2) | Yes | | +| Yilai Ceiling Lamp Hefeng Pro | miio:basic | [yilai.light.ceiling3](#yilai-light-ceiling3) | Yes | | +| Mi Water Purifier lx2 | miio:basic | [yunmi.waterpuri.lx2](#yunmi-waterpuri-lx2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier (Under Counter) | miio:basic | [yunmi.waterpuri.lx3](#yunmi-waterpuri-lx3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier lx4 | miio:basic | [yunmi.waterpuri.lx4](#yunmi-waterpuri-lx4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier 1A/400G Pro | miio:basic | [yunmi.waterpuri.lx5](#yunmi-waterpuri-lx5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier (Under Counter) | miio:basic | [yunmi.waterpuri.lx6](#yunmi-waterpuri-lx6) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier 500G/500G Pro | miio:basic | [yunmi.waterpuri.lx7](#yunmi-waterpuri-lx7) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier 600G | miio:basic | [yunmi.waterpuri.lx8](#yunmi-waterpuri-lx8) | Yes | | +| Mi Water Purifier D1 | miio:basic | [yunmi.waterpuri.lx9](#yunmi-waterpuri-lx9) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier lx10 | miio:basic | [yunmi.waterpuri.lx10](#yunmi-waterpuri-lx10) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier C1 (Triple Setting) | miio:basic | [yunmi.waterpuri.lx11](#yunmi-waterpuri-lx11) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier S1 | miio:basic | [yunmi.waterpuri.lx12](#yunmi-waterpuri-lx12) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier v1 | miio:basic | [yunmi.waterpurifier.v1](#yunmi-waterpurifier-v1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier v2 | miio:basic | [yunmi.waterpurifier.v2](#yunmi-waterpurifier-v2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier (Under sink) v3 | miio:basic | [yunmi.waterpurifier.v3](#yunmi-waterpurifier-v3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Water Purifier v4 | miio:basic | [yunmi.waterpurifier.v4](#yunmi-waterpurifier-v4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Ventilation System | miio:basic | [zhimi.airfresh.va2](#zhimi-airfresh-va2) | Yes | | +| Smartmi Fresh Air System (Heating) | miio:basic | [zhimi.airfresh.va4](#zhimi-airfresh-va4) | Yes | | +| Mi Fresh Air Ventilator C1-80 | miio:basic | [zhimi.airfresh.ua1](#zhimi-airfresh-ua1) | Yes | | +| Mi PM2.5 Air Quality Monitor | miio:basic | [zhimi.airmonitor.v1](#zhimi-airmonitor-v1) | Yes | | +| Mi Air Purifier 2 (mini) | miio:basic | [zhimi.airpurifier.m1](#zhimi-airpurifier-m1) | Yes | | +| Mi Air Purifier 2 | miio:basic | [zhimi.airpurifier.m2](#zhimi-airpurifier-m2) | Yes | | +| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.ma1](#zhimi-airpurifier-ma1) | Yes | | +| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.ma2](#zhimi-airpurifier-ma2) | Yes | | +| Mi Air Purifier 3 | miio:basic | [zhimi.airpurifier.ma4](#zhimi-airpurifier-ma4) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mb1](#zhimi-airpurifier-mb1) | Yes | | +| Mi Air Purifier 3/3H | miio:basic | [zhimi.airpurifier.mb3](#zhimi-airpurifier-mb3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Air Purifier 3C | miio:basic | [zhimi.airpurifier.mb4](#zhimi-airpurifier-mb4) | Yes | | +| Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc1](#zhimi-airpurifier-mc1) | Yes | | +| Mi Air Purifier 2H | miio:basic | [zhimi.airpurifier.mc2](#zhimi-airpurifier-mc2) | Yes | | +| Mi Air Purifier Super | miio:basic | [zhimi.airpurifier.sa1](#zhimi-airpurifier-sa1) | Yes | | +| Mi Air Purifier MAX / MAX Pro | miio:basic | [zhimi.airpurifier.sa2](#zhimi-airpurifier-sa2) | Yes | | +| Mi Air Purifier v1 | miio:basic | [zhimi.airpurifier.v1](#zhimi-airpurifier-v1) | Yes | | +| Mi Air Purifier v2 | miio:basic | [zhimi.airpurifier.v2](#zhimi-airpurifier-v2) | Yes | | +| Mi Air Purifier v3 | miio:basic | [zhimi.airpurifier.v3](#zhimi-airpurifier-v3) | Yes | | +| Mi Air Purifier v5 | miio:basic | [zhimi.airpurifier.v5](#zhimi-airpurifier-v5) | Yes | | +| Mi Air Purifier Pro v6 | miio:basic | [zhimi.airpurifier.v6](#zhimi-airpurifier-v6) | Yes | | +| Mi Air Purifier Pro v7 | miio:basic | [zhimi.airpurifier.v7](#zhimi-airpurifier-v7) | Yes | | +| Mi Air Purifier Pro H | miio:basic | [zhimi.airpurifier.vb2](#zhimi-airpurifier-vb2) | Yes | | +| Mi Air Purifier virtual | miio:unsupported | zhimi.airpurifier.virtual | No | | +| Mi Air Purifier 2(Virtual) | miio:unsupported | zhimi.airpurifier.vtl_m1 | No | | +| Smartmi Air Purifier | miio:basic | [zhimi.airpurifier.za1](#zhimi-airpurifier-za1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Standing Fan | miio:basic | [zhimi.fan.sa1](#zhimi-fan-sa1) | Yes | | +| Mi Smart Fan | miio:basic | [zhimi.fan.v1](#zhimi-fan-v1) | Yes | | +| Smartmi DC Pedestal Fan | miio:basic | [zhimi.fan.v2](#zhimi-fan-v2) | Yes | | +| Smartmi DC Pedestal Fan | miio:basic | [zhimi.fan.v3](#zhimi-fan-v3) | Yes | | +| Smartmi Inverter Pedestal Fan | miio:basic | [zhimi.fan.za1](#zhimi-fan-za1) | Yes | | +| Smartmi Standing Fan 2 | miio:basic | [zhimi.fan.za3](#zhimi-fan-za3) | Yes | | +| Smartmi Standing Fan 2S | miio:basic | [zhimi.fan.za4](#zhimi-fan-za4) | Yes | | +| Smartmi Standing Fan 3 | miio:basic | [zhimi.fan.za5](#zhimi-fan-za5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Space Heater S | miio:basic | [zhimi.heater.ma2](#zhimi-heater-ma2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Baseboard Heater E | miio:basic | [zhimi.heater.ma3](#zhimi-heater-ma3) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Mi Smart Space Heater S | miio:basic | [zhimi.heater.mc2](#zhimi-heater-mc2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Smart Fan | miio:basic | [zhimi.heater.na1](#zhimi-heater-na1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Smart Fan Heater | miio:basic | [zhimi.heater.nb1](#zhimi-heater-nb1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Radiant Heater Smart Version | miio:basic | [zhimi.heater.za1](#zhimi-heater-za1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Smart Convector Heater 1S | miio:basic | [zhimi.heater.za2](#zhimi-heater-za2) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Smart Convector Heater 1S | miio:basic | [zhimi.heater.zb1](#zhimi-heater-zb1) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | +| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.ca1](#zhimi-humidifier-ca1) | Yes | | +| Smartmi Evaporative Humidifer 2 | miio:basic | [zhimi.humidifier.ca4](#zhimi-humidifier-ca4) | Yes | | +| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.cb1](#zhimi-humidifier-cb1) | Yes | | +| Smartmi Evaporative Humidifier | miio:basic | [zhimi.humidifier.cb2](#zhimi-humidifier-cb2) | Yes | | +| Smartmi Humidifier | miio:basic | [zhimi.humidifier.v1](#zhimi-humidifier-v1) | Yes | | +| Mi AI Alarm | miio:unsupported | zimi.clock.myk01 | No | | +| Mi Smart Power Strip | miio:basic | [zimi.powerstrip.v2](#zimi-powerstrip-v2) | Yes | | +note: Supported means we received feedback from users this device is working with the binding. +For devices with experimental support, we did not yet confirmation that channels are correctly working. +Please feedback your findings for these devices (e.g. Are all channels working, do they contain the right information, is controlling the devices working etc.) # Channels @@ -1615,6 +1645,62 @@ Note, not all the values need to be in the json file, e.g. a subset of the param | brightness | Dimmer | Light - Brightness | | | color-temperature | Number:Temperature | Light - Color Temperature | | +### IKEA E27 white spectrum opal (ikea.light.led1545g12) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA E27 white spectrum clear (ikea.light.led1546g12) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA E14 white spectrum (ikea.light.led1536g5) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA GU10 white spectrum (ikea.light.led1537r6) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA E27 warm white (ikea.light.led1623g12) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA GU10 warm white (ikea.light.led1650r5) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### IKEA E14 warm white (ikea.light.led1649c5) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + ### Xiaomiyoupin Curtain Controller (Wi-Fi) (lumi.curtain.hagl05) Channels | Channel | Type | Description | Comment | @@ -1641,6 +1727,24 @@ Note, not all the values need to be in the json file, e.g. a subset of the param | alarmingVol | Number | Alarming Volume | | | doorbellPush | String | Doorbell Push | | +### Mi smart Home Gateway Hub (lumi.gateway.mieu01) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| guard | Switch | Guard | | +| corridor | Switch | Automatic Night Light | | +| nightlight | Color | Night Light | | +| rgb | Color | Colored Light | | +| doorbell_volume | Number | Doorbell Volume | | +| alarming_volume | Number | Alarming Volume | | +| gateway_volume | Number | Gateway Volume | | +| arming_time | Number:Time | Arming Time | | +| corridor_on_time | Number:Time | Corridor on time | | +| language | String | Voice prompt Language | | +| zigbee_channel | String | Zigbee Channel | | +| lumi_bind | String | Lumi_bind info | | +| doorbell_push | String | Doorbell Push | | + ### Mi smart Home Gateway Hub v1 (lumi.gateway.v1) Channels | Channel | Type | Description | Comment | @@ -1671,23 +1775,92 @@ Note, not all the values need to be in the json file, e.g. a subset of the param | alarmingVol | Number | Alarming Volume | | | doorbellPush | String | Doorbell Push | | -### Mi smart Home Gateway Hub (lumi.gateway.mieu01) Channels +### Aqara LED Light Bulb (Tunable White) (lumi.light.aqcn02) Channels | Channel | Type | Description | Comment | |----------------------|----------------------|------------------------------------------|------------| -| guard | Switch | Guard | | -| corridor | Switch | Automatic Night Light | | -| nightlight | Color | Night Light | | -| rgb | Color | Colored Light | | -| doorbell_volume | Number | Doorbell Volume | | -| alarming_volume | Number | Alarming Volume | | -| gateway_volume | Number | Gateway Volume | | -| arming_time | Number:Time | Arming Time | | -| corridor_on_time | Number:Time | Corridor on time | | -| language | String | Voice prompt Language | | -| zigbee_channel | String | Zigbee Channel | | -| lumi_bind | String | Lumi_bind info | | -| doorbell_push | String | Doorbell Push | | +| power | Switch | Power | | +| brightness | Dimmer | Brightness | | +| colour_temperature | Number | Color Temperature | | + +### Door lock (lumi.lock.v1) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| status | String | Status | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Aqara Door Lock (lumi.lock.aq1) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| status | String | Status | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Aqara Door Lock S2 (lumi.lock.acn02) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| status | String | Status | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Aqara Door lock S2 Pro (lumi.lock.acn03) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| status | String | Status | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Mi Smart Plug (Zigbee) (lumi.plug.mmeu01) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| power | Switch | Power | | +| load_power | Number | Load Power | | +| en_night_tip_light | Switch | Led Light | | +| poweroff_memory | Switch | Poweroff Memory | | +| max_power | Number | Max Power | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data. | + +### Mi Window and Door Sensor (lumi.sensor_magnet.v2) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data. | + +### Mi Motion Sensor (lumi.sensor_motion.aq2) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Mi Motion Sensor (lumi.sensor_motion.v2) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Mi Temperature and Humidity Sensor (lumi.sensor_ht.v1) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| temperature | Number:Temperature | Temperature | | +| humidity | Number:Dimensionless | Humidity | | + +### Water Leak Sensor (lumi.sensor_wleak.aq1) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| leak | Switch | Leaking | | +| log | String | Device Log | This channel uses cloud to get data. See widget market place for suitable widget to display the data | + +### Aqara Temperature and Humidity Sensor (lumi.weather.v1) Channels + +| Channel | Type | Description | Comment | +|----------------------|----------------------|------------------------------------------|------------| +| temperature | Number:Temperature | Temperature | | +| humidity | Number:Dimensionless | Humidity | | +| pressure | Number:Pressure | pressure | | ### Mi Robot Vacuum-Mop Essential (mijia.vacuum.v2) Channels @@ -2142,7 +2315,7 @@ Note, not all the values need to be in the json file, e.g. a subset of the param | MibandStatus | String | Mi Band Status | | | actions | String | Actions | Value mapping `["light-brightness-down"="Light Brightness Down","light-brightness-up"="Light Brightness Up","light-toggle"="Light Toggle"]` | -### Zhirui Ceiling Lamp Black 40W (philips.light.obceim) Channels +### Zhirui Ceiling Lamp Black 40W (philips.light.obceim) Channels | Channel | Type | Description | Comment | |----------------------|----------------------|------------------------------------------|------------| @@ -6795,6 +6968,83 @@ Dimmer brightness "Light - Brightness" (G_light) {channel="miio:basic:light:brig Number:Temperature color_temperature "Light - Color Temperature" (G_light) {channel="miio:basic:light:color-temperature"} ``` +### IKEA E27 white spectrum opal (ikea.light.led1545g12) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA E27 white spectrum opal" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA E27 white spectrum clear (ikea.light.led1546g12) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA E27 white spectrum clear" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA E14 white spectrum (ikea.light.led1536g5) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA E14 white spectrum" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA GU10 white spectrum (ikea.light.led1537r6) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA GU10 white spectrum" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA E27 warm white (ikea.light.led1623g12) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA E27 warm white" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA GU10 warm white (ikea.light.led1650r5) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA GU10 warm white" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### IKEA E14 warm white (ikea.light.led1649c5) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "IKEA E14 warm white" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + ### Xiaomiyoupin Curtain Controller (Wi-Fi) (lumi.curtain.hagl05) item file lines note: Autogenerated example. Replace the id (curtain) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. @@ -6820,50 +7070,11 @@ note: Autogenerated example. Replace the id (gateway) in the channel with your o ``` Group G_gateway "Mi Air Purifier virtual" -Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:basic:gateway:telnetEnable"} -Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:basic:gateway:doorbellVol"} -Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:basic:gateway:gatewayVol"} -Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:basic:gateway:alarmingVol"} -String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:basic:gateway:doorbellPush"} -``` - -### Mi smart Home Gateway Hub v1 (lumi.gateway.v1) item file lines - -note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. - -``` -Group G_gateway "Mi smart Home Gateway Hub v1" -Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:basic:gateway:telnetEnable"} -Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:basic:gateway:doorbellVol"} -Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:basic:gateway:gatewayVol"} -Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:basic:gateway:alarmingVol"} -String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:basic:gateway:doorbellPush"} -``` - -### Mi smart Home GatewayHub v2 (lumi.gateway.v2) item file lines - -note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. - -``` -Group G_gateway "Mi smart Home GatewayHub v2" -Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:basic:gateway:telnetEnable"} -Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:basic:gateway:doorbellVol"} -Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:basic:gateway:gatewayVol"} -Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:basic:gateway:alarmingVol"} -String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:basic:gateway:doorbellPush"} -``` - -### Mi smart Home Gateway Hub v3 (lumi.gateway.v3) item file lines - -note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. - -``` -Group G_gateway "Mi smart Home Gateway Hub v3" -Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:basic:gateway:telnetEnable"} -Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:basic:gateway:doorbellVol"} -Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:basic:gateway:gatewayVol"} -Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:basic:gateway:alarmingVol"} -String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:basic:gateway:doorbellPush"} +Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:gateway:gateway:telnetEnable"} +Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:gateway:gateway:doorbellVol"} +Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:gateway:gateway:gatewayVol"} +Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:gateway:gateway:alarmingVol"} +String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:gateway:gateway:doorbellPush"} ``` ### Mi smart Home Gateway Hub (lumi.gateway.mieu01) item file lines @@ -6872,19 +7083,181 @@ note: Autogenerated example. Replace the id (gateway) in the channel with your o ``` Group G_gateway "Mi smart Home Gateway Hub" -Switch guard "Guard" (G_gateway) {channel="miio:basic:gateway:guard"} -Switch corridor "Automatic Night Light" (G_gateway) {channel="miio:basic:gateway:corridor"} -Color nightlight "Night Light" (G_gateway) {channel="miio:basic:gateway:nightlight"} -Color rgb "Colored Light" (G_gateway) {channel="miio:basic:gateway:rgb"} -Number doorbell_volume "Doorbell Volume" (G_gateway) {channel="miio:basic:gateway:doorbell_volume"} -Number alarming_volume "Alarming Volume" (G_gateway) {channel="miio:basic:gateway:alarming_volume"} -Number gateway_volume "Gateway Volume" (G_gateway) {channel="miio:basic:gateway:gateway_volume"} -Number:Time arming_time "Arming Time" (G_gateway) {channel="miio:basic:gateway:arming_time"} -Number:Time corridor_on_time "Corridor on time" (G_gateway) {channel="miio:basic:gateway:corridor_on_time"} -String language "Voice prompt Language" (G_gateway) {channel="miio:basic:gateway:language"} -String zigbee_channel "Zigbee Channel" (G_gateway) {channel="miio:basic:gateway:zigbee_channel"} -String lumi_bind "Lumi_bind info" (G_gateway) {channel="miio:basic:gateway:lumi_bind"} -String doorbell_push "Doorbell Push" (G_gateway) {channel="miio:basic:gateway:doorbell_push"} +Switch guard "Guard" (G_gateway) {channel="miio:gateway:gateway:guard"} +Switch corridor "Automatic Night Light" (G_gateway) {channel="miio:gateway:gateway:corridor"} +Color nightlight "Night Light" (G_gateway) {channel="miio:gateway:gateway:nightlight"} +Color rgb "Colored Light" (G_gateway) {channel="miio:gateway:gateway:rgb"} +Number doorbell_volume "Doorbell Volume" (G_gateway) {channel="miio:gateway:gateway:doorbell_volume"} +Number alarming_volume "Alarming Volume" (G_gateway) {channel="miio:gateway:gateway:alarming_volume"} +Number gateway_volume "Gateway Volume" (G_gateway) {channel="miio:gateway:gateway:gateway_volume"} +Number:Time arming_time "Arming Time" (G_gateway) {channel="miio:gateway:gateway:arming_time"} +Number:Time corridor_on_time "Corridor on time" (G_gateway) {channel="miio:gateway:gateway:corridor_on_time"} +String language "Voice prompt Language" (G_gateway) {channel="miio:gateway:gateway:language"} +String zigbee_channel "Zigbee Channel" (G_gateway) {channel="miio:gateway:gateway:zigbee_channel"} +String lumi_bind "Lumi_bind info" (G_gateway) {channel="miio:gateway:gateway:lumi_bind"} +String doorbell_push "Doorbell Push" (G_gateway) {channel="miio:gateway:gateway:doorbell_push"} +``` + +### Mi smart Home Gateway Hub v1 (lumi.gateway.v1) item file lines + +note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_gateway "Mi smart Home Gateway Hub v1" +Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:gateway:gateway:telnetEnable"} +Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:gateway:gateway:doorbellVol"} +Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:gateway:gateway:gatewayVol"} +Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:gateway:gateway:alarmingVol"} +String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:gateway:gateway:doorbellPush"} +``` + +### Mi smart Home GatewayHub v2 (lumi.gateway.v2) item file lines + +note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_gateway "Mi smart Home GatewayHub v2" +Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:gateway:gateway:telnetEnable"} +Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:gateway:gateway:doorbellVol"} +Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:gateway:gateway:gatewayVol"} +Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:gateway:gateway:alarmingVol"} +String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:gateway:gateway:doorbellPush"} +``` + +### Mi smart Home Gateway Hub v3 (lumi.gateway.v3) item file lines + +note: Autogenerated example. Replace the id (gateway) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_gateway "Mi smart Home Gateway Hub v3" +Switch telnetEnable "Enable Telnet" (G_gateway) {channel="miio:gateway:gateway:telnetEnable"} +Number doorbellVol "Doorbell Volume" (G_gateway) {channel="miio:gateway:gateway:doorbellVol"} +Number gatewayVol "Gateway Volume" (G_gateway) {channel="miio:gateway:gateway:gatewayVol"} +Number alarmingVol "Alarming Volume" (G_gateway) {channel="miio:gateway:gateway:alarmingVol"} +String doorbellPush "Doorbell Push" (G_gateway) {channel="miio:gateway:gateway:doorbellPush"} +``` + +### Aqara LED Light Bulb (Tunable White) (lumi.light.aqcn02) item file lines + +note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_light "Aqara LED Light Bulb (Tunable White)" +Switch power "Power" (G_light) {channel="miio:lumi:light:power"} +Dimmer brightness "Brightness" (G_light) {channel="miio:lumi:light:brightness"} +Number colour_temperature "Color Temperature" (G_light) {channel="miio:lumi:light:colour_temperature"} +``` + +### Door lock (lumi.lock.v1) item file lines + +note: Autogenerated example. Replace the id (lock) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_lock "Door lock" +String status "Status" (G_lock) {channel="miio:lumi:lock:status"} +String log "Device Log" (G_lock) {channel="miio:lumi:lock:log"} +``` + +### Aqara Door Lock (lumi.lock.aq1) item file lines + +note: Autogenerated example. Replace the id (lock) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_lock "Aqara Door Lock" +String status "Status" (G_lock) {channel="miio:lumi:lock:status"} +String log "Device Log" (G_lock) {channel="miio:lumi:lock:log"} +``` + +### Aqara Door Lock S2 (lumi.lock.acn02) item file lines + +note: Autogenerated example. Replace the id (lock) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_lock "Aqara Door Lock S2" +String status "Status" (G_lock) {channel="miio:lumi:lock:status"} +String log "Device Log" (G_lock) {channel="miio:lumi:lock:log"} +``` + +### Aqara Door lock S2 Pro (lumi.lock.acn03) item file lines + +note: Autogenerated example. Replace the id (lock) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_lock "Aqara Door lock S2 Pro" +String status "Status" (G_lock) {channel="miio:lumi:lock:status"} +String log "Device Log" (G_lock) {channel="miio:lumi:lock:log"} +``` + +### Mi Smart Plug (Zigbee) (lumi.plug.mmeu01) item file lines + +note: Autogenerated example. Replace the id (plug) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_plug "Mi Smart Plug (Zigbee)" +Switch power "Power" (G_plug) {channel="miio:lumi:plug:power"} +Number load_power "Load Power" (G_plug) {channel="miio:lumi:plug:load_power"} +Switch en_night_tip_light "Led Light" (G_plug) {channel="miio:lumi:plug:en_night_tip_light"} +Switch poweroff_memory "Poweroff Memory" (G_plug) {channel="miio:lumi:plug:poweroff_memory"} +Number max_power "Max Power" (G_plug) {channel="miio:lumi:plug:max_power"} +String log "Device Log" (G_plug) {channel="miio:lumi:plug:log"} +``` + +### Mi Window and Door Sensor (lumi.sensor_magnet.v2) item file lines + +note: Autogenerated example. Replace the id (sensor_magnet) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_sensor_magnet "Mi Window and Door Sensor" +String log "Device Log" (G_sensor_magnet) {channel="miio:lumi:sensor_magnet:log"} +``` + +### Mi Motion Sensor (lumi.sensor_motion.aq2) item file lines + +note: Autogenerated example. Replace the id (sensor_motion) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_sensor_motion "Mi Motion Sensor" +String log "Device Log" (G_sensor_motion) {channel="miio:lumi:sensor_motion:log"} +``` + +### Mi Motion Sensor (lumi.sensor_motion.v2) item file lines + +note: Autogenerated example. Replace the id (sensor_motion) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_sensor_motion "Mi Motion Sensor" +String log "Device Log" (G_sensor_motion) {channel="miio:lumi:sensor_motion:log"} +``` + +### Mi Temperature and Humidity Sensor (lumi.sensor_ht.v1) item file lines + +note: Autogenerated example. Replace the id (sensor_ht) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_sensor_ht "Mi Temperature and Humidity Sensor" +Number:Temperature temperature "Temperature" (G_sensor_ht) {channel="miio:lumi:sensor_ht:temperature"} +Number:Dimensionless humidity "Humidity" (G_sensor_ht) {channel="miio:lumi:sensor_ht:humidity"} +``` + +### Water Leak Sensor (lumi.sensor_wleak.aq1) item file lines + +note: Autogenerated example. Replace the id (sensor_wleak) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_sensor_wleak "Water Leak Sensor" +Switch leak "Leaking" (G_sensor_wleak) {channel="miio:lumi:sensor_wleak:leak"} +String log "Device Log" (G_sensor_wleak) {channel="miio:lumi:sensor_wleak:log"} +``` + +### Aqara Temperature and Humidity Sensor (lumi.weather.v1) item file lines + +note: Autogenerated example. Replace the id (weather) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +``` +Group G_weather "Aqara Temperature and Humidity Sensor" +Number:Temperature temperature "Temperature" (G_weather) {channel="miio:lumi:weather:temperature"} +Number:Dimensionless humidity "Humidity" (G_weather) {channel="miio:lumi:weather:humidity"} +Number:Pressure pressure "pressure" (G_weather) {channel="miio:lumi:weather:pressure"} ``` ### Mi Robot Vacuum-Mop Essential (mijia.vacuum.v2) item file lines @@ -7433,12 +7806,12 @@ String MibandStatus "Mi Band Status" (G_light) {channel="miio:basic:light:Miband String actions "Actions" (G_light) {channel="miio:basic:light:actions"} ``` -### Zhirui Ceiling Lamp Black 40W (philips.light.obceim) item file lines +### Zhirui Ceiling Lamp Black 40W (philips.light.obceim) item file lines note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. ``` -Group G_light " Zhirui Ceiling Lamp Black 40W" +Group G_light "Zhirui Ceiling Lamp Black 40W" Switch on "Power" (G_light) {channel="miio:basic:light:on"} Number mode "Mode" (G_light) {channel="miio:basic:light:mode"} Dimmer brightness "Brightness" (G_light) {channel="miio:basic:light:brightness"} diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoBindingConstants.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoBindingConstants.java index 16e551f4c..c326ade9a 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoBindingConstants.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoBindingConstants.java @@ -36,15 +36,18 @@ public final class MiIoBindingConstants { // List of all Thing Type UIDs public static final ThingTypeUID THING_TYPE_MIIO = new ThingTypeUID(BINDING_ID, "generic"); public static final ThingTypeUID THING_TYPE_BASIC = new ThingTypeUID(BINDING_ID, "basic"); + public static final ThingTypeUID THING_TYPE_LUMI = new ThingTypeUID(BINDING_ID, "lumi"); + public static final ThingTypeUID THING_TYPE_GATEWAY = new ThingTypeUID(BINDING_ID, "gateway"); public static final ThingTypeUID THING_TYPE_VACUUM = new ThingTypeUID(BINDING_ID, "vacuum"); public static final ThingTypeUID THING_TYPE_UNSUPPORTED = new ThingTypeUID(BINDING_ID, "unsupported"); public static final Set SUPPORTED_THING_TYPES_UIDS = Collections - .unmodifiableSet(Stream.of(THING_TYPE_MIIO, THING_TYPE_BASIC, THING_TYPE_VACUUM, THING_TYPE_UNSUPPORTED) - .collect(Collectors.toSet())); + .unmodifiableSet(Stream.of(THING_TYPE_MIIO, THING_TYPE_BASIC, THING_TYPE_LUMI, THING_TYPE_GATEWAY, + THING_TYPE_VACUUM, THING_TYPE_UNSUPPORTED).collect(Collectors.toSet())); public static final Set NONGENERIC_THING_TYPES_UIDS = Collections.unmodifiableSet( - Stream.of(THING_TYPE_BASIC, THING_TYPE_VACUUM, THING_TYPE_UNSUPPORTED).collect(Collectors.toSet())); + Stream.of(THING_TYPE_BASIC, THING_TYPE_LUMI, THING_TYPE_GATEWAY, THING_TYPE_VACUUM, THING_TYPE_UNSUPPORTED) + .collect(Collectors.toSet())); // List of all Channel IDs public static final String CHANNEL_BATTERY = "status#battery"; diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java index 9a63528e7..4eac5b85c 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java @@ -97,6 +97,24 @@ public enum MiIoCommand { GET_MULTI_MAP_LIST("get_multi_maps_list"), GET_ROOM_MAPPING("get_room_mapping"), + // Gateway & child device commands + GET_ARMING("get_arming"), + GET_ARMING_TIME("get_arming_time"), + GET_DOORBEL_VOLUME("get_doorbell_volume"), + GET_GATEWAY_VOLUME("get_gateway_volume"), + GET_ALARMING_VOLUME("get_alarming_volume"), + GET_CLOCK_VOLUME("get_clock_volume"), + GET_DOORBELL_VOLUME("get_doorbell_volume"), + GET_ARM_WAIT_TIME("get_arm_wait_time"), + ALARM_TIME_LEN("alarm_time_len"), + EN_ALARM_LIGHT("en_alarm_light"), + GET_CORRIDOR_ON_TIME("get_corridor_on_time"), + GET_ZIGBEE_CHANNEL("get_zigbee_channel"), + GET_RGB("get_rgb"), + GET_NIGHTLIGHT_RGB("get_night_light_rgb"), + GET_LUMI_BIND("get_lumi_bind"), + GET_PROP_PLUG("get_prop_plug"), + UNKNOWN(""); private final String command; 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 54e71a426..2bb0fa863 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 @@ -95,16 +95,35 @@ public enum MiIoDevices { HUAYI_LIGHT_ZW131("huayi.light.zw131", "HUIZUO ZIWEI Ceiling Lamp", THING_TYPE_BASIC), HUNMI_COOKER_NORMAL3("hunmi.cooker.normal3", "MiJia Rice Cooker", THING_TYPE_UNSUPPORTED), IDELAN_AIRCONDITION_V1("idelan.aircondition.v1", "Jinxing Smart Air Conditioner", THING_TYPE_UNSUPPORTED), + IKEA_LIGHT_LED1545G12("ikea.light.led1545g12", "IKEA E27 white spectrum opal", THING_TYPE_LUMI), + IKEA_LIGHT_LED1546G12("ikea.light.led1546g12", "IKEA E27 white spectrum clear", THING_TYPE_LUMI), + IKEA_LIGHT_LED1536G5("ikea.light.led1536g5", "IKEA E14 white spectrum", THING_TYPE_LUMI), + IKEA_LIGHT_LED1537R6("ikea.light.led1537r6", "IKEA GU10 white spectrum", THING_TYPE_LUMI), + IKEA_LIGHT_LED1623G12("ikea.light.led1623g12", "IKEA E27 warm white", THING_TYPE_LUMI), + IKEA_LIGHT_LED1650R5("ikea.light.led1650r5", "IKEA GU10 warm white", THING_TYPE_LUMI), + IKEA_LIGHT_LED1649C5("ikea.light.led1649c5", "IKEA E14 warm white", THING_TYPE_LUMI), LUMI_CTRL_NEUTRAL1_V1("lumi.ctrl_neutral1.v1", "Aqara Wall Switch(No Neutral, Single Rocker)", THING_TYPE_UNSUPPORTED), LUMI_CTRL_NEUTRAL2_V1("lumi.ctrl_neutral2.v1", "Aqara Wall Switch (No Neutral, Double Rocker)", THING_TYPE_UNSUPPORTED), LUMI_CURTAIN_HAGL05("lumi.curtain.hagl05", "Xiaomiyoupin Curtain Controller (Wi-Fi)", THING_TYPE_BASIC), - LUMI_GATEWAY_MGL03("lumi.gateway.mgl03", "Mi Air Purifier virtual", THING_TYPE_BASIC), - LUMI_GATEWAY_V1("lumi.gateway.v1", "Mi smart Home Gateway Hub v1", THING_TYPE_BASIC), - LUMI_GATEWAY_V2("lumi.gateway.v2", "Mi smart Home GatewayHub v2", THING_TYPE_BASIC), - LUMI_GATEWAY_V3("lumi.gateway.v3", "Mi smart Home Gateway Hub v3", THING_TYPE_BASIC), - LUMI_GATEWAY_MIEU01("lumi.gateway.mieu01", "Mi smart Home Gateway Hub", THING_TYPE_BASIC), + LUMI_GATEWAY_MGL03("lumi.gateway.mgl03", "Mi Air Purifier virtual", THING_TYPE_GATEWAY), + LUMI_GATEWAY_MIEU01("lumi.gateway.mieu01", "Mi smart Home Gateway Hub", THING_TYPE_GATEWAY), + LUMI_GATEWAY_V1("lumi.gateway.v1", "Mi smart Home Gateway Hub v1", THING_TYPE_GATEWAY), + LUMI_GATEWAY_V2("lumi.gateway.v2", "Mi smart Home GatewayHub v2", THING_TYPE_GATEWAY), + LUMI_GATEWAY_V3("lumi.gateway.v3", "Mi smart Home Gateway Hub v3", THING_TYPE_GATEWAY), + LUMI_LIGHT_AQCN02("lumi.light.aqcn02", "Aqara LED Light Bulb (Tunable White)", THING_TYPE_LUMI), + LUMI_LOCK_V1("lumi.lock.v1", "Door lock", THING_TYPE_LUMI), + LUMI_LOCK_AQ1("lumi.lock.aq1", "Aqara Door Lock", THING_TYPE_LUMI), + LUMI_LOCK_ACN02("lumi.lock.acn02", "Aqara Door Lock S2", THING_TYPE_LUMI), + LUMI_LOCK_ACN03("lumi.lock.acn03", "Aqara Door lock S2 Pro", THING_TYPE_LUMI), + LUMI_PLUG_MMEU01("lumi.plug.mmeu01", "Mi Smart Plug (Zigbee)", THING_TYPE_LUMI), + LUMI_SENSOR_MAGNET_V2("lumi.sensor_magnet.v2", "Mi Window and Door Sensor", THING_TYPE_LUMI), + LUMI_SENSOR_MOTION_AQ2("lumi.sensor_motion.aq2", "Mi Motion Sensor", THING_TYPE_LUMI), + LUMI_SENSOR_MOTION_V2("lumi.sensor_motion.v2", "Mi Motion Sensor", THING_TYPE_LUMI), + LUMI_SENSOR_HT_V1("lumi.sensor_ht.v1", "Mi Temperature and Humidity Sensor", THING_TYPE_LUMI), + LUMI_SENSOR_WLEAK_AQ1("lumi.sensor_wleak.aq1", "Water Leak Sensor", THING_TYPE_LUMI), + LUMI_WEATHER_V1("lumi.weather.v1", "Aqara Temperature and Humidity Sensor", THING_TYPE_LUMI), MIDEA_AIRCONDITION_V1("midea.aircondition.v1", "Midea AC-i Youth", THING_TYPE_UNSUPPORTED), MIDEA_AIRCONDITION_V2("midea.aircondition.v2", "Midea Air Conditioner v2", THING_TYPE_UNSUPPORTED), MIDEA_AIRCONDITION_XA1("midea.aircondition.xa1", "Midea AC-Cool Golden", THING_TYPE_UNSUPPORTED), @@ -139,7 +158,7 @@ public enum MiIoDevices { PHILIPS_LIGHT_MONO1("philips.light.mono1", "Philips Smart Lamp", THING_TYPE_BASIC), PHILIPS_LIGHT_MOONLIGHT("philips.light.moonlight", "Philips ZhiRui Bedside Lamp", THING_TYPE_BASIC), PHILIPS_LIGHT_OBCEIL("philips.light.obceil", "Zhirui Ceiling Lamp Black 80W", THING_TYPE_BASIC), - PHILIPS_LIGHT_OBCEIM("philips.light.obceim", " Zhirui Ceiling Lamp Black 40W", THING_TYPE_BASIC), + PHILIPS_LIGHT_OBCEIM("philips.light.obceim", "Zhirui Ceiling Lamp Black 40W", THING_TYPE_BASIC), PHILIPS_LIGHT_OBCEIS("philips.light.obceis", "Zhirui Ceiling Lamp Black 28W", THING_TYPE_BASIC), PHILIPS_LIGHT_RWREAD("philips.light.rwread", "Mijia Philips Study Desk Lamp", THING_TYPE_BASIC), PHILIPS_LIGHT_SCEIL("philips.light.sceil", "Zhirui Ceiling Lamp Starry 80W", THING_TYPE_BASIC), @@ -404,7 +423,7 @@ public enum MiIoDevices { public static MiIoDevices getType(String modelString) { for (MiIoDevices mioDev : MiIoDevices.values()) { - if (mioDev.getModel().equals(modelString)) { + if (mioDev.getModel().equalsIgnoreCase(modelString)) { return mioDev; } } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java index cc4f84a9b..d0e022983 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java @@ -25,13 +25,16 @@ import org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider; import org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService; import org.openhab.binding.miio.internal.cloud.CloudConnector; import org.openhab.binding.miio.internal.handler.MiIoBasicHandler; +import org.openhab.binding.miio.internal.handler.MiIoGatewayHandler; import org.openhab.binding.miio.internal.handler.MiIoGenericHandler; +import org.openhab.binding.miio.internal.handler.MiIoLumiHandler; import org.openhab.binding.miio.internal.handler.MiIoUnsupportedHandler; import org.openhab.binding.miio.internal.handler.MiIoVacuumHandler; import org.openhab.core.common.ThreadPoolManager; import org.openhab.core.i18n.LocaleProvider; import org.openhab.core.i18n.TranslationProvider; import org.openhab.core.io.net.http.HttpClientFactory; +import org.openhab.core.thing.Bridge; import org.openhab.core.thing.Thing; import org.openhab.core.thing.ThingTypeUID; import org.openhab.core.thing.binding.BaseThingHandlerFactory; @@ -122,6 +125,14 @@ public class MiIoHandlerFactory extends BaseThingHandlerFactory { return new MiIoBasicHandler(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, basicChannelTypeProvider, i18nProvider, localeProvider); } + if (thingTypeUID.equals(THING_TYPE_LUMI)) { + return new MiIoLumiHandler(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, + basicChannelTypeProvider, i18nProvider, localeProvider); + } + if (thingTypeUID.equals(THING_TYPE_GATEWAY)) { + return new MiIoGatewayHandler((Bridge) thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, + basicChannelTypeProvider, i18nProvider, localeProvider); + } if (thingTypeUID.equals(THING_TYPE_VACUUM)) { return new MiIoVacuumHandler(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, i18nProvider, localeProvider); diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java index e04a79946..aebccd22a 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java @@ -22,6 +22,7 @@ import org.openhab.core.library.types.PercentType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; @@ -79,6 +80,33 @@ public class Conversions { return rgbValue; } + public static JsonElement deviceDataTab(JsonElement deviceLog, @Nullable Map deviceVariables) + throws ClassCastException, IllegalStateException { + if (!deviceLog.isJsonObject() && !deviceLog.isJsonPrimitive()) { + return deviceLog; + } + JsonObject deviceLogJsonObj = deviceLog.isJsonObject() ? deviceLog.getAsJsonObject() + : (JsonObject) JsonParser.parseString(deviceLog.getAsString()); + JsonArray resultLog = new JsonArray(); + if (deviceLogJsonObj.has("data") && deviceLogJsonObj.get("data").isJsonArray()) { + for (JsonElement element : deviceLogJsonObj.get("data").getAsJsonArray()) { + if (element.isJsonObject()) { + JsonObject dataObject = element.getAsJsonObject(); + if (dataObject.has("value")) { + String value = dataObject.get("value").getAsString(); + JsonElement val = JsonParser.parseString(value); + if (val.isJsonArray()) { + resultLog.add(JsonParser.parseString(val.getAsString())); + } else { + resultLog.add(val); + } + } + } + } + } + return resultLog; + } + private static JsonElement secondsToHours(JsonElement seconds) throws ClassCastException { double value = seconds.getAsDouble() / 3600; return new JsonPrimitive(value); @@ -190,6 +218,8 @@ public class Conversions { return addBrightToHSV(value, deviceVariables); case "BRGBTOHSV": return bRGBtoHSV(value); + case "DEVICEDATATAB": + return deviceDataTab(value, deviceVariables); case "GETDIDELEMENT": return getDidElement(value, deviceVariables); default: diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDatabaseWatchService.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDatabaseWatchService.java index 694e9b5b2..c8591d7e0 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDatabaseWatchService.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDatabaseWatchService.java @@ -114,6 +114,9 @@ public class MiIoDatabaseWatchService extends AbstractWatchService { try { JsonObject deviceMapping = Utils.convertFileToJSON(db); MiIoBasicDevice devdb = GSON.fromJson(deviceMapping, MiIoBasicDevice.class); + if (devdb == null) { + continue; + } for (String id : devdb.getDevice().getId()) { workingDatabaseList.put(id, db); } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/MiCloudConnector.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/MiCloudConnector.java index 096d5b289..9f3bc6491 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/MiCloudConnector.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/MiCloudConnector.java @@ -152,7 +152,7 @@ public class MiCloudConnector { Map map = new HashMap(); map.put("data", "{\"obj_name\":\"" + vacuumMap + "\"}"); String mapResponse = request(url, map); - logger.trace("response: {}", mapResponse); + logger.trace("Response: {}", mapResponse); String errorMsg = ""; try { JsonElement response = JsonParser.parseString(mapResponse); @@ -181,7 +181,6 @@ public class MiCloudConnector { public String getDeviceStatus(String device, String country) throws MiCloudException { final String response = request("/home/device_list", country, "{\"dids\":[\"" + device + "\"]}"); - logger.debug("response: {}", response); return response; } @@ -201,7 +200,6 @@ public class MiCloudConnector { throw new MiCloudException(err, e); } final String response = request("/home/rpc/" + id, country, command); - logger.debug("response: {}", response); return response; } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java index be085f975..7a8056d1d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java @@ -92,6 +92,7 @@ public class MiIoDiscovery extends AbstractDiscoveryService { } private String getCloudDiscoveryMode() { + final Configuration miioConfig = this.miioConfig; if (miioConfig != null) { try { Dictionary properties = miioConfig.getProperties(); @@ -185,20 +186,23 @@ public class MiIoDiscovery extends AbstractDiscoveryService { List dv = cloudConnector.getDevicesList(); for (CloudDeviceDTO device : dv) { String id = device.getDid(); - if (cloudDiscoveryMode.contentEquals(SUPPORTED)) { + if (SUPPORTED.contentEquals(cloudDiscoveryMode)) { if (MiIoDevices.getType(device.getModel()).getThingType().equals(THING_TYPE_UNSUPPORTED)) { - logger.warn("Discovered from cloud, but ignored because not supported: {} {}", id, device); + logger.debug("Discovered from cloud, but ignored because not supported: {} {}", id, device); } } - if (device.getIsOnline()) { + if (device.getIsOnline() || ALL.contentEquals(cloudDiscoveryMode)) { logger.debug("Discovered from cloud: {} {}", id, device); cloudDevices.put(id, device.getLocalip()); String token = device.getToken(); - String label = device.getName() + " " + id + " (" + Utils.getHexId(id) + ")"; + String label = device.getName() + " (" + id + (id.contains(".") ? "" : " / " + Utils.getHexId(id)) + + ")"; + String model = device.getModel(); String country = device.getServer(); boolean isOnline = device.getIsOnline(); + String parent = device.getParentId(); String ip = device.getLocalip(); - submitDiscovery(ip, token, id, label, country, isOnline); + submitDiscovery(ip, token, id, label, model, country, isOnline, parent); } else { logger.debug("Discovered from cloud, but ignored because not online: {} {}", id, device); } @@ -212,8 +216,10 @@ public class MiIoDiscovery extends AbstractDiscoveryService { String token = Utils.getHex(msg.getChecksum()); String hexId = Utils.getHex(msg.getDeviceId()); String id = Utils.fromHEX(hexId); - String label = "Xiaomi Mi Device " + id + " (" + Utils.getHexId(id) + ")"; + String label = "Xiaomi Mi Device " + " (" + id + (id.contains(".") ? "" : " / " + Utils.getHexId(id)) + ")"; + String model = ""; String country = ""; + String parent = ""; boolean isOnline = false; if (ip.equals(cloudDevices.get(id))) { logger.debug("Skipped adding local found {}. Already discovered by cloud.", label); @@ -226,18 +232,27 @@ public class MiIoDiscovery extends AbstractDiscoveryService { logger.debug("Cloud Info: {}", cloudInfo); token = cloudInfo.getToken(); label = cloudInfo.getName() + " " + id + " (" + Utils.getHexId(id) + ")"; + model = cloudInfo.getModel(); country = cloudInfo.getServer(); isOnline = cloudInfo.getIsOnline(); + parent = cloudInfo.getParentId(); } } - submitDiscovery(ip, token, id, label, country, isOnline); + submitDiscovery(ip, token, id, label, model, country, isOnline, parent); } - private void submitDiscovery(String ip, String token, String id, String label, String country, boolean isOnline) { - ThingUID uid = new ThingUID(THING_TYPE_MIIO, Utils.getHexId(id).replace(".", "_")); + private void submitDiscovery(String ip, String token, String id, String label, String model, String country, + boolean isOnline, String parent) { + ThingUID uid; + ThingTypeUID thingType = MiIoDevices.getType(model).getThingType(); + if (id.startsWith("lumi.") || THING_TYPE_GATEWAY.equals(thingType) || THING_TYPE_LUMI.equals(thingType)) { + uid = new ThingUID(thingType, Utils.getHexId(id).replace(".", "_")); + } else { + uid = new ThingUID(THING_TYPE_MIIO, Utils.getHexId(id).replace(".", "_")); + } DiscoveryResultBuilder dr = DiscoveryResultBuilder.create(uid).withProperty(PROPERTY_HOST_IP, ip) .withProperty(PROPERTY_DID, id); - if (IGNORED_TOKENS.contains(token)) { + if (IGNORED_TOKENS.contains(token) || token.isBlank()) { logger.debug("Discovered Mi Device {} ({}) at {} as {}", id, Utils.getHexId(id), ip, uid); logger.debug( "No token discovered for device {}. For options how to get the token, check the binding readme.", @@ -249,6 +264,9 @@ public class MiIoDiscovery extends AbstractDiscoveryService { dr = dr.withProperty(PROPERTY_TOKEN, token).withRepresentationProperty(PROPERTY_DID) .withLabel(label + " with token"); } + if (!model.isEmpty()) { + dr = dr.withProperty(PROPERTY_MODEL, model); + } if (!country.isEmpty() && isOnline) { dr = dr.withProperty(PROPERTY_CLOUDSERVER, country); } @@ -321,9 +339,10 @@ public class MiIoDiscovery extends AbstractDiscoveryService { * Stops the {@link ReceiverThread} thread */ private synchronized void stopReceiverThreat() { + final Thread socketReceiveThread = this.socketReceiveThread; if (socketReceiveThread != null) { socketReceiveThread.interrupt(); - socketReceiveThread = null; + this.socketReceiveThread = null; } closeSocket(); } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java index 3093cb5e1..a3450ea0e 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java @@ -88,6 +88,7 @@ public abstract class MiIoAbstractHandler extends BaseThingHandler implements Mi protected final Bundle bundle; protected final TranslationProvider i18nProvider; protected final LocaleProvider localeProvider; + protected final Map childDevices = new ConcurrentHashMap<>(); protected ScheduledExecutorService miIoScheduler = new ScheduledThreadPoolExecutor(3, new NamedThreadFactory("binding-" + getThing().getUID().getAsString(), true)); @@ -159,14 +160,17 @@ public abstract class MiIoAbstractHandler extends BaseThingHandler implements Mi final MiIoBindingConfiguration configuration = getConfigAs(MiIoBindingConfiguration.class); this.configuration = configuration; - if (configuration.host.isEmpty()) { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "@text/offline.config-error-ip"); - return; - } - if (!tokenCheckPass(configuration.token)) { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, - "@text/offline.config-error-token"); - return; + if (!getThing().getThingTypeUID().equals(THING_TYPE_LUMI)) { + if (configuration.host.isEmpty()) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, + "@text/offline.config-error-ip"); + return; + } + if (!tokenCheckPass(configuration.token)) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, + "@text/offline.config-error-token"); + return; + } } this.cloudServer = configuration.cloudServer; this.deviceId = configuration.deviceId; @@ -303,6 +307,10 @@ public abstract class MiIoAbstractHandler extends BaseThingHandler implements Mi */ protected int sendCommand(String command, String params, String cloudServer, String sender) { try { + if (!sender.isBlank()) { + logger.debug("Received child command from {} : {} - {} (via: {})", sender, command, params, + getThing().getUID()); + } final MiIoAsyncCommunication connection = getConnection(); return (connection != null) ? connection.queueCommand(command, params, cloudServer, sender) : 0; } catch (MiIoCryptoException | IOException e) { @@ -623,8 +631,25 @@ public abstract class MiIoAbstractHandler extends BaseThingHandler implements Mi @Override public void onMessageReceived(MiIoSendCommand response) { + if (!response.getSender().isBlank() && !response.getSender().contentEquals(getThing().getUID().getAsString())) { + for (Entry entry : childDevices.entrySet()) { + if (entry.getKey().getUID().getAsString().contentEquals(response.getSender())) { + logger.trace("Submit response to to child {} -> {}", response.getSender(), entry.getKey().getUID()); + entry.getValue().onMessageReceived(response); + return; + } + } + logger.debug("{} Could not find match in {} child devices for submitter {}", getThing().getUID(), + childDevices.size(), response.getSender()); + return; + } + logger.debug("Received response for device {} type: {}, result: {}, fullresponse: {}", - getThing().getUID().getId(), response.getCommand(), response.getResult(), response.getResponse()); + getThing().getUID().getId(), + MiIoCommand.UNKNOWN.equals(response.getCommand()) + ? response.getCommand().toString() + "(" + response.getCommandString() + ")" + : response.getCommand(), + response.getResult(), response.getResponse()); if (response.isError()) { logger.debug("Error received for command '{}': {}.", response.getCommandString(), response.getResponse().get("error")); diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java index de0157071..ebca1f0b9 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java @@ -90,21 +90,21 @@ import com.google.gson.JsonSyntaxException; */ @NonNullByDefault public class MiIoBasicHandler extends MiIoAbstractHandler { - private final Logger logger = LoggerFactory.getLogger(MiIoBasicHandler.class); - private boolean hasChannelStructure; + protected final Logger logger = LoggerFactory.getLogger(MiIoBasicHandler.class); + protected boolean hasChannelStructure; - private final ExpiringCache updateDataCache = new ExpiringCache<>(CACHE_EXPIRY, () -> { + protected final ExpiringCache updateDataCache = new ExpiringCache<>(CACHE_EXPIRY, () -> { miIoScheduler.schedule(this::updateData, 0, TimeUnit.SECONDS); return true; }); - List refreshList = new ArrayList<>(); - private Map refreshListCustomCommands = new HashMap<>(); + protected List refreshList = new ArrayList<>(); + protected Map refreshListCustomCommands = new HashMap<>(); - private @Nullable MiIoBasicDevice miioDevice; - private Map actions = new HashMap<>(); - private ChannelTypeRegistry channelTypeRegistry; - private BasicChannelTypeProvider basicChannelTypeProvider; + protected @Nullable MiIoBasicDevice miioDevice; + protected Map actions = new HashMap<>(); + protected ChannelTypeRegistry channelTypeRegistry; + protected BasicChannelTypeProvider basicChannelTypeProvider; private Map customRefreshInterval = new HashMap<>(); public MiIoBasicHandler(Thing thing, MiIoDatabaseWatchService miIoDatabaseWatchService, @@ -301,14 +301,14 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } - private void forceStatusUpdate() { + protected void forceStatusUpdate() { updateDataCache.invalidateValue(); miIoScheduler.schedule(() -> { updateData(); }, 3000, TimeUnit.MILLISECONDS); } - private @Nullable JsonElement miotTransform(MiIoBasicChannel miIoBasicChannel, @Nullable JsonElement value) { + protected @Nullable JsonElement miotTransform(MiIoBasicChannel miIoBasicChannel, @Nullable JsonElement value) { JsonObject json = new JsonObject(); json.addProperty("did", miIoBasicChannel.getChannel()); json.addProperty("siid", miIoBasicChannel.getSiid()); @@ -317,7 +317,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return json; } - private @Nullable JsonElement miotActionTransform(MiIoDeviceAction action, MiIoBasicChannel miIoBasicChannel, + protected @Nullable JsonElement miotActionTransform(MiIoDeviceAction action, MiIoBasicChannel miIoBasicChannel, @Nullable JsonElement value) { JsonObject json = new JsonObject(); json.addProperty("did", miIoBasicChannel.getChannel()); @@ -344,8 +344,8 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { final MiIoBasicDevice midevice = miioDevice; if (midevice != null) { deviceVariables.put(TIMESTAMP, Instant.now().getEpochSecond()); - refreshProperties(midevice); - refreshCustomProperties(midevice); + refreshProperties(midevice, ""); + refreshCustomProperties(midevice, false); refreshNetwork(); } } catch (Exception e) { @@ -377,14 +377,16 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return true; } - private void refreshCustomProperties(MiIoBasicDevice midevice) { + protected void refreshCustomProperties(MiIoBasicDevice midevice, boolean cloudOnly) { + logger.debug("Custom Refresh for device '{}': {} channels ", getThing().getUID(), + refreshListCustomCommands.size()); for (MiIoBasicChannel miChannel : refreshListCustomCommands.values()) { if (customRefreshIntervalCheck(miChannel) || !linkedChannelCheck(miChannel)) { continue; } final JsonElement para = miChannel.getCustomRefreshParameters(); String cmd = miChannel.getChannelCustomRefreshCommand() + (para != null ? para.toString() : ""); - if (!cmd.startsWith("/")) { + if (!cmd.startsWith("/") && !cloudOnly) { cmds.put(sendCommand(cmd), miChannel.getChannel()); } else { if (cloudServer.isBlank()) { @@ -397,10 +399,14 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } - private boolean refreshProperties(MiIoBasicDevice device) { - MiIoCommand command = MiIoCommand.getCommand(device.getDevice().getPropertyMethod()); + protected boolean refreshProperties(MiIoBasicDevice device, String childId) { + String command = device.getDevice().getPropertyMethod(); int maxProperties = device.getDevice().getMaxProperties(); JsonArray getPropString = new JsonArray(); + if (!childId.isBlank()) { + getPropString.add(childId); + maxProperties++; + } for (MiIoBasicChannel miChannel : refreshList) { if (customRefreshIntervalCheck(miChannel) || !linkedChannelCheck(miChannel)) { continue; @@ -419,22 +425,32 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { if (getPropString.size() >= maxProperties) { sendRefreshProperties(command, getPropString); getPropString = new JsonArray(); + if (!childId.isBlank()) { + getPropString.add(childId); + } } } - if (getPropString.size() > 0) { + if (getPropString.size() > (childId.isBlank() ? 0 : 1)) { sendRefreshProperties(command, getPropString); } return true; } - private void sendRefreshProperties(MiIoCommand command, JsonArray getPropString) { - sendCommand(command, getPropString.toString()); + protected void sendRefreshProperties(String command, JsonArray getPropString) { + JsonArray para = getPropString; + if (MiIoCommand.GET_DEVICE_PROPERTY_EXP.getCommand().contentEquals(command)) { + logger.debug("This seems a subdevice propery refresh for {}... ({} {})", getThing().getUID(), command, + getPropString.toString()); + para = new JsonArray(); + para.add(getPropString); + } + sendCommand(command, para.toString(), getCloudServer()); } /** * Checks if the channel structure has been build already based on the model data. If not build it. */ - private void checkChannelStructure() { + protected void checkChannelStructure() { final MiIoBindingConfiguration configuration = this.configuration; if (configuration == null) { return; @@ -457,17 +473,16 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { if (miChannel.getChannelCustomRefreshCommand().isBlank()) { refreshList.add(miChannel); } else { - String i = miChannel.getChannelCustomRefreshCommand().split("\\[")[0]; - refreshListCustomCommands.put(i.trim(), miChannel); + String cm = miChannel.getChannelCustomRefreshCommand(); + refreshListCustomCommands.put(cm.trim(), miChannel); } } } } - } } - private boolean buildChannelStructure(String deviceName) { + protected boolean buildChannelStructure(String deviceName) { logger.debug("Building Channel Structure for {} - Model: {}", getThing().getUID().toString(), deviceName); URL fn = miIoDatabaseWatchService.getDatabaseUrl(deviceName); if (fn == null) { @@ -531,7 +546,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return false; } - private @Nullable ChannelUID addChannel(ThingBuilder thingBuilder, MiIoBasicChannel miChannel, String model, + protected @Nullable ChannelUID addChannel(ThingBuilder thingBuilder, MiIoBasicChannel miChannel, String model, String key) { String channel = miChannel.getChannel(); String dataType = miChannel.getType(); @@ -571,7 +586,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return channelUID; } - private @Nullable MiIoBasicChannel getChannel(String parameter) { + protected @Nullable MiIoBasicChannel getChannel(String parameter) { for (MiIoBasicChannel refreshEntry : refreshList) { if (refreshEntry.getProperty().equals(parameter)) { return refreshEntry; @@ -591,13 +606,22 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return null; } - private void updatePropsFromJsonArray(MiIoSendCommand response) { + protected void updatePropsFromJsonArray(MiIoSendCommand response) { + boolean isSubdeviceUpdate = false; JsonArray res = response.getResult().getAsJsonArray(); JsonArray para = JsonParser.parseString(response.getCommandString()).getAsJsonObject().get("params") .getAsJsonArray(); + if (para.get(0).isJsonArray()) { + isSubdeviceUpdate = true; + para = para.get(0).getAsJsonArray(); + para.remove(0); + if (res.get(0).isJsonArray()) { + res = res.get(0).getAsJsonArray(); + } + } if (res.size() != para.size()) { - logger.debug("Unexpected size different. Request size {}, response size {}. (Req: {}, Resp:{})", - para.size(), res.size(), para, res); + logger.debug("Unexpected size different{}. Request size {}, response size {}. (Req: {}, Resp:{})", + isSubdeviceUpdate ? " for childdevice refresh" : "", para.size(), res.size(), para, res); return; } for (int i = 0; i < para.size(); i++) { @@ -621,7 +645,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } - private void updatePropsFromJsonObject(MiIoSendCommand response) { + protected void updatePropsFromJsonObject(MiIoSendCommand response) { JsonObject res = response.getResult().getAsJsonObject(); for (Object k : res.keySet()) { String param = (String) k; @@ -635,7 +659,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } - private void updateChannel(@Nullable MiIoBasicChannel basicChannel, String param, JsonElement value) { + protected void updateChannel(@Nullable MiIoBasicChannel basicChannel, String param, JsonElement value) { JsonElement val = value; deviceVariables.put(param, val); if (basicChannel == null) { @@ -712,7 +736,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } - private void quantityTypeUpdate(MiIoBasicChannel basicChannel, JsonElement val, String type) { + protected void quantityTypeUpdate(MiIoBasicChannel basicChannel, JsonElement val, String type) { if (!basicChannel.getUnit().isBlank()) { Unit unit = MiIoQuantiyTypes.get(basicChannel.getUnit()); if (unit != null) { @@ -751,7 +775,10 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { @Override public void onMessageReceived(MiIoSendCommand response) { super.onMessageReceived(response); - if (response.isError()) { + if (response.isError() || (!response.getSender().isBlank() + && !response.getSender().contentEquals(getThing().getUID().getAsString()))) { + logger.trace("Device {} is not processing command {} as no match. Sender id:'{}'", getThing().getUID(), + response.getId(), response.getSender()); return; } try { @@ -790,6 +817,9 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } cmds.remove(response.getId()); + } else { + logger.debug("Could not identify channel for {}. Device {} has {} commands in queue.", + response.getMethod(), getThing().getUID(), cmds.size()); } break; } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoGatewayHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoGatewayHandler.java new file mode 100644 index 000000000..70e841e42 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoGatewayHandler.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2010-2022 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.binding.miio.internal.handler; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider; +import org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService; +import org.openhab.binding.miio.internal.cloud.CloudConnector; +import org.openhab.core.i18n.LocaleProvider; +import org.openhab.core.i18n.TranslationProvider; +import org.openhab.core.thing.Bridge; +import org.openhab.core.thing.Thing; +import org.openhab.core.thing.binding.BaseThingHandler; +import org.openhab.core.thing.binding.BridgeHandler; +import org.openhab.core.thing.binding.ThingHandler; +import org.openhab.core.thing.binding.builder.BridgeBuilder; +import org.openhab.core.thing.type.ChannelTypeRegistry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The {@link MiIoGatewayHandler} is responsible for handling commands, which are + * sent to one of the channels. + * + * @author Marcel Verpaalen - Initial contribution + */ +@NonNullByDefault +public class MiIoGatewayHandler extends MiIoBasicHandler implements BridgeHandler { + + private final Logger logger = LoggerFactory.getLogger(MiIoGatewayHandler.class); + + public MiIoGatewayHandler(Bridge thing, MiIoDatabaseWatchService miIoDatabaseWatchService, + CloudConnector cloudConnector, ChannelTypeRegistry channelTypeRegistry, + BasicChannelTypeProvider basicChannelTypeProvider, TranslationProvider i18nProvider, + LocaleProvider localeProvider) { + super(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, basicChannelTypeProvider, + i18nProvider, localeProvider); + } + + @Override + public Bridge getThing() { + return (Bridge) super.getThing(); + } + + /** + * Creates a bridge builder, which allows to modify the bridge. The method + * {@link BaseThingHandler#updateThing(Thing)} must be called to persist the changes. + * + * @return {@link BridgeBuilder} which builds an exact copy of the bridge + */ + @Override + protected BridgeBuilder editThing() { + return BridgeBuilder.create(thing.getThingTypeUID(), thing.getUID()).withBridge(thing.getBridgeUID()) + .withChannels(thing.getChannels()).withConfiguration(thing.getConfiguration()) + .withLabel(thing.getLabel()).withLocation(thing.getLocation()).withProperties(thing.getProperties()); + } + + @Override + public void childHandlerInitialized(ThingHandler childHandler, Thing childThing) { + logger.debug("Child registered with gateway: {} {} -> {} {}", childThing.getUID(), childThing.getLabel(), + getThing().getUID(), getThing().getLabel()); + childDevices.put(childThing, (MiIoLumiHandler) childHandler); + } + + @Override + public void childHandlerDisposed(ThingHandler childHandler, Thing childThing) { + logger.debug("Child released from gateway: {} {} -> {} {}", childThing.getUID(), childThing.getLabel(), + getThing().getUID(), getThing().getLabel()); + childDevices.remove(childThing); + } + + public @Nullable BridgeHandler getHandler() { + return this; + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoLumiHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoLumiHandler.java new file mode 100644 index 000000000..8a3f35041 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoLumiHandler.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2010-2022 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.binding.miio.internal.handler; + +import java.time.Instant; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.openhab.binding.miio.internal.MiIoBindingConfiguration; +import org.openhab.binding.miio.internal.MiIoSendCommand; +import org.openhab.binding.miio.internal.basic.BasicChannelTypeProvider; +import org.openhab.binding.miio.internal.basic.MiIoBasicDevice; +import org.openhab.binding.miio.internal.basic.MiIoDatabaseWatchService; +import org.openhab.binding.miio.internal.cloud.CloudConnector; +import org.openhab.core.i18n.LocaleProvider; +import org.openhab.core.i18n.TranslationProvider; +import org.openhab.core.thing.Bridge; +import org.openhab.core.thing.Thing; +import org.openhab.core.thing.ThingStatus; +import org.openhab.core.thing.ThingStatusDetail; +import org.openhab.core.thing.type.ChannelTypeRegistry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The {@link MiIoLumiHandler} is responsible for handling commands, which are + * sent to one of the channels. + * + * @author Marcel Verpaalen - Initial contribution + */ +@NonNullByDefault +public class MiIoLumiHandler extends MiIoBasicHandler { + + private final Logger logger = LoggerFactory.getLogger(MiIoLumiHandler.class); + private @Nullable MiIoGatewayHandler bridgeHandler; + + public MiIoLumiHandler(Thing thing, MiIoDatabaseWatchService miIoDatabaseWatchService, + CloudConnector cloudConnector, ChannelTypeRegistry channelTypeRegistry, + BasicChannelTypeProvider basicChannelTypeProvider, TranslationProvider i18nProvider, + LocaleProvider localeProvider) { + super(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry, basicChannelTypeProvider, + i18nProvider, localeProvider); + } + + @Override + public void initialize() { + super.initialize(); + isIdentified = false; + updateStatus(ThingStatus.UNKNOWN); + + final MiIoBindingConfiguration config = this.configuration; + if (config != null && config.deviceId.isBlank()) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Missing required deviceId"); + return; + } + Bridge bridge = getBridge(); + if (bridge == null) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, + "No device bridge has been configured"); + return; + } else { + logger.debug("Bridge for {} {} = {} {} ({})", getThing().getUID(), getThing().getLabel(), + bridge.getBridgeUID(), bridge.getLabel(), bridge.getHandler()); + } + bridgeHandler = null; + } + + @Nullable + MiIoGatewayHandler getBridgeHandler() { + if (bridgeHandler == null) { + Bridge bridge = getBridge(); + if (bridge != null) { + final MiIoGatewayHandler bridgeHandler = (MiIoGatewayHandler) bridge.getHandler(); + if (bridgeHandler != null) { + if (!bridgeHandler.childDevices.containsKey(getThing())) { + logger.warn(("Child device {} missing at bridge {}. We should not see this"), + getThing().getUID(), bridgeHandler.getThing().getUID()); + bridgeHandler.childDevices.forEach((k, v) -> logger.debug("Devices in bridge: {} : {}", k, v)); + } + this.bridgeHandler = bridgeHandler; + return bridgeHandler; + } else { + logger.debug("Bridge is defined, but bridge handler not found for {} {}.", getThing().getUID(), + getThing().getLabel()); + } + } + logger.debug("Bridge is missing for {} {}", getThing().getUID(), getThing().getLabel()); + } + return this.bridgeHandler; + } + + @Override + public String getCloudServer() { + final MiIoGatewayHandler bh = this.bridgeHandler; + if (bh != null) { + return bh.getCloudServer(); + } else { + final MiIoBindingConfiguration config = this.configuration; + return config != null ? config.cloudServer : ""; + } + } + + // Override to inject the sender + @Override + protected int sendCommand(String command, String params, String cloudServer, String sender) { + final MiIoGatewayHandler bridge = getBridgeHandler(); + if (bridge != null) { + logger.debug("Send via bridge {} {} (Cloudserver {})", command, params, cloudServer); + return bridge.sendCommand(command, params, cloudServer, getThing().getUID().getAsString()); + } else { + logger.debug("Bridge handler is null. This is unexpected and prevents sending the update"); + } + return 0; + } + + @Override + protected synchronized void updateData() { + logger.debug("Periodic update for '{}' ({})", getThing().getUID(), getThing().getThingTypeUID()); + try { + checkChannelStructure(); + final MiIoBindingConfiguration config = this.configuration; + final MiIoBasicDevice midevice = miioDevice; + if (midevice != null && configuration != null && config != null) { + Bridge bridge = getBridge(); + if (bridge == null || !bridge.getStatus().equals(ThingStatus.ONLINE)) { + logger.debug("Bridge {} offline, skipping regular refresh for {}", getThing().getBridgeUID(), + getThing().getUID()); + refreshCustomProperties(midevice, true); + return; + } + deviceVariables.put(TIMESTAMP, Instant.now().getEpochSecond()); + logger.debug("Refresh properties for child device {}", getThing().getLabel()); + refreshProperties(midevice, config.deviceId); + logger.debug("Refresh custom commands for child device {}", getThing().getLabel()); + refreshCustomProperties(midevice, false); + } else { + logger.debug("Null value occured for device {}: {}", midevice, config); + } + } catch (Exception e) { + logger.debug("Error while performing periodic refresh for '{}': {}", getThing().getUID(), e.getMessage()); + } + } + + @Override + public void onMessageReceived(MiIoSendCommand response) { + super.onMessageReceived(response); + if (!response.isError() && (!response.getSender().isBlank() + && response.getSender().contentEquals(getThing().getUID().getAsString()))) { + updateStatus(ThingStatus.ONLINE); + } + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java index aa01a1379..b6cb42fe2 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java @@ -301,7 +301,9 @@ public class MiIoUnsupportedHandler extends MiIoAbstractHandler { JsonObject deviceMapping = Utils.convertFileToJSON(fn); logger.debug("Using device database: {} for device {}", fn.getFile(), deviceName); final MiIoBasicDevice device = GSONP.fromJson(deviceMapping, MiIoBasicDevice.class); - return device.getDevice().getChannels(); + if (device != null) { + return device.getDevice().getChannels(); + } } catch (JsonIOException | JsonSyntaxException e) { logger.warn("Error parsing database Json", e); } catch (IOException e) { diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java index 10e745b67..d38d32b9d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java @@ -279,6 +279,9 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler { private boolean updateVacuumStatus(JsonObject statusData) { StatusDTO statusInfo = GSON.fromJson(statusData, StatusDTO.class); + if (statusInfo == null) { + return false; + } safeUpdateState(CHANNEL_BATTERY, statusInfo.getBattery()); if (statusInfo.getCleanArea() != null) { updateState(CHANNEL_CLEAN_AREA, diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/miot/MiotParser.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/miot/MiotParser.java index 0686e206c..f13a51a9f 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/miot/MiotParser.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/miot/MiotParser.java @@ -66,7 +66,6 @@ public class MiotParser { private static final String BASEURL = "https://miot-spec.org/miot-spec-v2/"; private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); private static final boolean SKIP_SIID_1 = true; - private static final boolean INCLUDE_MANUAL_ACTIONS_COMMENT = false; private String model; private @Nullable String urn; @@ -98,7 +97,7 @@ public class MiotParser { * @param device * @return */ - static public String toJson(MiIoBasicDevice device) { + public static String toJson(MiIoBasicDevice device) { String usersJson = GSON.toJson(device); usersJson = usersJson.replace(".0,\n", ",\n"); usersJson = usersJson.replace("\n", "\r\n").replace(" ", "\t"); @@ -329,11 +328,6 @@ public class MiotParser { } deviceMapping.setChannels(miIoBasicChannels); device.setDevice(deviceMapping); - if (actionText.length() > 35 && INCLUDE_MANUAL_ACTIONS_COMMENT) { - deviceMapping.setReadmeComment( - "Identified " + actionText.toString().replace("Manual", "manual").replace("\r\n", "
") - + "Please test and feedback if they are working so they can be linked to a channel."); - } logger.info(channelConfigText.toString()); if (actionText.length() > 30) { logger.info("{}", actionText); @@ -422,6 +416,9 @@ public class MiotParser { .send(); JsonElement json = JsonParser.parseString(response.getContentAsString()); UrnsDTO data = GSON.fromJson(json, UrnsDTO.class); + if (data == null) { + return null; + } for (ModelUrnsDTO device : data.getInstances()) { if (device.getModel().contentEquals(model)) { this.urn = device.getType(); @@ -433,7 +430,6 @@ public class MiotParser { } catch (JsonParseException e) { logger.debug("Failed parsing downloading models: {}", e.getMessage()); } - return null; } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/binding/binding.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/binding/binding.xml index 899afad15..d543701fe 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/binding/binding.xml +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/binding/binding.xml @@ -27,7 +27,7 @@ - + diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/config.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/config.xml index cc1e299d3..b7b2ab8f2 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/config.xml +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/config.xml @@ -46,7 +46,9 @@ true - + + Country code (2 characters) of the Xiaomi cloud server. See binding documentation for mapping of the + country to cloud server true diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/configGatewayDevices.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/configGatewayDevices.xml new file mode 100644 index 000000000..66805926d --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/config/configGatewayDevices.xml @@ -0,0 +1,37 @@ + + + + + + + Device ID number for communication (in Hex) + false + + + + Device model string, used to determine the subtype. + false + + + + Refresh interval for refreshing the data in seconds. (0=disabled) + 30 + true + + + + Timeout time in milliseconds + 15000 + true + + + + Country code (2 characters) of the Xiaomi cloud server. See binding documentation for mapping of the + country to cloud server + true + + + diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties index 2f60bb212..c131cbe89 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties @@ -72,14 +72,33 @@ thing.huayi.light.wyheat = HUIZUO Heating Lamp thing.huayi.light.zw131 = HUIZUO ZIWEI Ceiling Lamp thing.hunmi.cooker.normal3 = MiJia Rice Cooker thing.idelan.aircondition.v1 = Jinxing Smart Air Conditioner +thing.ikea.light.led1545g12 = IKEA E27 white spectrum opal +thing.ikea.light.led1546g12 = IKEA E27 white spectrum clear +thing.ikea.light.led1536g5 = IKEA E14 white spectrum +thing.ikea.light.led1537r6 = IKEA GU10 white spectrum +thing.ikea.light.led1623g12 = IKEA E27 warm white +thing.ikea.light.led1650r5 = IKEA GU10 warm white +thing.ikea.light.led1649c5 = IKEA E14 warm white thing.lumi.ctrl_neutral1.v1 = Aqara Wall Switch(No Neutral, Single Rocker) thing.lumi.ctrl_neutral2.v1 = Aqara Wall Switch (No Neutral, Double Rocker) thing.lumi.curtain.hagl05 = Xiaomiyoupin Curtain Controller (Wi-Fi) thing.lumi.gateway.mgl03 = Mi Air Purifier virtual +thing.lumi.gateway.mieu01 = Mi smart Home Gateway Hub thing.lumi.gateway.v1 = Mi smart Home Gateway Hub v1 thing.lumi.gateway.v2 = Mi smart Home GatewayHub v2 thing.lumi.gateway.v3 = Mi smart Home Gateway Hub v3 -thing.lumi.gateway.mieu01 = Mi smart Home Gateway Hub +thing.lumi.light.aqcn02 = Aqara LED Light Bulb (Tunable White) +thing.lumi.lock.v1 = Door lock +thing.lumi.lock.aq1 = Aqara Door Lock +thing.lumi.lock.acn02 = Aqara Door Lock S2 +thing.lumi.lock.acn03 = Aqara Door lock S2 Pro +thing.lumi.plug.mmeu01 = Mi Smart Plug (Zigbee) +thing.lumi.sensor_magnet.v2 = Mi Window and Door Sensor +thing.lumi.sensor_motion.aq2 = Mi Motion Sensor +thing.lumi.sensor_motion.v2 = Mi Motion Sensor +thing.lumi.sensor_ht.v1 = Mi Temperature and Humidity Sensor +thing.lumi.sensor_wleak.aq1 = Water Leak Sensor +thing.lumi.weather.v1 = Aqara Temperature and Humidity Sensor thing.midea.aircondition.v1 = Midea AC-i Youth thing.midea.aircondition.v2 = Midea Air Conditioner v2 thing.midea.aircondition.xa1 = Midea AC-Cool Golden @@ -114,7 +133,7 @@ thing.philips.light.mceils = Zhirui Ceiling Lamp Nordic 28W thing.philips.light.mono1 = Philips Smart Lamp thing.philips.light.moonlight = Philips ZhiRui Bedside Lamp thing.philips.light.obceil = Zhirui Ceiling Lamp Black 80W -thing.philips.light.obceim = Zhirui Ceiling Lamp Black 40W +thing.philips.light.obceim = Zhirui Ceiling Lamp Black 40W thing.philips.light.obceis = Zhirui Ceiling Lamp Black 28W thing.philips.light.rwread = Mijia Philips Study Desk Lamp thing.philips.light.sceil = Zhirui Ceiling Lamp Starry 80W @@ -896,6 +915,26 @@ ch.lumi.gateway.mieu01.nightlight = Night Light ch.lumi.gateway.mieu01.rgb = Colored Light ch.lumi.gateway.mieu01.zigbee_channel = Zigbee Channel ch.lumi.gateway.telnetEnable = Enable Telnet +ch.lumi.light.aqcn02.brightness = Brightness +ch.lumi.light.aqcn02.colour_temperature = Color Temperature +ch.lumi.light.aqcn02.power = Power +ch.lumi.lock.log = Device Log +ch.lumi.lock.status = Status +ch.lumi.plug.mmeu01.en_night_tip_light = Led Light +ch.lumi.plug.mmeu01.load_power = Load Power +ch.lumi.plug.mmeu01.log = Device Log +ch.lumi.plug.mmeu01.max_power = Max Power +ch.lumi.plug.mmeu01.power = Power +ch.lumi.plug.mmeu01.poweroff_memory = Poweroff Memory +ch.lumi.sensor_ht.v1.humidity = Humidity +ch.lumi.sensor_ht.v1.temperature = Temperature +ch.lumi.sensor_magnet.v2.log = Device Log +ch.lumi.sensor_motion.v2.log = Device Log +ch.lumi.sensor_wleak.aq1.leak = Leaking +ch.lumi.sensor_wleak.aq1.log = Device Log +ch.lumi.weather.v1.humidity = Humidity +ch.lumi.weather.v1.pressure = pressure +ch.lumi.weather.v1.temperature = Temperature ch.mijia.vacuum.v2-miot.alarm = Alarm - Alarm ch.mijia.vacuum.v2-miot.battery-level = Battery - Battery Level ch.mijia.vacuum.v2-miot.brush-left-time = Brush Cleaner - Brush Left Time diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/gatewayThing.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/gatewayThing.xml new file mode 100644 index 000000000..c9e914120 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/gatewayThing.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + Xiaomi + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/lumiThing.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/lumiThing.xml new file mode 100644 index 000000000..9f651e9bb --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/lumiThing.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + Xiaomi + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.json index 8f5b17bac..4cbf58a1b 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.json @@ -76,7 +76,7 @@ ] } ], - "readmeComment": "Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.", + "readmeComment": "Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway if you have the developer key. Otherwise this binding provides experimental support for lumi subdevices", "experimental": true } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.mieu01.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.mieu01.json index 308b02678..be4c9481a 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.mieu01.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.gateway.mieu01.json @@ -223,7 +223,7 @@ "category": "settings" } ], - "readmeComment": "Used to control the gateway itself. Controlling child devices currently only possible via rules", + "readmeComment": "Used to control the gateway itself. Experimental support for controlling lumi subdevices", "experimental": false } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.light.aqcn02.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.light.aqcn02.json new file mode 100644 index 000000000..d26853d3f --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.light.aqcn02.json @@ -0,0 +1,58 @@ +{ + "deviceMapping": { + "id": [ + "lumi.light.aqcn02", + "ikea.light.led1545g12", + "ikea.light.led1546g12", + "ikea.light.led1536g5", + "ikea.light.led1537r6", + "ikea.light.led1623g12", + "ikea.light.led1650r5", + "ikea.light.led1649c5" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 3, + "channels": [ + { + "property": "power_status", + "friendlyName": "Power", + "channel": "power", + "type": "Switch", + "refresh": true, + "actions": [], + "category": "switch", + "tags": [ + "Switch" + ] + }, + { + "property": "light_level", + "friendlyName": "Brightness", + "channel": "brightness", + "type": "Dimmer", + "refresh": true, + "actions": [], + "category": "lightbulb", + "tags": [ + "Setpoint", + "Light" + ] + }, + { + "property": "colour_temperature", + "friendlyName": "Color Temperature", + "channel": "colour_temperature", + "type": "Number", + "refresh": true, + "actions": [], + "category": "colorlight", + "tags": [ + "Setpoint", + "Temperature" + ] + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": true + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.lock.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.lock.json new file mode 100644 index 000000000..c81c8d642 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.lock.json @@ -0,0 +1,50 @@ +{ + "deviceMapping": { + "id": [ + "lumi.lock.v1", + "lumi.lock.aq1", + "lumi.lock.acn02", + "lumi.lock.acn03" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 3, + "channels": [ + { + "property": "status", + "friendlyName": "Status", + "channel": "status", + "type": "String", + "refresh": true, + "actions": [], + "category": "lock", + "tags": [ + "Lock" + ] + }, + { + "property": "log", + "friendlyName": "Device Log", + "channel": "log", + "type": "String", + "refresh": true, + "customRefreshCommand": "/v2/user/getuserdevicedatatab", + "customRefreshParameters": { + "limit": 10, + "timestamp": "$timestamp$", + "did": "$deviceId$", + "type": "prop", + "key": "device_log" + }, + "transformation": "deviceDataTab", + "actions": [], + "category": "setting", + "tags": [ + "Point" + ], + "readmeComment": "This channel uses cloud to get data. See widget market place for suitable widget to display the data" + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": true + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.plug.mmeu01.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.plug.mmeu01.json new file mode 100644 index 000000000..0761a9326 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.plug.mmeu01.json @@ -0,0 +1,117 @@ +{ + "deviceMapping": { + "id": [ + "lumi.plug.mmeu01" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 5, + "channels": [ + { + "property": "power", + "friendlyName": "Power", + "channel": "power", + "type": "Switch", + "refresh": true, + "customRefreshCommand": "{\"sid\":$deviceId$,\"method\":\"get_prop_plug\"} [\"channel_0\"]", + "actions": [ + { + "command": "{\"sid\":$deviceId$,\"method\":\"toggle_plug\"}", + "parameterType": "ONOFF", + "parameters": [ + "channel_0", + "$value$" + ] + } + ], + "category": "switch", + "tags": [ + "Switch" + ] + }, + { + "property": "load_power", + "friendlyName": "Load Power", + "channel": "load_power", + "type": "Number", + "refresh": true, + "customRefreshCommand": "{\"sid\":$deviceId$,\"method\":\"get_prop_plug\"} [\"load_power\"]", + "actions": [], + "category": "switch", + "tags": [ + "Measurement" + ] + }, + { + "property": "en_night_tip_light", + "friendlyName": "Led Light", + "channel": "en_night_tip_light", + "type": "Switch", + "refresh": true, + "actions": [], + "category": "light", + "tags": [ + "Switch" + ] + }, + { + "property": "poweroff_memory", + "friendlyName": "Poweroff Memory", + "channel": "poweroff_memory", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_device_prop", + "parameterType": "EMPTY", + "parameters": [ + { + "sid": "$deviceId$", + "poweroff_memory": "$value$" + } + ] + } + ], + "category": "setting", + "tags": [ + "Switch" + ] + }, + { + "property": "max_power", + "friendlyName": "Max Power", + "channel": "max_power", + "type": "Number", + "refresh": true, + "actions": [], + "category": "power", + "tags": [ + "Setpoint" + ] + }, + { + "property": "log", + "friendlyName": "Device Log", + "channel": "log", + "type": "String", + "refresh": true, + "customRefreshCommand": "/v2/user/getuserdevicedatatab", + "customRefreshParameters": { + "limit": 10, + "timestamp": "$timestamp$", + "did": "$deviceId$", + "type": "prop", + "key": "device_log" + }, + "transformation": "deviceDataTab", + "actions": [], + "category": "setting", + "tags": [ + "Point" + ], + "readmeComment": "This channel uses cloud to get data. See widget market place for suitable widget to display the data." + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": false + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_ht.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_ht.v1.json new file mode 100644 index 000000000..bbda3944a --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_ht.v1.json @@ -0,0 +1,49 @@ +{ + "deviceMapping": { + "id": [ + "lumi.sensor_ht.v1" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 3, + "channels": [ + { + "property": "temperature", + "friendlyName": "Temperature", + "channel": "temperature", + "type": "Number:Temperature", + "unit": "CELSIUS", + "stateDescription": { + "pattern": "%.1f %unit%" + }, + "refresh": true, + "transformation": "/100", + "actions": [], + "category": "temperature", + "tags": [ + "Measurement", + "Temperature" + ] + }, + { + "property": "humidity", + "friendlyName": "Humidity", + "channel": "humidity", + "type": "Number:Dimensionless", + "unit": "PERCENT", + "stateDescription": { + "pattern": "%.0f%%" + }, + "refresh": true, + "transformation": "/100", + "actions": [], + "category": "humidity", + "tags": [ + "Measurement", + "Humidity" + ] + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": true + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_magnet.v2.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_magnet.v2.json new file mode 100644 index 000000000..f383f62bc --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_magnet.v2.json @@ -0,0 +1,35 @@ +{ + "deviceMapping": { + "id": [ + "lumi.sensor_magnet.v2" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 5, + "channels": [ + { + "property": "log", + "friendlyName": "Device Log", + "channel": "log", + "type": "String", + "refresh": true, + "customRefreshCommand": "/v2/user/getuserdevicedatatab", + "customRefreshParameters": { + "limit": 10, + "timestamp": "$timestamp$", + "did": "$deviceId$", + "type": "prop", + "key": "device_log" + }, + "transformation": "deviceDataTab", + "actions": [], + "category": "setting", + "tags": [ + "Point" + ], + "readmeComment": "This channel uses cloud to get data. See widget market place for suitable widget to display the data." + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge. Note: Won\u0027t display the current status. Log only\u0027", + "experimental": false + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_motion.v2.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_motion.v2.json new file mode 100644 index 000000000..10f113f18 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_motion.v2.json @@ -0,0 +1,36 @@ +{ + "deviceMapping": { + "id": [ + "lumi.sensor_motion.v2", + "lumi.sensor_motion.aq2" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 5, + "channels": [ + { + "property": "log", + "friendlyName": "Device Log", + "channel": "log", + "type": "String", + "refresh": true, + "customRefreshCommand": "/v2/user/getuserdevicedatatab", + "customRefreshParameters": { + "limit": 10, + "timestamp": "$timestamp$", + "did": "$deviceId$", + "type": "prop", + "key": "device_log" + }, + "transformation": "deviceDataTab", + "actions": [], + "category": "setting", + "tags": [ + "Point" + ], + "readmeComment": "This channel uses cloud to get data. See widget market place for suitable widget to display the data" + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.Note: Won\u0027t display the current status, nor trigger events. Log only", + "experimental": false + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_wleak.aq1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_wleak.aq1.json new file mode 100644 index 000000000..95e040c50 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.sensor_wleak.aq1.json @@ -0,0 +1,40 @@ +{ + "deviceMapping": { + "id": [ + "lumi.sensor_wleak.aq1" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 5, + "channels": [ + { + "property": "leak", + "friendlyName": "Leaking", + "channel": "leak", + "type": "Switch", + "refresh": true, + "actions": [], + "category": "water", + "tags": [ + "Switch" + ] + }, + { + "property": "log", + "friendlyName": "Device Log", + "channel": "log", + "type": "String", + "refresh": true, + "customRefreshCommand": "/v2/user/getuserdevicedatatab [{\"limit\":10,\"timestamp\": $timestamp$,\"did\":\"$deviceId$\",\"type\":\"prop\",\"key\":\"device_log\"}]", + "transformation": "deviceDataTab", + "actions": [], + "category": "setting", + "tags": [ + "Point" + ], + "readmeComment": "This channel uses cloud to get data. See widget market place for suitable widget to display the data" + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": false + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.weather.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.weather.v1.json new file mode 100644 index 000000000..fa3f77600 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/lumi.weather.v1.json @@ -0,0 +1,67 @@ +{ + "deviceMapping": { + "id": [ + "lumi.weather.v1" + ], + "propertyMethod": "get_device_prop_exp", + "maxProperties": 3, + "channels": [ + { + "property": "temperature", + "friendlyName": "Temperature", + "channel": "temperature", + "type": "Number:Temperature", + "unit": "CELSIUS", + "stateDescription": { + "pattern": "%.1f %unit%" + }, + "refresh": true, + "transformation": "/100", + "actions": [], + "category": "temperature", + "tags": [ + "Measurement", + "Temperature" + ] + }, + { + "property": "humidity", + "friendlyName": "Humidity", + "channel": "humidity", + "type": "Number:Dimensionless", + "unit": "PERCENT", + "stateDescription": { + "pattern": "%.0f%%" + }, + "refresh": true, + "transformation": "/100", + "actions": [], + "category": "humidity", + "tags": [ + "Measurement", + "Humidity" + ] + }, + { + "property": "pressure", + "friendlyName": "pressure", + "channel": "pressure", + "type": "Number:Pressure", + "unit": "hPa", + "stateDescription": { + "pattern": "%.1f %unit%" + }, + "refresh": true, + "transformation": "/100", + "actions": [], + "category": "pressure", + "tags": [ + "Measurement", + "Pressure" + ] + } + ], + "readmeComment": "Needs to have the Xiaomi gateway configured in the binding as bridge.", + "experimental": false + } +} diff --git a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ConversionsTest.java b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ConversionsTest.java index 1f977c8d1..28f39ea8d 100644 --- a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ConversionsTest.java +++ b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ConversionsTest.java @@ -80,7 +80,6 @@ public class ConversionsTest { @Test public void getJsonElementTest() { - Map deviceVariables = Collections.emptyMap(); // test invalid missing element diff --git a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiIoQuantiyTypesConversionTest.java b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiIoQuantiyTypesConversionTest.java index 98b1ffa43..4bd7954af 100644 --- a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiIoQuantiyTypesConversionTest.java +++ b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiIoQuantiyTypesConversionTest.java @@ -28,21 +28,19 @@ import org.openhab.binding.miio.internal.miot.MiIoQuantiyTypesConversion; public class MiIoQuantiyTypesConversionTest { @Test - public void UnknownUnitTest() { - + public void unknownUnitTest() { String unitName = "some none existent unit"; assertNull(MiIoQuantiyTypesConversion.getType(unitName)); } @Test - public void NullUnitTest() { + public void nullUnitTest() { String unitName = null; assertNull(MiIoQuantiyTypesConversion.getType(unitName)); } @Test public void regularsUnitTest() { - String unitName = "minute"; assertEquals("Time", MiIoQuantiyTypesConversion.getType(unitName)); diff --git a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiotJsonFileCreator.java b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiotJsonFileCreator.java index f09fceee1..a0cbff260 100644 --- a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiotJsonFileCreator.java +++ b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/MiotJsonFileCreator.java @@ -57,7 +57,6 @@ public class MiotJsonFileCreator { @Disabled public static void main(String[] args) { - LinkedHashMap checksums = new LinkedHashMap<>(); LinkedHashSet models = new LinkedHashSet<>(); if (args.length > 0) { diff --git a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java index e1173fab0..a16a707ea 100644 --- a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java +++ b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java @@ -25,11 +25,15 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.TreeMap; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -38,6 +42,7 @@ import org.openhab.binding.miio.internal.basic.MiIoBasicChannel; import org.openhab.binding.miio.internal.basic.MiIoBasicDevice; import org.openhab.binding.miio.internal.basic.OptionsValueListDTO; import org.openhab.binding.miio.internal.basic.StateDescriptionDTO; +import org.openhab.core.thing.ThingTypeUID; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,15 +73,19 @@ public class ReadmeHelper { private static final String I18N_CHANNEL_FILE = "./src/main/resources/OH-INF/i18n/basic.properties"; private static final boolean UPDATE_OPTION_MAPPING_README_COMMENTS = true; + public static final Set DATABASE_THING_TYPES = Collections + .unmodifiableSet(Stream.of(MiIoBindingConstants.THING_TYPE_BASIC, MiIoBindingConstants.THING_TYPE_LUMI, + MiIoBindingConstants.THING_TYPE_GATEWAY).collect(Collectors.toSet())); + @Disabled public static void main(String[] args) { ReadmeHelper rm = new ReadmeHelper(); LOGGER.info("## Creating device list"); StringWriter deviceList = rm.deviceList(); rm.checkDatabaseEntrys(); - LOGGER.info("## Creating channel list for basic devices"); + LOGGER.info("## Creating channel list for json database driven devices"); StringWriter channelList = rm.channelList(); - LOGGER.info("## Creating Item Files for miio:basic devices"); + LOGGER.info("## Creating Item Files for json database driven devices"); StringWriter itemFileExamples = rm.itemFileExamples(); try { String baseDoc = new String(Files.readAllBytes(Paths.get(BASEFILE)), StandardCharsets.UTF_8); @@ -125,35 +134,37 @@ public class ReadmeHelper { sw.write(devicesCount); sw.write("\n\n"); sw.write( - "| Device | ThingType | Device Model | Supported | Remark |\n"); + "| Device | ThingType | Device Model | Supported | Remark |\n"); sw.write( - "|------------------------------|------------------|------------------------|-----------|------------|\n"); + "|------------------------------------|------------------|------------------------|--------------|------------|\n"); Arrays.asList(MiIoDevices.values()).forEach(device -> { if (!device.getModel().equals("unknown")) { String link = device.getModel().replace(".", "-"); boolean isSupported = device.getThingType().equals(MiIoBindingConstants.THING_TYPE_UNSUPPORTED); + Boolean experimental = false; String remark = ""; - if (device.getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) { + if (DATABASE_THING_TYPES.contains(device.getThingType())) { MiIoBasicDevice dev = findDatabaseEntry(device.getModel()); if (dev != null) { remark = dev.getDevice().getReadmeComment(); - final Boolean experimental = dev.getDevice().getExperimental(); - if (experimental != null && experimental.booleanValue()) { + final Boolean experimentalDev = dev.getDevice().getExperimental(); + experimental = experimentalDev != null && experimentalDev.booleanValue(); + if (experimental) { remark += (remark.isBlank() ? "" : "
") + "Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses"; } } } sw.write("| "); - sw.write(minLengthString(device.getDescription(), 28)); + sw.write(minLengthString(device.getDescription(), 34)); sw.write(" | "); sw.write(minLengthString(device.getThingType().toString(), 16)); sw.write(" | "); String model = isSupported ? device.getModel() : "[" + device.getModel() + "](#" + link + ")"; sw.write(minLengthString(model, 22)); sw.write(" | "); - sw.write(isSupported ? "No " : "Yes "); + sw.write(isSupported ? "No " : (experimental ? "Experimental" : "Yes ")); sw.write(" | "); sw.write(minLengthString(remark, 10)); sw.write(" |\n"); @@ -165,7 +176,7 @@ public class ReadmeHelper { private StringWriter channelList() { StringWriter sw = new StringWriter(); Arrays.asList(MiIoDevices.values()).forEach(device -> { - if (device.getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) { + if (DATABASE_THING_TYPES.contains(device.getThingType())) { MiIoBasicDevice dev = findDatabaseEntry(device.getModel()); if (dev != null) { String link = device.getModel().replace(".", "-"); @@ -217,7 +228,7 @@ public class ReadmeHelper { private StringWriter itemFileExamples() { StringWriter sw = new StringWriter(); Arrays.asList(MiIoDevices.values()).forEach(device -> { - if (device.getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) { + if (DATABASE_THING_TYPES.contains(device.getThingType())) { MiIoBasicDevice dev = findDatabaseEntry(device.getModel()); if (dev != null) { sw.write("### " + device.getDescription() + " (" + device.getModel() + ") item file lines\n\n"); @@ -231,7 +242,8 @@ public class ReadmeHelper { for (MiIoBasicChannel ch : dev.getDevice().getChannels()) { sw.write(ch.getType() + " " + ch.getChannel().replace("-", "_") + " \"" + ch.getFriendlyName() - + "\" (" + gr + ") {channel=\"miio:basic:" + id + ":" + ch.getChannel() + "\"}\n"); + + "\" (" + gr + ") {channel=\"" + device.getThingType().toString() + ":" + id + ":" + + ch.getChannel() + "\"}\n"); } sw.write("```\n\n"); } @@ -242,6 +254,7 @@ public class ReadmeHelper { private void checkDatabaseEntrys() { StringBuilder sb = new StringBuilder(); + StringBuilder commentSb = new StringBuilder("Adding support for the following models:\r\n"); Gson gson = new GsonBuilder().setPrettyPrinting().create(); HashMap names = new HashMap(); try { @@ -253,7 +266,12 @@ public class ReadmeHelper { for (MiIoBasicDevice entry : findDatabaseEntrys()) { for (String id : entry.getDevice().getId()) { - if (!MiIoDevices.getType(id).getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) { + if (!DATABASE_THING_TYPES.contains(MiIoDevices.getType(id).getThingType())) { + commentSb.append("* "); + commentSb.append(names.get(id)); + commentSb.append(" (modelId: "); + commentSb.append(id); + commentSb.append(")\r\n"); sb.append(id.toUpperCase().replace(".", "_")); sb.append("(\""); sb.append(id); @@ -267,12 +285,17 @@ public class ReadmeHelper { "id: {} not found in MiIoDevices.java and name unavilable in the device names list.", id); } - sb.append("\", THING_TYPE_BASIC),\r\n"); + sb.append("\", "); + sb.append(id.startsWith("lumi.") + ? (id.startsWith("lumi.gateway") ? "THING_TYPE_GATEWAY" : "THING_TYPE_LUMI") + : "THING_TYPE_BASIC"); + sb.append("),\r\n"); } } } if (sb.length() > 0) { - LOGGER.info("Model(s) not found. Suggested lines to add to MiIoDevices.java\r\n{}", sb.toString()); + LOGGER.info("Model(s) not found. Suggested lines to add to MiIoDevices.java\r\n{}", sb); + LOGGER.info("Model(s) not found. Suggested lines to add to the change log\r\n{}", commentSb); } } @@ -362,7 +385,7 @@ public class ReadmeHelper { return i18nEntries; } - public static Map sortByKeys(Map map) { + public static , V> Map sortByKeys(Map map) { return new TreeMap<>(map); }