From 9dd58a73bc068a45d87f4a81471549ccd111163c Mon Sep 17 00:00:00 2001 From: Marcel Verpaalen Date: Wed, 12 Aug 2020 21:02:53 +0200 Subject: [PATCH 1/3] [miio] add Xiaomi Mijia Smart Tower Fan (dmaker.fan) Adding Xiaomi Mijia Smart Tower Fan * dmaker.fan.p5 * dmaker.fan.p9 (miot) * dmaker.fan.p10 (miot) Signed-off-by: Marcel Verpaalen --- bundles/org.openhab.binding.miio/README.md | 122 ++++++++- .../binding/miio/internal/MiIoDevices.java | 3 + .../resources/database/dmaker.fan.p5.json | 133 ++++++++++ .../database/dmaker.fan.p9-miot.json | 236 ++++++++++++++++++ 4 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json create mode 100644 bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 5e37933b7171e..3870d5c0b8681 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -130,6 +130,9 @@ or in case of unknown models include the model information e.g.: | 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.za4](#zhimi-fan-za4) | Yes | | +| Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p5](#dmaker-fan-p5) | Yes | | +| Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p9](#dmaker-fan-p9) | Yes | | +| Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p10](#dmaker-fan-p10) | Yes | | | Viomi Internet refrigerator iLive | miio:unsupported | viomi.fridge.v3 | No | | | Mi Smart Home Gateway v1 | miio:unsupported | lumi.gateway.v1 | No | | | Mi Smart Home Gateway v2 | miio:unsupported | lumi.gateway.v2 | No | | @@ -247,7 +250,7 @@ Things using the basic handler (miio:basic things) are driven by json 'database' This instructs the binding which channels to create, which properties and actions are associated with the channels etc. The conf/misc/miio (e.g. in Linux `/opt/openhab2/conf/misc/miio/`) is scanned for database files and will be used for your devices. Note that local database files take preference over build-in ones, hence if a json file is local and in the database the local file will be used. -For format, please check the current database files in openHAB github. +For format, please check the current database files in openHAB GitHub. ## Channels @@ -964,6 +967,60 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | naturalLevel | Number | Natural Level | | move | String | Move Direction | +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p5) Channels + +| Channel | Type | Description | +|------------------|---------|-------------------------------------| +| power | Switch | Power | +| roll | Switch | Rotation | +| mode | Number | Mode | +| angle | Number | Angle | +| timer | Number | Timer | +| beep | Switch | Beep Sound | +| light | Number | Light | +| child_lock | Switch | Child Lock | +| speed | Number | Speed | + +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p9) Channels + +| Channel | Type | Description | +|------------------|---------|-------------------------------------| +| Manufacturer | String | Device Information-Device Manufacturer | +| Model | String | Device Information-Device Model | +| SerialNumber | String | Device Information-Device Serial Number | +| FirmwareRevision | String | Device Information-Current Firmware Version | +| On | Switch | Fan-Switch Status | +| FanLevel | Number | Fan-Fan Level | +| Mode | Number | Fan-Mode | +| HorizontalSwing | Switch | Fan-Horizontal Swing | +| HorizontalAngle | Number | Fan-Horizontal Angle | +| Alarm | Switch | Fan-Alarm | +| OffDelayTime | Number | Fan-Power Off Delay Time | +| Brightness | Switch | Fan-Brightness | +| MotorControl | Number | Fan-Motor Control | +| SpeedLevel | Number | Fan-Speed Level | +| PhysicalControlsLocked | Switch | Physical Control Locked-Physical Control Locked | + +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p10) Channels + +| Channel | Type | Description | +|------------------|---------|-------------------------------------| +| Manufacturer | String | Device Information-Device Manufacturer | +| Model | String | Device Information-Device Model | +| SerialNumber | String | Device Information-Device Serial Number | +| FirmwareRevision | String | Device Information-Current Firmware Version | +| On | Switch | Fan-Switch Status | +| FanLevel | Number | Fan-Fan Level | +| Mode | Number | Fan-Mode | +| HorizontalSwing | Switch | Fan-Horizontal Swing | +| HorizontalAngle | Number | Fan-Horizontal Angle | +| Alarm | Switch | Fan-Alarm | +| OffDelayTime | Number | Fan-Power Off Delay Time | +| Brightness | Switch | Fan-Brightness | +| MotorControl | Number | Fan-Motor Control | +| SpeedLevel | Number | Fan-Speed Level | +| PhysicalControlsLocked | Switch | Physical Control Locked-Physical Control Locked | + ### Mi Humdifier (zhimi.humidifier.v1) Channels | Channel | Type | Description | @@ -2530,6 +2587,69 @@ Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLeve String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"} ``` +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p5) 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 Mijia Smart Tower Fan" +Switch power "Power" (G_fan) {channel="miio:basic:fan:power"} +Switch roll "Rotation" (G_fan) {channel="miio:basic:fan:roll"} +Number mode "Mode" (G_fan) {channel="miio:basic:fan:mode"} +Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"} +Number timer "Timer" (G_fan) {channel="miio:basic:fan:timer"} +Switch beep "Beep Sound" (G_fan) {channel="miio:basic:fan:beep"} +Number light "Light" (G_fan) {channel="miio:basic:fan:light"} +Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"} +Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"} +``` + +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p9) 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 Mijia Smart Tower Fan" +String Manufacturer "Device Information-Device Manufacturer" (G_fan) {channel="miio:basic:fan:Manufacturer"} +String Model "Device Information-Device Model" (G_fan) {channel="miio:basic:fan:Model"} +String SerialNumber "Device Information-Device Serial Number" (G_fan) {channel="miio:basic:fan:SerialNumber"} +String FirmwareRevision "Device Information-Current Firmware Version" (G_fan) {channel="miio:basic:fan:FirmwareRevision"} +Switch On "Fan-Switch Status" (G_fan) {channel="miio:basic:fan:On"} +Number FanLevel "Fan-Fan Level" (G_fan) {channel="miio:basic:fan:FanLevel"} +Number Mode "Fan-Mode" (G_fan) {channel="miio:basic:fan:Mode"} +Switch HorizontalSwing "Fan-Horizontal Swing" (G_fan) {channel="miio:basic:fan:HorizontalSwing"} +Number HorizontalAngle "Fan-Horizontal Angle" (G_fan) {channel="miio:basic:fan:HorizontalAngle"} +Switch Alarm "Fan-Alarm" (G_fan) {channel="miio:basic:fan:Alarm"} +Number OffDelayTime "Fan-Power Off Delay Time" (G_fan) {channel="miio:basic:fan:OffDelayTime"} +Switch Brightness "Fan-Brightness" (G_fan) {channel="miio:basic:fan:Brightness"} +Number MotorControl "Fan-Motor Control" (G_fan) {channel="miio:basic:fan:MotorControl"} +Number SpeedLevel "Fan-Speed Level" (G_fan) {channel="miio:basic:fan:SpeedLevel"} +Switch PhysicalControlsLocked "Physical Control Locked-Physical Control Locked" (G_fan) {channel="miio:basic:fan:PhysicalControlsLocked"} +``` + +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p10) 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 Mijia Smart Tower Fan" +String Manufacturer "Device Information-Device Manufacturer" (G_fan) {channel="miio:basic:fan:Manufacturer"} +String Model "Device Information-Device Model" (G_fan) {channel="miio:basic:fan:Model"} +String SerialNumber "Device Information-Device Serial Number" (G_fan) {channel="miio:basic:fan:SerialNumber"} +String FirmwareRevision "Device Information-Current Firmware Version" (G_fan) {channel="miio:basic:fan:FirmwareRevision"} +Switch On "Fan-Switch Status" (G_fan) {channel="miio:basic:fan:On"} +Number FanLevel "Fan-Fan Level" (G_fan) {channel="miio:basic:fan:FanLevel"} +Number Mode "Fan-Mode" (G_fan) {channel="miio:basic:fan:Mode"} +Switch HorizontalSwing "Fan-Horizontal Swing" (G_fan) {channel="miio:basic:fan:HorizontalSwing"} +Number HorizontalAngle "Fan-Horizontal Angle" (G_fan) {channel="miio:basic:fan:HorizontalAngle"} +Switch Alarm "Fan-Alarm" (G_fan) {channel="miio:basic:fan:Alarm"} +Number OffDelayTime "Fan-Power Off Delay Time" (G_fan) {channel="miio:basic:fan:OffDelayTime"} +Switch Brightness "Fan-Brightness" (G_fan) {channel="miio:basic:fan:Brightness"} +Number MotorControl "Fan-Motor Control" (G_fan) {channel="miio:basic:fan:MotorControl"} +Number SpeedLevel "Fan-Speed Level" (G_fan) {channel="miio:basic:fan:SpeedLevel"} +Switch PhysicalControlsLocked "Physical Control Locked-Physical Control Locked" (G_fan) {channel="miio:basic:fan:PhysicalControlsLocked"} +``` + ### Mi Humdifier (zhimi.humidifier.v1) item file lines note: Autogenerated example. Replace the id (humidifier) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index 02e89fd62e51a..f5e06f0789664 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 @@ -75,6 +75,9 @@ public enum MiIoDevices { 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_ZA4("zhimi.fan.za4", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), + FAN_P5("dmaker.fan.p5", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), + FAN_P9("dmaker.fan.p9", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), + FAN_P10("dmaker.fan.p10", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FRIDGE_V3("viomi.fridge.v3", "Viomi Internet refrigerator iLive", THING_TYPE_UNSUPPORTED), GATEWAY1("lumi.gateway.v1", "Mi Smart Home Gateway v1", THING_TYPE_UNSUPPORTED), GATEWAY2("lumi.gateway.v2", "Mi Smart Home Gateway v2", THING_TYPE_UNSUPPORTED), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json new file mode 100644 index 0000000000000..35ee631c35dd0 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json @@ -0,0 +1,133 @@ +{ + "deviceMapping": { + "id": [ + "dmaker.fan.p5" + ], + "channels": [ + { + "property": "power", + "friendlyName": "Power", + "channel": "power", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "s_power", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "roll", + "friendlyName": "Rotation", + "channel": "roll", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "s_roll", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "mode", + "friendlyName": "Mode", + "channel": "mode", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_mode", + "parameterType": "STRING" + } + ] + }, + { + "property": "roll_angle", + "friendlyName": "Angle", + "channel": "angle", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_angle", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "timer_off", + "friendlyName": "Timer", + "channel": "timer", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_t_off", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "beep_sound", + "friendlyName": "Beep Sound", + "channel": "beep", + "type": "Switch", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_beep_sound", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "light", + "friendlyName": "Light", + "channel": "light", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_light", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "child_lock", + "friendlyName": "Child Lock", + "channel": "child_lock", + "type": "Switch", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_lock", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "speed", + "friendlyName": "Speed", + "channel": "speed", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_speed", + "parameterType": "NUMBER" + } + ] + } + ] + } +} diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json new file mode 100644 index 0000000000000..a33c7058d0e3a --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json @@ -0,0 +1,236 @@ +{ + "deviceMapping": { + "id": [ + "dmaker.fan.p9", + "dmaker.fan.p10" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ + { + "property": "manufacturer", + "siid": 1, + "piid": 1, + "friendlyName": "Device Information-Device Manufacturer", + "channel": "Manufacturer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, + { + "property": "model", + "siid": 1, + "piid": 2, + "friendlyName": "Device Information-Device Model", + "channel": "Model", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, + { + "property": "serial-number", + "siid": 1, + "piid": 3, + "friendlyName": "Device Information-Device Serial Number", + "channel": "SerialNumber", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, + { + "property": "firmware-revision", + "siid": 1, + "piid": 4, + "friendlyName": "Device Information-Current Firmware Version", + "channel": "FirmwareRevision", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, + { + "property": "on", + "siid": 2, + "piid": 1, + "friendlyName": "Fan-Switch Status", + "channel": "On", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "fan-level", + "siid": 2, + "piid": 2, + "friendlyName": "Fan-Fan Level", + "channel": "FanLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "mode", + "siid": 2, + "piid": 4, + "friendlyName": "Fan-Mode", + "channel": "Mode", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "horizontal-swing", + "siid": 2, + "piid": 5, + "friendlyName": "Fan-Horizontal Swing", + "channel": "HorizontalSwing", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "horizontal-angle", + "siid": 2, + "piid": 6, + "friendlyName": "Fan-Horizontal Angle", + "channel": "HorizontalAngle", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "alarm", + "siid": 2, + "piid": 7, + "friendlyName": "Fan-Alarm", + "channel": "Alarm", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "off-delay-time", + "siid": 2, + "piid": 8, + "friendlyName": "Fan-Power Off Delay Time", + "channel": "OffDelayTime", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "brightness", + "siid": 2, + "piid": 9, + "friendlyName": "Fan-Brightness", + "channel": "Brightness", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "motor-control", + "siid": 2, + "piid": 10, + "friendlyName": "Fan-Motor Control", + "channel": "MotorControl", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "speed-level", + "siid": 2, + "piid": 11, + "friendlyName": "Fan-Speed Level", + "channel": "SpeedLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "physical-controls-locked", + "siid": 3, + "piid": 1, + "friendlyName": "Physical Control Locked-Physical Control Locked", + "channel": "PhysicalControlsLocked", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + } + ] + } +} From 5879af099c6be51518ca99196afd771d216dce9d Mon Sep 17 00:00:00 2001 From: Marcel Verpaalen Date: Thu, 13 Aug 2020 15:03:39 +0200 Subject: [PATCH 2/3] [miio] add dmaker.fan.p8 device Signed-off-by: Marcel Verpaalen --- bundles/org.openhab.binding.miio/README.md | 38 ++++ .../binding/miio/internal/MiIoDevices.java | 1 + .../database/dmaker.fan.p8-miot.json | 184 ++++++++++++++++++ 3 files changed, 223 insertions(+) create mode 100644 bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 3870d5c0b8681..618a3aec47f66 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -131,6 +131,7 @@ or in case of unknown models include the model information e.g.: | Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.za1](#zhimi-fan-za1) | Yes | | | Xiaomi Mi Smart Pedestal Fan | miio:basic | [zhimi.fan.za4](#zhimi-fan-za4) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p5](#dmaker-fan-p5) | Yes | | +| Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p8](#dmaker-fan-p8) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p9](#dmaker-fan-p9) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p10](#dmaker-fan-p10) | Yes | | | Viomi Internet refrigerator iLive | miio:unsupported | viomi.fridge.v3 | No | | @@ -981,6 +982,23 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | child_lock | Switch | Child Lock | | speed | Number | Speed | +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p8) Channels + +| Channel | Type | Description | +|------------------|---------|-------------------------------------| +| Manufacturer | String | Device Information-Device Manufacturer | +| Model | String | Device Information-Device Model | +| SerialNumber | String | Device Information-Device Serial Number | +| FirmwareRevision | String | Device Information-Current Firmware Version | +| On | Switch | Fan-Switch Status | +| FanLevel | Number | Fan-Fan Level | +| HorizontalSwing | Switch | Fan-Horizontal Swing | +| Mode | Number | Fan-Mode | +| OffDelayTime | Number | Fan-Power Off Delay Time | +| Alarm | Switch | Fan-Alarm | +| Brightness | Switch | Fan-Brightness | +| PhysicalControlsLocked | Switch | Physical Control Locked-Physical Control Locked | + ### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p9) Channels | Channel | Type | Description | @@ -2604,6 +2622,26 @@ Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"} Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"} ``` +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p8) 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 Mijia Smart Tower Fan" +String Manufacturer "Device Information-Device Manufacturer" (G_fan) {channel="miio:basic:fan:Manufacturer"} +String Model "Device Information-Device Model" (G_fan) {channel="miio:basic:fan:Model"} +String SerialNumber "Device Information-Device Serial Number" (G_fan) {channel="miio:basic:fan:SerialNumber"} +String FirmwareRevision "Device Information-Current Firmware Version" (G_fan) {channel="miio:basic:fan:FirmwareRevision"} +Switch On "Fan-Switch Status" (G_fan) {channel="miio:basic:fan:On"} +Number FanLevel "Fan-Fan Level" (G_fan) {channel="miio:basic:fan:FanLevel"} +Switch HorizontalSwing "Fan-Horizontal Swing" (G_fan) {channel="miio:basic:fan:HorizontalSwing"} +Number Mode "Fan-Mode" (G_fan) {channel="miio:basic:fan:Mode"} +Number OffDelayTime "Fan-Power Off Delay Time" (G_fan) {channel="miio:basic:fan:OffDelayTime"} +Switch Alarm "Fan-Alarm" (G_fan) {channel="miio:basic:fan:Alarm"} +Switch Brightness "Fan-Brightness" (G_fan) {channel="miio:basic:fan:Brightness"} +Switch PhysicalControlsLocked "Physical Control Locked-Physical Control Locked" (G_fan) {channel="miio:basic:fan:PhysicalControlsLocked"} +``` + ### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p9) item file lines note: Autogenerated example. Replace the id (fan) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index f5e06f0789664..7de8241fdacd2 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 @@ -76,6 +76,7 @@ public enum MiIoDevices { FAN_ZA1("zhimi.fan.za1", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_ZA4("zhimi.fan.za4", "Xiaomi Mi Smart Pedestal Fan", THING_TYPE_BASIC), FAN_P5("dmaker.fan.p5", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), + FAN_P8("dmaker.fan.p8", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FAN_P9("dmaker.fan.p9", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FAN_P10("dmaker.fan.p10", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FRIDGE_V3("viomi.fridge.v3", "Viomi Internet refrigerator iLive", THING_TYPE_UNSUPPORTED), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json new file mode 100644 index 0000000000000..e4156a2bd65dd --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json @@ -0,0 +1,184 @@ +{ + "deviceMapping": { + "id": [ + "dmaker.fan.p8" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ + { + "property": "manufacturer", + "siid": 1, + "piid": 1, + "friendlyName": "Device Information-Device Manufacturer", + "channel": "Manufacturer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "model", + "siid": 1, + "piid": 2, + "friendlyName": "Device Information-Device Model", + "channel": "Model", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "serial-number", + "siid": 1, + "piid": 3, + "friendlyName": "Device Information-Device Serial Number", + "channel": "SerialNumber", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "firmware-revision", + "siid": 1, + "piid": 4, + "friendlyName": "Device Information-Current Firmware Version", + "channel": "FirmwareRevision", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "on", + "siid": 2, + "piid": 1, + "friendlyName": "Fan-Switch Status", + "channel": "On", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "fan-level", + "siid": 2, + "piid": 2, + "friendlyName": "Fan-Fan Level", + "channel": "FanLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "horizontal-swing", + "siid": 2, + "piid": 3, + "friendlyName": "Fan-Horizontal Swing", + "channel": "HorizontalSwing", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "mode", + "siid": 2, + "piid": 7, + "friendlyName": "Fan-Mode", + "channel": "Mode", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "off-delay-time", + "siid": 2, + "piid": 10, + "friendlyName": "Fan-Power Off Delay Time", + "channel": "OffDelayTime", + "channelType": "miot_uint16", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "alarm", + "siid": 2, + "piid": 11, + "friendlyName": "Fan-Alarm", + "channel": "Alarm", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "brightness", + "siid": 2, + "piid": 12, + "friendlyName": "Fan-Brightness", + "channel": "Brightness", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "physical-controls-locked", + "siid": 3, + "piid": 1, + "friendlyName": "Physical Control Locked-Physical Control Locked", + "channel": "PhysicalControlsLocked", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + } + ] + } + } + \ No newline at end of file From b7d68deb579c011555120f188798cbc6b75c0733 Mon Sep 17 00:00:00 2001 From: Marcel Verpaalen Date: Thu, 13 Aug 2020 23:59:36 +0200 Subject: [PATCH 3/3] [miio] add dmaker.fan.1c & various vacuums Signed-off-by: Marcel Verpaalen --- bundles/org.openhab.binding.miio/README.md | 46 ++- .../binding/miio/internal/MiIoDevices.java | 9 +- .../database/dmaker.fan.p8-miot.json | 348 +++++++++--------- 3 files changed, 229 insertions(+), 174 deletions(-) diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 618a3aec47f66..0e04bca6f33e9 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -130,6 +130,7 @@ or in case of unknown models include the model information e.g.: | 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.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 | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p8](#dmaker-fan-p8) | Yes | | | Xiaomi Mijia Smart Tower Fan | miio:basic | [dmaker.fan.p9](#dmaker-fan-p9) | Yes | | @@ -165,6 +166,11 @@ or in case of unknown models include the model information e.g.: | Mi Toothbrush | miio:unsupported | soocare.toothbrush.x3 | No | | | Mi Robot Vacuum | miio:vacuum | [rockrobo.vacuum.v1](#rockrobo-vacuum-v1) | Yes | | | Mi Xiaowa Vacuum c1 | miio:vacuum | [roborock.vacuum.c1](#roborock-vacuum-c1) | Yes | | +| Roborock Vacuum S6 pure | miio:vacuum | [roborock.vacuum.a08](#roborock-vacuum-a08) | Yes | | +| Roborock S6 MaxV / T7 Pro | miio:vacuum | [roborock.vacuum.a09](#roborock-vacuum-a09) | Yes | | +| Roborock S6 MaxV / T7 Pro | miio:vacuum | [roborock.vacuum.a10](#roborock-vacuum-a10) | Yes | | +| Roborock S6 MaxV / T7 Pro | miio:vacuum | [roborock.vacuum.a11](#roborock-vacuum-a11) | Yes | | +| Roborock Vacuum S6 pure | miio:vacuum | [roborock.vacuum.p5](#roborock-vacuum-p5) | Yes | | | Mi Robot Vacuum v2 | miio:vacuum | [roborock.vacuum.s5](#roborock-vacuum-s5) | Yes | | | Mi Robot Vacuum 1S | miio:vacuum | [roborock.vacuum.m1s](#roborock-vacuum-m1s) | Yes | | | Mi Robot Vacuum S4 | miio:vacuum | [roborock.vacuum.s4](#roborock-vacuum-s4) | Yes | | @@ -186,7 +192,8 @@ or in case of unknown models include the model information e.g.: | Roborock Vacuum S6 | miio:vacuum | [roborock.vacuum.s6](#roborock-vacuum-s6) | Yes | | | Rockrobo Xiaowa Vacuum v2 | miio:unsupported | roborock.vacuum.e2 | No | | | Xiaomi Mijia vacuum V-RVCLM21B | miio:unsupported | viomi.vacuum.v6 | No | | -| Xiaomi Mijia vacuum STYJ02YM | miio:unsupported | viomi.vacuum.v7 | No | | +| Xiaomi Mijia vacuum mop STYJ02YM | miio:unsupported | viomi.vacuum.v7 | No | | +| Xiaomi Mijia vacuum mop STYJ02YM | miio:unsupported | viomi.vacuum.v8 | No | | | Vacuum 1C STYTJ01ZHM | miio:basic | [dreame.vacuum.mc1808](#dreame-vacuum-mc1808) | Yes | | | roborock.vacuum.c1 | miio:unsupported | roborock.vacuum.c1 | No | | | Rockrobo Xiaowa Sweeper v2 | miio:unsupported | roborock.sweeper.e2v2 | No | | @@ -968,6 +975,23 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | naturalLevel | Number | Natural Level | | move | String | Move Direction | +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.1c) Channels + +| Channel | Type | Description | +|------------------|---------|-------------------------------------| +| Manufacturer | String | Device Information-Device Manufacturer | +| Model | String | Device Information-Device Model | +| SerialNumber | String | Device Information-Device Serial Number | +| FirmwareRevision | String | Device Information-Current Firmware Version | +| On | Switch | Fan-Switch Status | +| FanLevel | Number | Fan-Fan Level | +| HorizontalSwing | Switch | Fan-Horizontal Swing | +| Mode | Number | Fan-Mode | +| OffDelayTime | Number | Fan-Power Off Delay Time | +| Alarm | Switch | Fan-Alarm | +| Brightness | Switch | Fan-Brightness | +| PhysicalControlsLocked | Switch | Physical Control Locked-Physical Control Locked | + ### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p5) Channels | Channel | Type | Description | @@ -2605,6 +2629,26 @@ Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLeve String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"} ``` +### Xiaomi Mijia Smart Tower Fan (dmaker.fan.1c) 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 Mijia Smart Tower Fan" +String Manufacturer "Device Information-Device Manufacturer" (G_fan) {channel="miio:basic:fan:Manufacturer"} +String Model "Device Information-Device Model" (G_fan) {channel="miio:basic:fan:Model"} +String SerialNumber "Device Information-Device Serial Number" (G_fan) {channel="miio:basic:fan:SerialNumber"} +String FirmwareRevision "Device Information-Current Firmware Version" (G_fan) {channel="miio:basic:fan:FirmwareRevision"} +Switch On "Fan-Switch Status" (G_fan) {channel="miio:basic:fan:On"} +Number FanLevel "Fan-Fan Level" (G_fan) {channel="miio:basic:fan:FanLevel"} +Switch HorizontalSwing "Fan-Horizontal Swing" (G_fan) {channel="miio:basic:fan:HorizontalSwing"} +Number Mode "Fan-Mode" (G_fan) {channel="miio:basic:fan:Mode"} +Number OffDelayTime "Fan-Power Off Delay Time" (G_fan) {channel="miio:basic:fan:OffDelayTime"} +Switch Alarm "Fan-Alarm" (G_fan) {channel="miio:basic:fan:Alarm"} +Switch Brightness "Fan-Brightness" (G_fan) {channel="miio:basic:fan:Brightness"} +Switch PhysicalControlsLocked "Physical Control Locked-Physical Control Locked" (G_fan) {channel="miio:basic:fan:PhysicalControlsLocked"} +``` + ### Xiaomi Mijia Smart Tower Fan (dmaker.fan.p5) item file lines note: Autogenerated example. Replace the id (fan) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index 7de8241fdacd2..2d812dc51691f 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 @@ -75,6 +75,7 @@ public enum MiIoDevices { 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_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), FAN_P8("dmaker.fan.p8", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), FAN_P9("dmaker.fan.p9", "Xiaomi Mijia Smart Tower Fan", THING_TYPE_BASIC), @@ -111,6 +112,11 @@ public enum MiIoDevices { TOOTHBRUSH("soocare.toothbrush.x3", "Mi Toothbrush", THING_TYPE_UNSUPPORTED), VACUUM("rockrobo.vacuum.v1", "Mi Robot Vacuum", THING_TYPE_VACUUM), VACUUM_C1("roborock.vacuum.c1", "Mi Xiaowa Vacuum c1", THING_TYPE_VACUUM), + VACUUM_A08("roborock.vacuum.a08", "Roborock Vacuum S6 pure", THING_TYPE_VACUUM), + VACUUM_A09("roborock.vacuum.a09", "Roborock S6 MaxV / T7 Pro", THING_TYPE_VACUUM), + VACUUM_A10("roborock.vacuum.a10", "Roborock S6 MaxV / T7 Pro", THING_TYPE_VACUUM), + VACUUM_A11("roborock.vacuum.a11", "Roborock S6 MaxV / T7 Pro", THING_TYPE_VACUUM), + VACUUM_P5("roborock.vacuum.p5", "Roborock Vacuum S6 pure", THING_TYPE_VACUUM), VACUUM2("roborock.vacuum.s5", "Mi Robot Vacuum v2", THING_TYPE_VACUUM), VACUUM1S("roborock.vacuum.m1s", "Mi Robot Vacuum 1S", THING_TYPE_VACUUM), VACUUMS4("roborock.vacuum.s4", "Mi Robot Vacuum S4", THING_TYPE_VACUUM), @@ -132,7 +138,8 @@ public enum MiIoDevices { VACUUMSS62("roborock.vacuum.s6", "Roborock Vacuum S6", THING_TYPE_VACUUM), VACUUME2("roborock.vacuum.e2", "Rockrobo Xiaowa Vacuum v2", THING_TYPE_UNSUPPORTED), VACUUME_V6("viomi.vacuum.v6", "Xiaomi Mijia vacuum V-RVCLM21B", THING_TYPE_UNSUPPORTED), - VACUUME_V7("viomi.vacuum.v7", "Xiaomi Mijia vacuum STYJ02YM", THING_TYPE_UNSUPPORTED), + VACUUME_V7("viomi.vacuum.v7", "Xiaomi Mijia vacuum mop STYJ02YM", THING_TYPE_UNSUPPORTED), + VACUUME_V8("viomi.vacuum.v8", "Xiaomi Mijia vacuum mop STYJ02YM", THING_TYPE_UNSUPPORTED), VACUUM_MC1808("dreame.vacuum.mc1808", "Vacuum 1C STYTJ01ZHM", THING_TYPE_BASIC), ROBOROCK_VACUUM_C1("roborock.vacuum.c1", "roborock.vacuum.c1", THING_TYPE_UNSUPPORTED), SWEEPER2("roborock.sweeper.e2v2", "Rockrobo Xiaowa Sweeper v2", THING_TYPE_UNSUPPORTED), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json index e4156a2bd65dd..344d423a912ae 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json @@ -1,184 +1,188 @@ { "deviceMapping": { - "id": [ - "dmaker.fan.p8" - ], - "propertyMethod": "get_properties", - "maxProperties": 2, - "channels": [ - { - "property": "manufacturer", - "siid": 1, - "piid": 1, - "friendlyName": "Device Information-Device Manufacturer", - "channel": "Manufacturer", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [] - }, - { - "property": "model", - "siid": 1, - "piid": 2, - "friendlyName": "Device Information-Device Model", - "channel": "Model", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [] - }, - { - "property": "serial-number", - "siid": 1, - "piid": 3, - "friendlyName": "Device Information-Device Serial Number", - "channel": "SerialNumber", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [] - }, - { - "property": "firmware-revision", - "siid": 1, - "piid": 4, - "friendlyName": "Device Information-Current Firmware Version", - "channel": "FirmwareRevision", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [] - }, - { - "property": "on", - "siid": 2, - "piid": 1, - "friendlyName": "Fan-Switch Status", - "channel": "On", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ + "id": [ + "dmaker.fan.p8", + "dmaker.fan.1c" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "fan-level", - "siid": 2, - "piid": 2, - "friendlyName": "Fan-Fan Level", - "channel": "FanLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ + "property": "manufacturer", + "siid": 1, + "piid": 1, + "friendlyName": "Device Information-Device Manufacturer", + "channel": "Manufacturer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "horizontal-swing", - "siid": 2, - "piid": 3, - "friendlyName": "Fan-Horizontal Swing", - "channel": "HorizontalSwing", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ + "property": "model", + "siid": 1, + "piid": 2, + "friendlyName": "Device Information-Device Model", + "channel": "Model", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "mode", - "siid": 2, - "piid": 7, - "friendlyName": "Fan-Mode", - "channel": "Mode", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ + "property": "serial-number", + "siid": 1, + "piid": 3, + "friendlyName": "Device Information-Device Serial Number", + "channel": "SerialNumber", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "off-delay-time", - "siid": 2, - "piid": 10, - "friendlyName": "Fan-Power Off Delay Time", - "channel": "OffDelayTime", - "channelType": "miot_uint16", - "type": "Number", - "refresh": true, - "actions": [ + "property": "firmware-revision", + "siid": 1, + "piid": 4, + "friendlyName": "Device Information-Current Firmware Version", + "channel": "FirmwareRevision", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + ] + }, { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "alarm", - "siid": 2, - "piid": 11, - "friendlyName": "Fan-Alarm", - "channel": "Alarm", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ + "property": "on", + "siid": 2, + "piid": 1, + "friendlyName": "Fan-Switch Status", + "channel": "On", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "brightness", - "siid": 2, - "piid": 12, - "friendlyName": "Fan-Brightness", - "channel": "Brightness", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ + "property": "fan-level", + "siid": 2, + "piid": 2, + "friendlyName": "Fan-Fan Level", + "channel": "FanLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "physical-controls-locked", - "siid": 3, - "piid": 1, - "friendlyName": "Physical Control Locked-Physical Control Locked", - "channel": "PhysicalControlsLocked", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ + "property": "horizontal-swing", + "siid": 2, + "piid": 3, + "friendlyName": "Fan-Horizontal Swing", + "channel": "HorizontalSwing", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "mode", + "siid": 2, + "piid": 7, + "friendlyName": "Fan-Mode", + "channel": "Mode", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "off-delay-time", + "siid": 2, + "piid": 10, + "friendlyName": "Fan-Power Off Delay Time", + "channel": "OffDelayTime", + "channelType": "miot_uint16", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "alarm", + "siid": 2, + "piid": 11, + "friendlyName": "Fan-Alarm", + "channel": "Alarm", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "brightness", + "siid": 2, + "piid": 12, + "friendlyName": "Fan-Brightness", + "channel": "Brightness", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, { - "command": "set_properties", - "parameterType": "ONOFFBOOL" + "property": "physical-controls-locked", + "siid": 3, + "piid": 1, + "friendlyName": "Physical Control Locked-Physical Control Locked", + "channel": "PhysicalControlsLocked", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] } - ] - } - ] + ] } - } - \ No newline at end of file +}