From 258f709ab810adc6e7b08a249aabf8c1053b518d Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 11 Nov 2020 20:28:39 +0100 Subject: [PATCH] [miio] Add zhimi.fan.za1 (#8998) Signed-off-by: Marcel Verpaalen --- bundles/org.openhab.binding.miio/README.md | 50 ++++++++++++++++--- .../binding/miio/internal/MiIoDevices.java | 1 + .../resources/database/zhimi.fan.za4.json | 3 +- 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index ccb3ecb0c..ed40baa27 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -134,6 +134,7 @@ or in case of unknown models include the model information of a similar device t | Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.v3](#zhimi-fan-v3) | Yes | | | Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.sa1](#zhimi-fan-sa1) | Yes | | | Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.za1](#zhimi-fan-za1) | Yes | | +| Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.za3](#zhimi-fan-za3) | Yes | | | Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.za4](#zhimi-fan-za4) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.1c](#dmaker-fan-1c) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p5](#dmaker-fan-p5) | Yes | | @@ -1095,6 +1096,23 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | acPower | Switch | AC Power | | | move | String | Move Direction | | +### Xiaomi Mi Smart Pedestal Fan (zhimi.fan.za3) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| power | Switch | Power | | +| angleEnable | Switch | Rotation | | +| usedhours | Number | Run Time | | +| angle | Number | Angle | | +| poweroffTime | Number | Timer | | +| buzzer | Number | Buzzer | | +| led_b | Number | LED | | +| child_lock | Switch | Child Lock | | +| speedLevel | Number | Speed Level | | +| speed | Number | Speed | | +| naturalLevel | Number | Natural Level | | +| move | String | Move Direction | | + ### Xiaomi Mi Smart Pedestal Fan (zhimi.fan.za4) Channels | Channel | Type | Description | Comment | @@ -1825,7 +1843,7 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena |------------------|---------|-------------------------------------|------------| | power | Switch | Power | If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware | | usb | Switch | USB | | -| temperature | Number | Temperature | | +| temperature | Number:Temperature | Temperature | | | led | Switch | Wifi LED | | ### Mi Power-plug (chuangmi.plug.m3) Channels @@ -1850,7 +1868,7 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena |------------------|---------|-------------------------------------|------------| | power | Switch | Power | If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware | | usb | Switch | USB | | -| temperature | Number | Temperature | | +| temperature | Number:Temperature | Temperature | | | led | Switch | Wifi LED | | ### Mi Smart Plug (chuangmi.plug.hmi208) Channels @@ -1859,7 +1877,7 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena |------------------|---------|-------------------------------------|------------| | power | Switch | Power | If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware | | usb | Switch | USB | | -| temperature | Number | Temperature | | +| temperature | Number:Temperature | Temperature | | | led | Switch | Wifi LED | | ### Qing Mi Smart Power Strip v1 (qmi.powerstrip.v1) Channels @@ -3968,6 +3986,26 @@ Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"} String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"} ``` +### Xiaomi Mi Smart Pedestal Fan (zhimi.fan.za3) item file lines + +note: Autogenerated example. Replace the id (fan) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_fan "Xiaomi Mi Smart Pedestal Fan" +Switch power "Power" (G_fan) {channel="miio:basic:fan:power"} +Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"} +Number usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"} +Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"} +Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"} +Number buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"} +Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"} +Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"} +Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"} +Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"} +Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"} +String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"} +``` + ### Xiaomi Mi Smart Pedestal Fan (zhimi.fan.za4) item file lines note: Autogenerated example. Replace the id (fan) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. @@ -4862,7 +4900,7 @@ note: Autogenerated example. Replace the id (plug) in the channel with your own. Group G_plug "Mi Power-plug v3" Switch power "Power" (G_plug) {channel="miio:basic:plug:power"} Switch usb "USB" (G_plug) {channel="miio:basic:plug:usb"} -Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} +Number:Temperature temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} Switch led "Wifi LED" (G_plug) {channel="miio:basic:plug:led"} ``` @@ -4896,7 +4934,7 @@ note: Autogenerated example. Replace the id (plug) in the channel with your own. Group G_plug "Mi Smart Plug" Switch power "Power" (G_plug) {channel="miio:basic:plug:power"} Switch usb "USB" (G_plug) {channel="miio:basic:plug:usb"} -Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} +Number:Temperature temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} Switch led "Wifi LED" (G_plug) {channel="miio:basic:plug:led"} ``` @@ -4908,7 +4946,7 @@ note: Autogenerated example. Replace the id (plug) in the channel with your own. Group G_plug "Mi Smart Plug" Switch power "Power" (G_plug) {channel="miio:basic:plug:power"} Switch usb "USB" (G_plug) {channel="miio:basic:plug:usb"} -Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} +Number:Temperature temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"} Switch led "Wifi LED" (G_plug) {channel="miio:basic:plug:led"} ``` 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 ca2d1d9c7..6abdbbfa8 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 @@ -74,6 +74,7 @@ public enum MiIoDevices { FAN3("zhimi.fan.v3", "Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_SA1("zhimi.fan.sa1", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_ZA1("zhimi.fan.za1", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), + FAN_ZA3("zhimi.fan.za3", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_ZA4("zhimi.fan.za4", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_1C("dmaker.fan.1c", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FAN_P5("dmaker.fan.p5", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json index 2c58d5588..fa0841e16 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json @@ -1,7 +1,8 @@ { "deviceMapping": { "id": [ - "zhimi.fan.za4" + "zhimi.fan.za4", + "zhimi.fan.za3" ], "channels": [ {