Skip to content

Commit

Permalink
[miio] add fan za4 (openhab#7942)
Browse files Browse the repository at this point in the history
Add standing fan za4

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
  • Loading branch information
marcelrv authored and knikhilwiz committed Jul 12, 2020
1 parent 5f567be commit cff4887
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 0 deletions.
38 changes: 38 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ However, for devices that are unsupported, you may override the value and try to
| 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.za4](#zhimi-fan-za4) | 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 @@ -919,6 +920,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 (<a name="zhimi-fan-za4">zhimi.fan.za4</a>) Channels

| Channel | Type | Description |
|------------------|---------|-------------------------------------|
| 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 |

### Mi Humdifier (<a name="zhimi-humidifier-v1">zhimi.humidifier.v1</a>) Channels

| Channel | Type | Description |
Expand Down Expand Up @@ -2429,6 +2447,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.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.

```java
Group G_fan "Xiaomi Mi Smart Pedestal Fan" <status>
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"}
```

### 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
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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_ZA4("zhimi.fan.za4", "Xiaomi Mi Smart Pedestal 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),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"deviceMapping": {
"id": [
"zhimi.fan.za4"
],
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "angle_enable",
"friendlyName": "Rotation",
"channel": "angleEnable",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_angle_enable",
"parameterType": "ONOFF"
}
]
},
{
"property": "use_time",
"friendlyName": "Run Time",
"channel": "usedhours",
"type": "Number",
"refresh": true,
"transformation": "SecondsToHours",
"ChannelGroup": "Status",
"actions": []
},
{
"property": "angle",
"friendlyName": "Angle",
"channel": "angle",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_angle",
"parameterType": "NUMBER"
}
]
},
{
"property": "poweroff_time",
"friendlyName": "Timer",
"channel": "poweroffTime",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_poweroff_time",
"parameterType": "NUMBER"
}
]
},
{
"property": "buzzer",
"friendlyName": "Buzzer",
"channel": "buzzer",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_buzzer",
"parameterType": "NUMBER"
}
]
},
{
"property": "led_b",
"friendlyName": "LED",
"channel": "led_b",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_led_b",
"parameterType": "NUMBER"
}
]
},
{
"property": "child_lock",
"friendlyName": "Child Lock",
"channel": "child_lock",
"type": "Switch",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_child_lock",
"parameterType": "ONOFF"
}
]
},
{
"property": "speed_level",
"friendlyName": "Speed Level",
"channel": "speedLevel",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_speed_level",
"parameterType": "NUMBER"
}
]
},
{
"property": "speed",
"friendlyName": "Speed",
"channel": "speed",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_speed",
"parameterType": "NUMBER"
}
]
},
{
"property": "natural_level",
"friendlyName": "Natural Level",
"channel": "naturalLevel",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_natural_level",
"parameterType": "NUMBER"
}
]
},
{
"property": "",
"friendlyName": "Move Direction",
"channel": "move",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_move",
"parameterType": "STRING"
}
]
}
]
}
}

0 comments on commit cff4887

Please sign in to comment.