Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[miio] Add support Mi Fresh Air Ventilator C1-80 zhimi.airfresh.ua1 #11579

Merged
merged 2 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ Currently the miio binding supports more than 300 different models.
| Mi Water Purifier v4 | miio:basic | [yunmi.waterpurifier.v4](#yunmi-waterpurifier-v4) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
| Smartmi Ventilation System | miio:basic | [zhimi.airfresh.va2](#zhimi-airfresh-va2) | Yes | |
| 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 | Identified manual actions for execution<br />`action{"did":"filter-reset-filter-life","siid":4,"aiid":1,"in":[1.0]}`<br />Please test and feedback if they are working to they can be linked to a channel. |
wborn marked this conversation as resolved.
Show resolved Hide resolved
| Mi PM2.5 Air Quality Monitor | miio:basic | [zhimi.airmonitor.v1](#zhimi-airmonitor-v1) | 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 @@ -4309,6 +4310,24 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
| led_level | Number | Led - Brightness | Value mapping `["0"="High","1"="Low","2"="Idle"]` |
| temperature | Number:Temperature | Temperature | |

### Mi Fresh Air Ventilator C1-80 (<a name="zhimi-airfresh-ua1">zhimi.airfresh.ua1</a>) Channels

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| actions | String | Actions | Value mapping `["filter-reset-filter-life"="Filter Reset Filter Life"]` |
| on | Switch | Air Fresh - Switch Status | |
| fault | Number | Device Fault | Value mapping `["0"="No Faults"]` |
| fan_level | Number | Air Fresh - Fan Level | Value mapping `["1"="Level1","2"="Level2","3"="Level3"]` |
| heater | Switch | Heater | |
| filter_used_time | Number:Time | Filter - Filter Used Time | |
| filter_life_level | Number:Dimensionless | Filter - Filter Life Level | |
| physical_controls_locked | Switch | Physical Control Locked - Physical Control Locked | |
| alarm | Switch | Alarm - Alarm | |
| brightness | Dimmer | Indicator Light - Brightness | |
| motor_a_speed_rpm | Number | Custom Serveice - Motor A Speed Rpm | |
| motor_b_speed_rpm | Number | Custom Serveice - Motor B Speed Rpm | |
| temperature | Number:Temperature | Custom Serveice - Temperature | |

### Mi PM2.5 Air Quality Monitor (<a name="zhimi-airmonitor-v1">zhimi.airmonitor.v1</a>) Channels

| Channel | Type | Description | Comment |
Expand Down Expand Up @@ -9731,6 +9750,27 @@ Number led_level "Led - Brightness" (G_airfresh) {channel="miio:basic:airfresh:l
Number:Temperature temperature "Temperature" (G_airfresh) {channel="miio:basic:airfresh:temperature"}
```

### Mi Fresh Air Ventilator C1-80 (zhimi.airfresh.ua1) item file lines

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

```
Group G_airfresh "Mi Fresh Air Ventilator C1-80" <status>
String actions "Actions" (G_airfresh) {channel="miio:basic:airfresh:actions"}
Switch on "Air Fresh - Switch Status" (G_airfresh) {channel="miio:basic:airfresh:on"}
Number fault "Device Fault" (G_airfresh) {channel="miio:basic:airfresh:fault"}
Number fan_level "Air Fresh - Fan Level" (G_airfresh) {channel="miio:basic:airfresh:fan_level"}
Switch heater "Heater" (G_airfresh) {channel="miio:basic:airfresh:heater"}
Number:Time filter_used_time "Filter - Filter Used Time" (G_airfresh) {channel="miio:basic:airfresh:filter_used_time"}
Number:Dimensionless filter_life_level "Filter - Filter Life Level" (G_airfresh) {channel="miio:basic:airfresh:filter_life_level"}
Switch physical_controls_locked "Physical Control Locked - Physical Control Locked" (G_airfresh) {channel="miio:basic:airfresh:physical_controls_locked"}
Switch alarm "Alarm - Alarm" (G_airfresh) {channel="miio:basic:airfresh:alarm"}
Dimmer brightness "Indicator Light - Brightness" (G_airfresh) {channel="miio:basic:airfresh:brightness"}
Number motor_a_speed_rpm "Custom Serveice - Motor A Speed Rpm" (G_airfresh) {channel="miio:basic:airfresh:motor_a_speed_rpm"}
Number motor_b_speed_rpm "Custom Serveice - Motor B Speed Rpm" (G_airfresh) {channel="miio:basic:airfresh:motor_b_speed_rpm"}
Number:Temperature temperature "Custom Serveice - Temperature" (G_airfresh) {channel="miio:basic:airfresh:temperature"}
```

### Mi PM2.5 Air Quality Monitor (zhimi.airmonitor.v1) item file lines

note: Autogenerated example. Replace the id (airmonitor) 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 @@ -347,6 +347,7 @@ public enum MiIoDevices {
YUNMI_WATERPURIFIER_V4("yunmi.waterpurifier.v4", "Mi Water Purifier v4", THING_TYPE_BASIC),
ZHIMI_AIRFRESH_VA2("zhimi.airfresh.va2", "Smartmi Ventilation System", THING_TYPE_BASIC),
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_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
@@ -0,0 +1,274 @@
{
"deviceMapping": {
"id": [
"zhimi.airfresh.ua1"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "",
"friendlyName": "Actions",
"channel": "actions",
"type": "String",
"stateDescription": {
"options": [
{
"value": "filter-reset-filter-life",
"label": "Filter Reset Filter Life"
}
]
},
"refresh": false,
"actions": [
{
"command": "action",
"parameterType": "UNKNOWN",
"parameters": [
1.0
],
"siid": 4,
"aiid": 1,
"condition": {
"name": "matchValue",
"parameters": [
{
"matchValue": "filter-reset-filter-life"
}
]
}
}
],
"readmeComment": "Value mapping `[\"filter-reset-filter-life\"\u003d\"Filter Reset Filter Life\"]`"
},
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Air Fresh - Switch Status",
"channel": "on",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "fault",
"siid": 2,
"piid": 2,
"friendlyName": "Device Fault",
"channel": "fault",
"type": "Number",
"stateDescription": {
"readOnly": true,
"options": [
{
"value": "0",
"label": "No Faults"
}
]
},
"refresh": true,
"actions": [],
"readmeComment": "Value mapping `[\"0\"\u003d\"No Faults\"]`"
},
{
"property": "fan-level",
"siid": 2,
"piid": 5,
"friendlyName": "Air Fresh - Fan Level",
"channel": "fan_level",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "1",
"label": "Level1"
},
{
"value": "2",
"label": "Level2"
},
{
"value": "3",
"label": "Level3"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"tags": [
"Control"
],
"readmeComment": "Value mapping `[\"1\"\u003d\"Level1\",\"2\"\u003d\"Level2\",\"3\"\u003d\"Level3\"]`"
},
{
"property": "heater",
"siid": 2,
"piid": 6,
"friendlyName": "Heater",
"channel": "heater",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "filter-used-time",
"siid": 4,
"piid": 1,
"friendlyName": "Filter - Filter Used Time",
"channel": "filter_used_time",
"type": "Number:Time",
"unit": "minutes",
"stateDescription": {
"minimum": 0,
"maximum": 9999999,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "filter-life-level",
"siid": 4,
"piid": 2,
"friendlyName": "Filter - Filter Life Level",
"channel": "filter_life_level",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"minimum": 0,
"maximum": 100,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "physical-controls-locked",
"siid": 5,
"piid": 1,
"friendlyName": "Physical Control Locked - Physical Control Locked",
"channel": "physical_controls_locked",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "alarm",
"siid": 6,
"piid": 1,
"friendlyName": "Alarm - Alarm",
"channel": "alarm",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "brightness",
"siid": 7,
"piid": 3,
"friendlyName": "Indicator Light - Brightness",
"channel": "brightness",
"type": "Dimmer",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
]
},
{
"property": "motor-a-speed-rpm",
"siid": 8,
"piid": 1,
"friendlyName": "Custom Serveice - Motor A Speed Rpm",
"channel": "motor_a_speed_rpm",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 65535,
"step": 1,
"pattern": "%.0f rpm",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "motor-b-speed-rpm",
"siid": 8,
"piid": 2,
"friendlyName": "Custom Serveice - Motor B Speed Rpm",
"channel": "motor_b_speed_rpm",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 65535,
"step": 1,
"pattern": "%.0f rpm",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "temperature",
"siid": 8,
"piid": 5,
"friendlyName": "Custom Serveice - Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "CELSIUS",
"stateDescription": {
"minimum": -40,
"maximum": 125,
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "temperature",
"tags": [
"Measurement",
"Temperature"
]
}
],
"readmeComment": "Identified manual actions for execution\u003cbr /\u003e`action{\"did\":\"filter-reset-filter-life\",\"siid\":4,\"aiid\":1,\"in\":[1.0]}`\u003cbr /\u003ePlease test and feedback if they are working to they can be linked to a channel.",
"experimental": false
}
}