Skip to content

Commit

Permalink
[miio] Add support for Smart Air Purifier 4 Lite zhimi.airp.rmb1 (ope…
Browse files Browse the repository at this point in the history
…nhab#17680)

* [miio] add support for Smart Air Purifier 4 Lite zhimi.airp.rmb1

Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv authored Dec 21, 2024
1 parent 1b75e03 commit 62cdb14
Show file tree
Hide file tree
Showing 5 changed files with 1,751 additions and 40 deletions.
52 changes: 51 additions & 1 deletion bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ Currently the miio binding supports more than 360 different models.
| Xiaomi Smart Air Purifier 4 Compact | miio:basic | [zhimi.airp.cpa4](#zhimi-airp-cpa4) | 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.airp.mb4a](#zhimi-airp-mb4a) | Yes | |
| Xiaomi Smart Air Purifier 4 | miio:basic | [zhimi.airp.mb5](#zhimi-airp-mb5) | Experimental | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
| Xiaomi Smart Air Purifier 4 Lite | miio:basic | [zhimi.airp.rmb1](#zhimi-airp-rmb1) | Experimental | This device may not work with direct connection hence require cloud connection<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
| Xiaomi Smart Air Purifier 4 Pro | miio:basic | [zhimi.airp.vb4](#zhimi-airp-vb4) | 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 | |
Expand Down Expand Up @@ -1682,7 +1683,7 @@ Note, not all the values need to be in the json file, e.g. a subset of the param

| Channel | Type | Description | Comment |
|----------------------------|----------------------|------------------------------------------|------------|
| actions | String | Actions | |
| actions | String | Actions | Value mapping `["vacuum-start-sweep"="Vacuum Start Sweep","vacuum-stop-sweeping"="Vacuum Stop Sweeping","vacuum-start-room-sweep"="Vacuum Start Room Sweep","battery-start-charge"="Battery Start Charge","brush-cleaner-reset-brush-life"="Brush Cleaner Reset Brush Life","brush-cleaner-reset-brush-life"="Brush Cleaner Reset Brush Life","filter-reset-filter-life"="Filter Reset Filter Life","vacuum-extend-start-clean"="Vacuum Extend Start Clean","vacuum-extend-stop-clean"="Vacuum Extend Stop Clean","map-map-req"="Map Map Req","map-update-map"="Map Update Map","audio-position"="Audio Position","audio-play-sound"="Audio Play Sound","time-delete-timer"="Time Delete Timer","collect-dust-start-collect"="Collect Dust Start Collect"]` |
| status | Number | Robot Cleaner - Status | Value mapping `["1"="Sweeping","2"="Idle","3"="Paused","4"="Error","5"="Go Charging","6"="Charging","7"="Mopping","11"="Building","13"="Charging Completed"]` |
| fault | Number | Robot Cleaner - Device Fault | |
| mode | Number | Robot Cleaner - Mode | Value mapping `["0"="Silent","1"="Basic","2"="Strong","3"="Full Speed"]` |
Expand Down Expand Up @@ -5459,6 +5460,29 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
| average_aqi | Number | Aqi - Average Aqi | |
| aqi_state | Number | Aqi - Aqi State | Value mapping `["0"="AQI-GOOD-L","1"="AQI-GOOD-H","2"="AQI-MID-L","3"="AQI-MID-H","4"="AQI-BAD-L","5"="AQI-BAD-H"]` |

### Xiaomi Smart Air Purifier 4 Lite (<a name="zhimi-airp-rmb1">zhimi.airp.rmb1</a>) Channels

| Channel | Type | Description | Comment |
|----------------------------|----------------------|------------------------------------------|------------|
| actions | String | Actions | Value mapping `["air-purifier-toggle"="Air Purifier Toggle","filter-reset-filter-life"="Filter Reset Filter Life","custom-service-toggle-mode"="Custom Service Toggle Mode"]` |
| on | Switch | Air Purifier - Switch Status | |
| fault | Number | Air Purifier - Device Fault | Value mapping `["0"="No Faults","2"="Motor Stop","3"="Sensor Lost"]` |
| mode | Number | Mode | Value mapping `["0"="Auto","1"="Sleep","2"="Favorite"]` |
| relative_humidity | Number:Dimensionless | Environment - Relative Humidity | |
| pm2_5_density | Number | Environment - PM2 5 Density | |
| temperature | Number:Temperature | Temperature | |
| filter_life_level | Number:Dimensionless | Filter - Filter Life Level | |
| filter_used_time | Number:Time | Filter - Filter Used Time | |
| filter_left_time | Number:Time | Filter - Filter Left Time | |
| alarm | Switch | Alarm - Alarm | |
| physical_controls_locked | Switch | Physical Control Locked - Physical Control Locked | |
| brightness | Number | Screen - Brightness | Value mapping `["0"="Close","1"="Bright","2"="Brightest"]` |
| temperature_display_unit | Number | Device Display Unit - Temperature Display Unit | Value mapping `["1"="Celsius","2"="Fahrenheit"]` |
| moto_speed_rpm | Number | Custom Service - Moto Speed Rpm | |
| country_code | Number | Custom Service - Country Code | Value mapping `["2"="EU","1"="US","82"="KR","886"="TW","66"="TH","44"="UK","91"="IN"]` |
| favorite_level | Number | Custom Service - Favorite Level | |
| aqi_updata_heartbeat | Number | Aqi - Aqi Updata Heartbeat | |

### Xiaomi Smart Air Purifier 4 Pro (<a name="zhimi-airp-vb4">zhimi.airp.vb4</a>) Channels

| Channel | Type | Description | Comment |
Expand Down Expand Up @@ -12068,6 +12092,32 @@ Number average_aqi "Aqi - Average Aqi" (G_airp) {channel="miio:basic:airp:averag
Number aqi_state "Aqi - Aqi State" (G_airp) {channel="miio:basic:airp:aqi_state"}
```

### Xiaomi Smart Air Purifier 4 Lite (zhimi.airp.rmb1) item file lines

note: Autogenerated example. Replace the id (airp) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.

```java
Group G_airp "Xiaomi Smart Air Purifier 4 Lite" <status>
String actions "Actions" (G_airp) {channel="miio:basic:airp:actions"}
Switch on "Air Purifier - Switch Status" (G_airp) {channel="miio:basic:airp:on"}
Number fault "Air Purifier - Device Fault" (G_airp) {channel="miio:basic:airp:fault"}
Number mode "Mode" (G_airp) {channel="miio:basic:airp:mode"}
Number:Dimensionless relative_humidity "Environment - Relative Humidity" (G_airp) {channel="miio:basic:airp:relative_humidity"}
Number pm2_5_density "Environment - PM2 5 Density" (G_airp) {channel="miio:basic:airp:pm2_5_density"}
Number:Temperature temperature "Temperature" (G_airp) {channel="miio:basic:airp:temperature"}
Number:Dimensionless filter_life_level "Filter - Filter Life Level" (G_airp) {channel="miio:basic:airp:filter_life_level"}
Number:Time filter_used_time "Filter - Filter Used Time" (G_airp) {channel="miio:basic:airp:filter_used_time"}
Number:Time filter_left_time "Filter - Filter Left Time" (G_airp) {channel="miio:basic:airp:filter_left_time"}
Switch alarm "Alarm - Alarm" (G_airp) {channel="miio:basic:airp:alarm"}
Switch physical_controls_locked "Physical Control Locked - Physical Control Locked" (G_airp) {channel="miio:basic:airp:physical_controls_locked"}
Number brightness "Screen - Brightness" (G_airp) {channel="miio:basic:airp:brightness"}
Number temperature_display_unit "Device Display Unit - Temperature Display Unit" (G_airp) {channel="miio:basic:airp:temperature_display_unit"}
Number moto_speed_rpm "Custom Service - Moto Speed Rpm" (G_airp) {channel="miio:basic:airp:moto_speed_rpm"}
Number country_code "Custom Service - Country Code" (G_airp) {channel="miio:basic:airp:country_code"}
Number favorite_level "Custom Service - Favorite Level" (G_airp) {channel="miio:basic:airp:favorite_level"}
Number aqi_updata_heartbeat "Aqi - Aqi Updata Heartbeat" (G_airp) {channel="miio:basic:airp:aqi_updata_heartbeat"}
```

### Xiaomi Smart Air Purifier 4 Pro (zhimi.airp.vb4) item file lines

note: Autogenerated example. Replace the id (airp) 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 @@ -410,6 +410,7 @@ public enum MiIoDevices {
ZHIMI_AIRP_CPA4("zhimi.airp.cpa4", "Xiaomi Smart Air Purifier 4 Compact", THING_TYPE_BASIC),
ZHIMI_AIRP_MB4A("zhimi.airp.mb4a", "Mi Air Purifier 3C", THING_TYPE_BASIC),
ZHIMI_AIRP_MB5("zhimi.airp.mb5", "Xiaomi Smart Air Purifier 4", THING_TYPE_BASIC),
ZHIMI_AIRP_RMB1("zhimi.airp.rmb1", "Xiaomi Smart Air Purifier 4 Lite", THING_TYPE_BASIC),
ZHIMI_AIRP_VB4("zhimi.airp.vb4", "Xiaomi Smart Air Purifier 4 Pro", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_M1("zhimi.airpurifier.m1", "Mi Air Purifier 2 (mini)", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_M2("zhimi.airpurifier.m2", "Mi Air Purifier 2", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ thing.zhimi.airmonitor.v1 = Mi PM2.5 Air Quality Monitor
thing.zhimi.airp.cpa4 = Xiaomi Smart Air Purifier 4 Compact
thing.zhimi.airp.mb4a = Mi Air Purifier 3C
thing.zhimi.airp.mb5 = Xiaomi Smart Air Purifier 4
thing.zhimi.airp.rmb1 = Xiaomi Smart Air Purifier 4 Lite
thing.zhimi.airp.vb4 = Xiaomi Smart Air Purifier 4 Pro
thing.zhimi.airpurifier.m1 = Mi Air Purifier 2 (mini)
thing.zhimi.airpurifier.m2 = Mi Air Purifier 2
Expand Down Expand Up @@ -1986,6 +1987,24 @@ ch.zhimi.airp.mb5-miot.reboot_cause = Custom Service - Reboot Cause
ch.zhimi.airp.mb5-miot.relative_humidity = Environment - Relative Humidity
ch.zhimi.airp.mb5-miot.temperature = Temperature
ch.zhimi.airp.mb5-miot.temperature_display_unit = Device Display Unit - Temperature Display Unit
ch.zhimi.airp.rmb1-miot.actions = Actions
ch.zhimi.airp.rmb1-miot.alarm = Alarm - Alarm
ch.zhimi.airp.rmb1-miot.aqi_updata_heartbeat = Aqi - Aqi Updata Heartbeat
ch.zhimi.airp.rmb1-miot.brightness = Screen - Brightness
ch.zhimi.airp.rmb1-miot.country_code = Custom Service - Country Code
ch.zhimi.airp.rmb1-miot.fault = Air Purifier - Device Fault
ch.zhimi.airp.rmb1-miot.favorite_level = Custom Service - Favorite Level
ch.zhimi.airp.rmb1-miot.filter_left_time = Filter - Filter Left Time
ch.zhimi.airp.rmb1-miot.filter_life_level = Filter - Filter Life Level
ch.zhimi.airp.rmb1-miot.filter_used_time = Filter - Filter Used Time
ch.zhimi.airp.rmb1-miot.mode = Mode
ch.zhimi.airp.rmb1-miot.moto_speed_rpm = Custom Service - Moto Speed Rpm
ch.zhimi.airp.rmb1-miot.on = Air Purifier - Switch Status
ch.zhimi.airp.rmb1-miot.physical_controls_locked = Physical Control Locked - Physical Control Locked
ch.zhimi.airp.rmb1-miot.pm2_5_density = Environment - PM2 5 Density
ch.zhimi.airp.rmb1-miot.relative_humidity = Environment - Relative Humidity
ch.zhimi.airp.rmb1-miot.temperature = Temperature
ch.zhimi.airp.rmb1-miot.temperature_display_unit = Device Display Unit - Temperature Display Unit
ch.zhimi.airp.vb4-miot.actions = Actions
ch.zhimi.airp.vb4-miot.alarm = Alarm
ch.zhimi.airp.vb4-miot.anion = Air Purifier - Anion
Expand Down Expand Up @@ -4090,6 +4109,27 @@ option.zhimi.airp.mb5-miot.reboot_cause-2 = REASON-UPDATE
option.zhimi.airp.mb5-miot.reboot_cause-3 = REASON-WDT
option.zhimi.airp.mb5-miot.temperature_display_unit-1 = Celsius
option.zhimi.airp.mb5-miot.temperature_display_unit-2 = Fahrenheit
option.zhimi.airp.rmb1-miot.actions-air-purifier-toggle = Air Purifier Toggle
option.zhimi.airp.rmb1-miot.actions-custom-service-toggle-mode = Custom Service Toggle Mode
option.zhimi.airp.rmb1-miot.actions-filter-reset-filter-life = Filter Reset Filter Life
option.zhimi.airp.rmb1-miot.brightness-0 = Close
option.zhimi.airp.rmb1-miot.brightness-1 = Bright
option.zhimi.airp.rmb1-miot.brightness-2 = Brightest
option.zhimi.airp.rmb1-miot.country_code-1 = US
option.zhimi.airp.rmb1-miot.country_code-2 = EU
option.zhimi.airp.rmb1-miot.country_code-44 = UK
option.zhimi.airp.rmb1-miot.country_code-66 = TH
option.zhimi.airp.rmb1-miot.country_code-82 = KR
option.zhimi.airp.rmb1-miot.country_code-886 = TW
option.zhimi.airp.rmb1-miot.country_code-91 = IN
option.zhimi.airp.rmb1-miot.fault-0 = No Faults
option.zhimi.airp.rmb1-miot.fault-2 = Motor Stop
option.zhimi.airp.rmb1-miot.fault-3 = Sensor Lost
option.zhimi.airp.rmb1-miot.mode-0 = Auto
option.zhimi.airp.rmb1-miot.mode-1 = Sleep
option.zhimi.airp.rmb1-miot.mode-2 = Favorite
option.zhimi.airp.rmb1-miot.temperature_display_unit-1 = Celsius
option.zhimi.airp.rmb1-miot.temperature_display_unit-2 = Fahrenheit
option.zhimi.airp.vb4-miot.actions-air-purifier-toggle = Air Purifier Toggle
option.zhimi.airp.vb4-miot.actions-custom-service-toggle-fan-level = Custom Service Toggle Fan Level
option.zhimi.airp.vb4-miot.actions-custom-service-toggle-mode = Custom Service Toggle Mode
Expand Down
Loading

0 comments on commit 62cdb14

Please sign in to comment.