Skip to content

Commit

Permalink
[miio] add Xiaomi Mijia Smart Tower Fan (dmaker.fan) (openhab#8283)
Browse files Browse the repository at this point in the history
* [miio] add Xiaomi Mijia Smart Tower Fan (dmaker.fan)

Adding Xiaomi Mijia Smart Tower Fan
* dmaker.fan.p5
* dmaker.fan.p8
* dmaker.fan.p9 (miot)
* dmaker.fan.p10 (miot)
* dmaker.fan.1c & various vacuums

Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv authored and markus7017 committed Sep 18, 2020
1 parent 215ec55 commit a762906
Show file tree
Hide file tree
Showing 5 changed files with 773 additions and 3 deletions.
206 changes: 204 additions & 2 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ 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 | |
| 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 | |
Expand Down Expand Up @@ -161,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 | |
Expand All @@ -182,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 | |
Expand Down Expand Up @@ -247,7 +258,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

Expand Down Expand Up @@ -964,6 +975,94 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
| naturalLevel | Number | Natural Level |
| move | String | Move Direction |

### Xiaomi Mijia Smart Tower Fan (<a name="dmaker-fan-1c">dmaker.fan.1c</a>) 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 (<a name="dmaker-fan-p5">dmaker.fan.p5</a>) 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 (<a name="dmaker-fan-p8">dmaker.fan.p8</a>) 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 (<a name="dmaker-fan-p9">dmaker.fan.p9</a>) 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 (<a name="dmaker-fan-p10">dmaker.fan.p10</a>) 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 (<a name="zhimi-humidifier-v1">zhimi.humidifier.v1</a>) Channels

| Channel | Type | Description |
Expand Down Expand Up @@ -2530,6 +2629,109 @@ 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" <status>
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.

```java
Group G_fan "Xiaomi Mijia Smart Tower Fan" <status>
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.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" <status>
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.

```java
Group G_fan "Xiaomi Mijia Smart Tower Fan" <status>
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" <status>
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.
Expand Down
Loading

0 comments on commit a762906

Please sign in to comment.