]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] add support Xiaomi Smart Air Purifier 4 Compact (#13806)
authorMarcel <marcel@verpaalen.com>
Fri, 2 Dec 2022 20:44:33 +0000 (21:44 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Dec 2022 20:44:33 +0000 (21:44 +0100)
* [miio] add support zhimi.airp.cpa4 WIP
* [miio] add support Xiaomi Smart Air Purifier 4 Compact

Adding support for the following models:
* Xiaomi Smart Air Purifier 4 Compact (modelId: zhimi.airp.cpa4)

Minor typo fixing (note: no breaking channel changes)

close: #13763

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.miio/README.md
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java
bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties
bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airp.cpa4-miot.json [new file with mode: 0644]
bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airp.mb4a-miot.json
bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airp.mb5-miot.json

index 934edad58a0a7d61a83566514d557c295d1bf2d3..511d390ad48aa09f6cdb634bc27aca3a72626bf3 100644 (file)
@@ -522,6 +522,7 @@ Currently the miio binding supports more than 340 different models.
 | Smartmi Fresh Air System (Heating) | miio:basic       | [zhimi.airfresh.va4](#zhimi-airfresh-va4) | Yes          |            |
 | Mi Fresh Air Ventilator C1-80      | miio:basic       | [zhimi.airfresh.ua1](#zhimi-airfresh-ua1) | Yes          |            |
 | Mi PM2.5 Air Quality Monitor       | miio:basic       | [zhimi.airmonitor.v1](#zhimi-airmonitor-v1) | Yes          |            |
+| 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 |
 | Mi Air Purifier 2 (mini)           | miio:basic       | [zhimi.airpurifier.m1](#zhimi-airpurifier-m1) | Yes          |            |
@@ -4921,6 +4922,27 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
 | night_begin          | Number               | Night Begin Time                         |            |
 | night_end            | Number               | Night End Time                           |            |
 
+### Xiaomi Smart Air Purifier 4 Compact (<a name="zhimi-airp-cpa4">zhimi.airp.cpa4</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"]` |
+| power                | Switch               | Air Purifier - Switch Status             |            |
+| fault                | Number               | Air Purifier - Device Fault              | Value mapping `["0"="No Faults","2"="Motor Stuck","3"="Sensor Lost"]` |
+| mode                 | Number               | Air Purifier - Mode                      | Value mapping `["0"="Auto","1"="Sleep","2"="Favorite"]` |
+| pm2_5_density        | Number               | Environment - PM2 5 Density              |            |
+| 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:Dimensionless | Screen - Brightness                      | Value mapping `["0"="Off","1"="Bright","2"="Brightest"]` |
+| motor_speed_rpm      | Number               | Custom Service - Motor Speed Rpm         |            |
+| country_code         | Number               | Custom Service - Country Code            | Value mapping `["17230"="CN","17749"="EU","21843"="US"]` |
+| favorite_level       | Number               | Custom Service - Favorite Level          |            |
+| filter_used_time_dbg | Number:Time          | Custom Service - Filter Used Time Dbg    |            |
+| aqi_updata_heartbeat | Number               | Aqi - Aqi Updata Heartbeat               |            |
+
 ### Mi Air Purifier 3C (<a name="zhimi-airp-mb4a">zhimi.airp.mb4a</a>) Channels
 
 | Channel              | Type                 | Description                              | Comment    |
@@ -4935,11 +4957,45 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
 | alarm                | Switch               | Alarm - Alarm                            |            |
 | brightness           | Number               | Screen - Brightness                      |            |
 | physical_controls_locked | Switch               | Physical Control Locked - Physical Control Locked |            |
-| moto_speed_rpm       | Number               | Custom Service - Moto Speed Rpm          |            |
+| moto_speed_rpm       | Number               | Custom Service - Motor Speed Rpm         |            |
 | miio_lib_version     | String               | Custom Service - Miio Lib Version        |            |
 | favorite_speed       | Number               | Custom Service - Favorite Speed          |            |
 | aqi_updata_heartbeat | Number:Time          | Custom Service - Aqi Updata Heartbeat    |            |
 
+### Xiaomi Smart Air Purifier 4 (<a name="zhimi-airp-mb5">zhimi.airp.mb5</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","custom-service-toggle-fan-level"="Custom Service Toggle Fan Level"]` |
+| on                   | Switch               | Air Purifier - Switch Status             |            |
+| fault                | Number               | Air Purifier - Device Fault              | Value mapping `["0"="No Faults","1"="Sensor PM Error","2"="Temp Error","3"="Hum Error","4"="No Filter"]` |
+| mode                 | Number               | Mode                                     | Value mapping `["0"="Auto","1"="Sleep","2"="Favorite","3"="Manual"]` |
+| fan_level            | Number               | Air Purifier - Fan Level                 | Value mapping `["1"="Level1","2"="Level2","3"="Level3"]` |
+| anion                | Switch               | Air Purifier - Anion                     |            |
+| 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"]` |
+| motor_speed_rpm      | Number               | Custom Service - Motor Speed Rpm         |            |
+| favorite_speed       | Number               | Custom Service - Favorite Speed          |            |
+| motor_set_speed      | Number               | Custom Service - Motor Set Speed         |            |
+| favorite_level       | Number               | Custom Service - Favorite Level          |            |
+| bottom_door          | Switch               | Custom Service - Bottom Door             |            |
+| reboot_cause         | Number               | Custom Service - Reboot Cause            | Value mapping `["0"="REASON-HW-BOOT","1"="REASON-USER-REBOOT","2"="REASON-UPDATE","3"="REASON-WDT"]` |
+| manual_level         | Number               | Custom Service - Manual Level            | Value mapping `["1"="Level1","2"="Level2","3"="Level3"]` |
+| country_code         | Number               | Custom Service - Country Code            | Value mapping `["2"="EU","1"="US","82"="KR","886"="TW","66"="TH","44"="UK","91"="IN"]` |
+| iic_error_count      | Number               | Custom Service - Iic Error Count         |            |
+| filter_used_debug    | Number:Time          | Filter Time - Filter Used Debug          |            |
+| purify_volume        | Number               | Aqi - Purify Volume                      |            |
+| 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"]` |
+
 ### Mi Air Purifier 2 (mini) (<a name="zhimi-airpurifier-m1">zhimi.airpurifier.m1</a>) Channels
 
 | Channel              | Type                 | Description                              | Comment    |
@@ -10987,6 +11043,30 @@ Number night_begin "Night Begin Time" (G_airmonitor) {channel="miio:basic:airmon
 Number night_end "Night End Time" (G_airmonitor) {channel="miio:basic:airmonitor:night_end"}
 ```
 
+### Xiaomi Smart Air Purifier 4 Compact (zhimi.airp.cpa4) 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.
+
+```
+Group G_airp "Xiaomi Smart Air Purifier 4 Compact" <status>
+String actions "Actions" (G_airp) {channel="miio:basic:airp:actions"}
+Switch power "Air Purifier - Switch Status" (G_airp) {channel="miio:basic:airp:power"}
+Number fault "Air Purifier - Device Fault" (G_airp) {channel="miio:basic:airp:fault"}
+Number mode "Air Purifier - Mode" (G_airp) {channel="miio:basic:airp:mode"}
+Number pm2_5_density "Environment - PM2 5 Density" (G_airp) {channel="miio:basic:airp:pm2_5_density"}
+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:Dimensionless brightness "Screen - Brightness" (G_airp) {channel="miio:basic:airp:brightness"}
+Number motor_speed_rpm "Custom Service - Motor Speed Rpm" (G_airp) {channel="miio:basic:airp:motor_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:Time filter_used_time_dbg "Custom Service - Filter Used Time Dbg" (G_airp) {channel="miio:basic:airp:filter_used_time_dbg"}
+Number aqi_updata_heartbeat "Aqi - Aqi Updata Heartbeat" (G_airp) {channel="miio:basic:airp:aqi_updata_heartbeat"}
+```
+
 ### Mi Air Purifier 3C (zhimi.airp.mb4a) 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.
@@ -11003,7 +11083,7 @@ Number:Time filter_used_time "Filter - Filter Used Time" (G_airp) {channel="miio
 Switch alarm "Alarm - Alarm" (G_airp) {channel="miio:basic:airp:alarm"}
 Number brightness "Screen - Brightness" (G_airp) {channel="miio:basic:airp:brightness"}
 Switch physical_controls_locked "Physical Control Locked - Physical Control Locked" (G_airp) {channel="miio:basic:airp:physical_controls_locked"}
-Number moto_speed_rpm "Custom Service - Moto Speed Rpm" (G_airp) {channel="miio:basic:airp:moto_speed_rpm"}
+Number moto_speed_rpm "Custom Service - Motor Speed Rpm" (G_airp) {channel="miio:basic:airp:moto_speed_rpm"}
 String miio_lib_version "Custom Service - Miio Lib Version" (G_airp) {channel="miio:basic:airp:miio_lib_version"}
 Number favorite_speed "Custom Service - Favorite Speed" (G_airp) {channel="miio:basic:airp:favorite_speed"}
 Number:Time aqi_updata_heartbeat "Custom Service - Aqi Updata Heartbeat" (G_airp) {channel="miio:basic:airp:aqi_updata_heartbeat"}
@@ -11035,7 +11115,7 @@ Number motor_speed_rpm "Custom Service - Motor Speed Rpm" (G_airp) {channel="mii
 Number favorite_speed "Custom Service - Favorite Speed" (G_airp) {channel="miio:basic:airp:favorite_speed"}
 Number motor_set_speed "Custom Service - Motor Set Speed" (G_airp) {channel="miio:basic:airp:motor_set_speed"}
 Number favorite_level "Custom Service - Favorite Level" (G_airp) {channel="miio:basic:airp:favorite_level"}
-Switch buttom_door "Custom Service - Buttom Door" (G_airp) {channel="miio:basic:airp:bottom_door"}
+Switch bottom_door "Custom Service - Bottom Door" (G_airp) {channel="miio:basic:airp:bottom_door"}
 Number reboot_cause "Custom Service - Reboot Cause" (G_airp) {channel="miio:basic:airp:reboot_cause"}
 Number manual_level "Custom Service - Manual Level" (G_airp) {channel="miio:basic:airp:manual_level"}
 Number country_code "Custom Service - Country Code" (G_airp) {channel="miio:basic:airp:country_code"}
index ccc2894442b0159807d04c7fcc4bcfb2d1e652e5..2fb62e9effd98cebce3d13f882de80abc5da7efd 100644 (file)
@@ -387,6 +387,7 @@ public enum MiIoDevices {
     ZHIMI_AIRFRESH_VA4("zhimi.airfresh.va4", "Smartmi Fresh Air System (Heating)", THING_TYPE_BASIC),
     ZHIMI_AIRFRESH_UA1("zhimi.airfresh.ua1", "Mi Fresh Air Ventilator C1-80", THING_TYPE_BASIC),
     ZHIMI_AIRMONITOR_V1("zhimi.airmonitor.v1", "Mi PM2.5 Air Quality Monitor", THING_TYPE_BASIC),
+    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_AIRPURIFIER_M1("zhimi.airpurifier.m1", "Mi Air Purifier 2 (mini)", THING_TYPE_BASIC),
index bf8cdf41c779937097f31161ed9766ff736d5e25..b5e07f5143fff02b5b520cfe5aa6b1a0b3ea922b 100644 (file)
@@ -328,6 +328,7 @@ thing.zhimi.airfresh.va2 = Smartmi Ventilation System
 thing.zhimi.airfresh.va4 = Smartmi Fresh Air System (Heating)
 thing.zhimi.airfresh.ua1 = Mi Fresh Air Ventilator C1-80
 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.airpurifier.m1 = Mi Air Purifier 2 (mini)
@@ -1538,6 +1539,22 @@ ch.zhimi.airmonitor.v1.night_state = Night State
 ch.zhimi.airmonitor.v1.power = Power
 ch.zhimi.airmonitor.v1.time_state = Time State
 ch.zhimi.airmonitor.v1.usb_state = USB State
+ch.zhimi.airp.cpa4-miot.actions = Actions
+ch.zhimi.airp.cpa4-miot.alarm = Alarm - Alarm
+ch.zhimi.airp.cpa4-miot.aqi_updata_heartbeat = Aqi - Aqi Updata Heartbeat
+ch.zhimi.airp.cpa4-miot.brightness = Screen - Brightness
+ch.zhimi.airp.cpa4-miot.country_code = Custom Service - Country Code
+ch.zhimi.airp.cpa4-miot.fault = Air Purifier - Device Fault
+ch.zhimi.airp.cpa4-miot.favorite_level = Custom Service - Favorite Level
+ch.zhimi.airp.cpa4-miot.filter_left_time = Filter - Filter Left Time
+ch.zhimi.airp.cpa4-miot.filter_life_level = Filter - Filter Life Level
+ch.zhimi.airp.cpa4-miot.filter_used_time = Filter - Filter Used Time
+ch.zhimi.airp.cpa4-miot.filter_used_time_dbg = Custom Service - Filter Used Time Dbg
+ch.zhimi.airp.cpa4-miot.mode = Air Purifier - Mode
+ch.zhimi.airp.cpa4-miot.motor_speed_rpm = Custom Service - Motor Speed Rpm
+ch.zhimi.airp.cpa4-miot.physical_controls_locked = Physical Control Locked - Physical Control Locked
+ch.zhimi.airp.cpa4-miot.pm2_5_density = Environment - PM2 5 Density
+ch.zhimi.airp.cpa4-miot.power = Air Purifier - Switch Status
 ch.zhimi.airp.mb4a-miot.actions = Actions
 ch.zhimi.airp.mb4a-miot.alarm = Alarm - Alarm
 ch.zhimi.airp.mb4a-miot.aqi_updata_heartbeat = Custom Service - Aqi Updata Heartbeat
@@ -1548,7 +1565,7 @@ ch.zhimi.airp.mb4a-miot.filter_life_level = Filter - Filter Life Level
 ch.zhimi.airp.mb4a-miot.filter_used_time = Filter - Filter Used Time
 ch.zhimi.airp.mb4a-miot.miio_lib_version = Custom Service - Miio Lib Version
 ch.zhimi.airp.mb4a-miot.mode = Mode
-ch.zhimi.airp.mb4a-miot.moto_speed_rpm = Custom Service - Moto Speed Rpm
+ch.zhimi.airp.mb4a-miot.moto_speed_rpm = Custom Service - Motor Speed Rpm
 ch.zhimi.airp.mb4a-miot.on = Power
 ch.zhimi.airp.mb4a-miot.physical_controls_locked = Physical Control Locked - Physical Control Locked
 ch.zhimi.airp.mb4a-miot.pm2_5_density = Environment - PM2 5 Density
@@ -1557,8 +1574,8 @@ ch.zhimi.airp.mb5-miot.alarm = Alarm - Alarm
 ch.zhimi.airp.mb5-miot.anion = Air Purifier - Anion
 ch.zhimi.airp.mb5-miot.aqi_state = Aqi - Aqi State
 ch.zhimi.airp.mb5-miot.average_aqi = Aqi - Average Aqi
-ch.zhimi.airp.mb5-miot.brightness = Screen - Brightness
 ch.zhimi.airp.mb5-miot.bottom_door = Custom Service - Bottom Door
+ch.zhimi.airp.mb5-miot.brightness = Screen - Brightness
 ch.zhimi.airp.mb5-miot.country_code = Custom Service - Country Code
 ch.zhimi.airp.mb5-miot.fan_level = Air Purifier - Fan Level
 ch.zhimi.airp.mb5-miot.fault = Air Purifier - Device Fault
@@ -1571,8 +1588,8 @@ ch.zhimi.airp.mb5-miot.filter_used_time = Filter - Filter Used Time
 ch.zhimi.airp.mb5-miot.iic_error_count = Custom Service - Iic Error Count
 ch.zhimi.airp.mb5-miot.manual_level = Custom Service - Manual Level
 ch.zhimi.airp.mb5-miot.mode = Mode
-ch.zhimi.airp.mb5-miot.motor_speed_rpm = Custom Service - Motor Speed Rpm
 ch.zhimi.airp.mb5-miot.motor_set_speed = Custom Service - Motor Set Speed
+ch.zhimi.airp.mb5-miot.motor_speed_rpm = Custom Service - Motor Speed Rpm
 ch.zhimi.airp.mb5-miot.on = Air Purifier - Switch Status
 ch.zhimi.airp.mb5-miot.physical_controls_locked = Physical Control Locked - Physical Control Locked
 ch.zhimi.airp.mb5-miot.pm2_5_density = Environment - PM2 5 Density
@@ -3142,6 +3159,21 @@ option.zhimi.airfresh.va4.mode-low = 1
 option.zhimi.airfresh.va4.mode-middle = 2
 option.zhimi.airfresh.va4.mode-silent = Night
 option.zhimi.airfresh.va4.mode-strong = 3
+option.zhimi.airp.cpa4-miot.actions-air-purifier-toggle = Air Purifier Toggle
+option.zhimi.airp.cpa4-miot.actions-custom-service-toggle-mode = Custom Service Toggle Mode
+option.zhimi.airp.cpa4-miot.actions-filter-reset-filter-life = Filter Reset Filter Life
+option.zhimi.airp.cpa4-miot.brightness-0 = Off
+option.zhimi.airp.cpa4-miot.brightness-1 = Bright
+option.zhimi.airp.cpa4-miot.brightness-2 = Brightest
+option.zhimi.airp.cpa4-miot.country_code-17230 = CN
+option.zhimi.airp.cpa4-miot.country_code-17749 = EU
+option.zhimi.airp.cpa4-miot.country_code-21843 = US
+option.zhimi.airp.cpa4-miot.fault-0 = No Faults
+option.zhimi.airp.cpa4-miot.fault-2 = Motor Stuck
+option.zhimi.airp.cpa4-miot.fault-3 = Sensor Lost
+option.zhimi.airp.cpa4-miot.mode-0 = Auto
+option.zhimi.airp.cpa4-miot.mode-1 = Sleep
+option.zhimi.airp.cpa4-miot.mode-2 = Favorite
 option.zhimi.airp.mb4a-miot.actions-filter-reset-filter-life = Filter Reset Filter Life
 option.zhimi.airp.mb4a-miot.mode-0 = Auto
 option.zhimi.airp.mb4a-miot.mode-1 = Sleep
diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airp.cpa4-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airp.cpa4-miot.json
new file mode 100644 (file)
index 0000000..fa4695f
--- /dev/null
@@ -0,0 +1,401 @@
+{
+       "deviceMapping": {
+               "id": [
+                       "zhimi.airp.cpa4"
+               ],
+               "propertyMethod": "get_properties",
+               "maxProperties": 1,
+               "channels": [
+                       {
+                               "property": "",
+                               "friendlyName": "Actions",
+                               "channel": "actions",
+                               "type": "String",
+                               "stateDescription": {
+                                       "options": [
+                                               {
+                                                       "value": "air-purifier-toggle",
+                                                       "label": "Air Purifier Toggle"
+                                               },
+                                               {
+                                                       "value": "filter-reset-filter-life",
+                                                       "label": "Filter Reset Filter Life"
+                                               },
+                                               {
+                                                       "value": "custom-service-toggle-mode",
+                                                       "label": "Custom Service Toggle Mode"
+                                               }
+                                       ]
+                               },
+                               "refresh": false,
+                               "actions": [
+                                       {
+                                               "command": "action",
+                                               "parameterType": "EMPTY",
+                                               "siid": 2,
+                                               "aiid": 1,
+                                               "condition": {
+                                                       "name": "matchValue",
+                                                       "parameters": [
+                                                               {
+                                                                       "matchValue": "air-purifier-toggle"
+                                                               }
+                                                       ]
+                                               }
+                                       },
+                                       {
+                                               "command": "action",
+                                               "parameterType": "UNKNOWN",
+                                               "parameters": [
+                                                       3.0
+                                               ],
+                                               "siid": 4,
+                                               "aiid": 1,
+                                               "condition": {
+                                                       "name": "matchValue",
+                                                       "parameters": [
+                                                               {
+                                                                       "matchValue": "filter-reset-filter-life"
+                                                               }
+                                                       ]
+                                               }
+                                       },
+                                       {
+                                               "command": "action",
+                                               "parameterType": "EMPTY",
+                                               "siid": 9,
+                                               "aiid": 1,
+                                               "condition": {
+                                                       "name": "matchValue",
+                                                       "parameters": [
+                                                               {
+                                                                       "matchValue": "custom-service-toggle-mode"
+                                                               }
+                                                       ]
+                                               }
+                                       }
+                               ],
+                               "readmeComment": "Value mapping `[\"air-purifier-toggle\"\u003d\"Air Purifier Toggle\",\"filter-reset-filter-life\"\u003d\"Filter Reset Filter Life\",\"custom-service-toggle-mode\"\u003d\"Custom Service Toggle Mode\"]`"
+                       },
+                       {
+                               "property": "power",
+                               "siid": 2,
+                               "piid": 1,
+                               "friendlyName": "Air Purifier - Switch Status",
+                               "channel": "power",
+                               "type": "Switch",
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "ONOFFBOOL"
+                                       }
+                               ],
+                               "category": "switch",
+                               "tags": [
+                                       "Switch"
+                               ]
+                       },
+                       {
+                               "property": "fault",
+                               "siid": 2,
+                               "piid": 2,
+                               "friendlyName": "Air Purifier - Device Fault",
+                               "channel": "fault",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "readOnly": true,
+                                       "options": [
+                                               {
+                                                       "value": "0",
+                                                       "label": "No Faults"
+                                               },
+                                               {
+                                                       "value": "2",
+                                                       "label": "Motor Stuck"
+                                               },
+                                               {
+                                                       "value": "3",
+                                                       "label": "Sensor Lost"
+                                               }
+                                       ]
+                               },
+                               "refresh": true,
+                               "actions": [],
+                               "readmeComment": "Value mapping `[\"0\"\u003d\"No Faults\",\"2\"\u003d\"Motor Stuck\",\"3\"\u003d\"Sensor Lost\"]`"
+                       },
+                       {
+                               "property": "mode",
+                               "siid": 2,
+                               "piid": 4,
+                               "friendlyName": "Air Purifier - Mode",
+                               "channel": "mode",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "options": [
+                                               {
+                                                       "value": "0",
+                                                       "label": "Auto"
+                                               },
+                                               {
+                                                       "value": "1",
+                                                       "label": "Sleep"
+                                               },
+                                               {
+                                                       "value": "2",
+                                                       "label": "Favorite"
+                                               }
+                                       ]
+                               },
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "NUMBER"
+                                       }
+                               ],
+                               "tags": [
+                                       "Control"
+                               ],
+                               "readmeComment": "Value mapping `[\"0\"\u003d\"Auto\",\"1\"\u003d\"Sleep\",\"2\"\u003d\"Favorite\"]`"
+                       },
+                       {
+                               "property": "pm2.5-density",
+                               "siid": 3,
+                               "piid": 4,
+                               "friendlyName": "Environment - PM2 5 Density",
+                               "channel": "pm2_5_density",
+                               "type": "Number",
+                               "unit": "μg/m3",
+                               "stateDescription": {
+                                       "pattern": "%.0f",
+                                       "readOnly": true
+                               },
+                               "refresh": true,
+                               "actions": []
+                       },
+                       {
+                               "property": "filter-life-level",
+                               "siid": 4,
+                               "piid": 1,
+                               "friendlyName": "Filter - Filter Life Level",
+                               "channel": "filter_life_level",
+                               "type": "Number:Dimensionless",
+                               "unit": "percentage",
+                               "stateDescription": {
+                                       "pattern": "%.0f %unit%",
+                                       "readOnly": true
+                               },
+                               "refresh": true,
+                               "actions": []
+                       },
+                       {
+                               "property": "filter-used-time",
+                               "siid": 4,
+                               "piid": 3,
+                               "friendlyName": "Filter - Filter Used Time",
+                               "channel": "filter_used_time",
+                               "type": "Number:Time",
+                               "unit": "hours",
+                               "stateDescription": {
+                                       "pattern": "%.0f %unit%",
+                                       "readOnly": true
+                               },
+                               "refresh": true,
+                               "actions": []
+                       },
+                       {
+                               "property": "filter-left-time",
+                               "siid": 4,
+                               "piid": 4,
+                               "friendlyName": "Filter - Filter Left Time",
+                               "channel": "filter_left_time",
+                               "type": "Number:Time",
+                               "unit": "days",
+                               "stateDescription": {
+                                       "pattern": "%.0f %unit%",
+                                       "readOnly": true
+                               },
+                               "refresh": true,
+                               "actions": []
+                       },
+                       {
+                               "property": "alarm",
+                               "siid": 6,
+                               "piid": 1,
+                               "friendlyName": "Alarm - Alarm",
+                               "channel": "alarm",
+                               "type": "Switch",
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "ONOFFBOOL"
+                                       }
+                               ]
+                       },
+                       {
+                               "property": "physical-controls-locked",
+                               "siid": 8,
+                               "piid": 1,
+                               "friendlyName": "Physical Control Locked - Physical Control Locked",
+                               "channel": "physical_controls_locked",
+                               "type": "Switch",
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "ONOFFBOOL"
+                                       }
+                               ]
+                       },
+                       {
+                               "property": "brightness",
+                               "siid": 13,
+                               "piid": 2,
+                               "friendlyName": "Screen - Brightness",
+                               "channel": "brightness",
+                               "type": "Number:Dimensionless",
+                               "unit": "percentage",
+                               "stateDescription": {
+                                       "options": [
+                                               {
+                                                       "value": "0",
+                                                       "label": "Off"
+                                               },
+                                               {
+                                                       "value": "1",
+                                                       "label": "Bright"
+                                               },
+                                               {
+                                                       "value": "2",
+                                                       "label": "Brightest"
+                                               }
+                                       ]
+                               },
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "NUMBER"
+                                       }
+                               ],
+                               "readmeComment": "Value mapping `[\"0\"\u003d\"Off\",\"1\"\u003d\"Bright\",\"2\"\u003d\"Brightest\"]`"
+                       },
+                       {
+                               "property": "motor-speed-rpm",
+                               "siid": 9,
+                               "piid": 1,
+                               "friendlyName": "Custom Service - Motor Speed Rpm",
+                               "channel": "motor_speed_rpm",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "minimum": 0,
+                                       "maximum": 2500,
+                                       "step": 1,
+                                       "pattern": "%.0f",
+                                       "readOnly": true
+                               },
+                               "refresh": true,
+                               "actions": []
+                       },
+                       {
+                               "property": "country-code",
+                               "siid": 9,
+                               "piid": 10,
+                               "friendlyName": "Custom Service - Country Code",
+                               "channel": "country_code",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "options": [
+                                               {
+                                                       "value": "17230",
+                                                       "label": "CN"
+                                               },
+                                               {
+                                                       "value": "17749",
+                                                       "label": "EU"
+                                               },
+                                               {
+                                                       "value": "21843",
+                                                       "label": "US"
+                                               }
+                                       ]
+                               },
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "STRING"
+                                       }
+                               ],
+                               "readmeComment": "Value mapping `[\"17230\"\u003d\"CN\",\"17749\"\u003d\"EU\",\"21843\"\u003d\"US\"]`"
+                       },
+                       {
+                               "property": "favorite-level",
+                               "siid": 9,
+                               "piid": 11,
+                               "friendlyName": "Custom Service - Favorite Level",
+                               "channel": "favorite_level",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "minimum": 0,
+                                       "maximum": 14,
+                                       "step": 1,
+                                       "pattern": "%.0f"
+                               },
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "NUMBER"
+                                       }
+                               ]
+                       },
+                       {
+                               "property": "filter-used-time-dbg",
+                               "siid": 9,
+                               "piid": 12,
+                               "friendlyName": "Custom Service - Filter Used Time Dbg",
+                               "channel": "filter_used_time_dbg",
+                               "type": "Number:Time",
+                               "unit": "hours",
+                               "stateDescription": {
+                                       "minimum": 0,
+                                       "maximum": 7000,
+                                       "step": 1,
+                                       "pattern": "%.0f %unit%"
+                               },
+                               "refresh": false,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "STRING"
+                                       }
+                               ]
+                       },
+                       {
+                               "property": "aqi-updata-heartbeat",
+                               "siid": 11,
+                               "piid": 4,
+                               "friendlyName": "Aqi - Aqi Updata Heartbeat",
+                               "channel": "aqi_updata_heartbeat",
+                               "type": "Number",
+                               "stateDescription": {
+                                       "minimum": 0,
+                                       "maximum": 65535,
+                                       "step": 1,
+                                       "pattern": "%.0f"
+                               },
+                               "refresh": true,
+                               "actions": [
+                                       {
+                                               "command": "set_properties",
+                                               "parameterType": "STRING"
+                                       }
+                               ]
+                       }
+               ],
+               "experimental": true
+       }
+}
index fc945d31977e02032d3379d8e1e239e1caf15d26..f0aa12d3bc4e8ccb32b76a80014c5dcf79f1b30c 100644 (file)
                                ]
                        },
                        {
-                               "property": "moto-speed-rpm",
+                               "property": "motor-speed-rpm",
                                "siid": 9,
                                "piid": 1,
-                               "friendlyName": "Custom Service - Moto Speed Rpm",
+                               "friendlyName": "Custom Service - Motor Speed Rpm",
                                "channel": "moto_speed_rpm",
                                "type": "Number",
                                "stateDescription": {
index 86840096c3a74a819453f1ec863aecd6afb6f832..956a68d980adf1fc279d349fa70d444b41f12f27 100644 (file)
                                "property": "bottom-door",
                                "siid": 9,
                                "piid": 6,
-                               "friendlyName": "Custom Service - Buttom Door",
+                               "friendlyName": "Custom Service - Bottom Door",
                                "channel": "bottom_door",
                                "type": "Switch",
                                "stateDescription": {