Skip to content

Commit

Permalink
[miio] add support Mi Smart Humidifier deerma.humidifier.jsq5 (openha…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelrv authored and andan67 committed Nov 5, 2022
1 parent e4ec738 commit d571df1
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 0 deletions.
34 changes: 34 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Currently the miio binding supports more than 300 different models.
| Gosund Smart Plug | miio:basic | [cuco.plug.cp1](#cuco-plug-cp1) | Yes | |
| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq](#deerma-humidifier-jsq) | Yes | |
| Mi S Smart Humidifer | miio:basic | [deerma.humidifier.jsq1](#deerma-humidifier-jsq1) | Yes | |
| Mi Smart Antibacterial Humidifier | miio:basic | [deerma.humidifier.jsq5](#deerma-humidifier-jsq5) | Yes | |
| Mi Smart Humidifier | miio:basic | [deerma.humidifier.mjjsq](#deerma-humidifier-mjjsq) | Yes | |
| Mi Fresh Air Ventilator A1-150 | miio:basic | [dmaker.airfresh.a1](#dmaker-airfresh-a1) | Yes | |
| Mi Fresh Air Ventilator | miio:basic | [dmaker.airfresh.t2017](#dmaker-airfresh-t2017) | Yes | |
Expand Down Expand Up @@ -794,6 +795,21 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
| watertankstatus | Number | Watertank Status | |
| wet_and_protect | Switch | Wet and Protect | |

### Mi Smart Antibacterial Humidifier (<a name="deerma-humidifier-jsq5">deerma.humidifier.jsq5</a>) Channels

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| on | Switch | Humidifier - Switch Status | |
| fault | Number | Humidifier - Device Fault | Value mapping `["0"="No Faults","1"="Insufficient Water","2"="Water Separation"]` |
| fan_level | Number | Humidifier - Fan Level | Value mapping `["1"="Level1","2"="Level2","3"="Level3","4"="Humidity"]` |
| target_humidity | Number:Dimensionless | Humidifier - Target Humidity | |
| relative_humidity | Number:Dimensionless | Environment - Relative Humidity | |
| temperature | Number:Temperature | Environment - Temperature | |
| alarm | Switch | Alarm - Alarm | |
| on1 | Switch | Indicator Light - Switch Status | |
| water_shortage_fault | Switch | Custom - Water Shortage Fault | |
| the_tank_filed | Switch | Custom - The Tank Filed | |

### Mi Smart Humidifier (<a name="deerma-humidifier-mjjsq">deerma.humidifier.mjjsq</a>) Channels

| Channel | Type | Description | Comment |
Expand Down Expand Up @@ -5589,6 +5605,24 @@ Number watertankstatus "Watertank Status" (G_humidifier) {channel="miio:basic:hu
Switch wet_and_protect "Wet and Protect" (G_humidifier) {channel="miio:basic:humidifier:wet_and_protect"}
```

### Mi Smart Antibacterial Humidifier (deerma.humidifier.jsq5) 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.

```
Group G_humidifier "Mi Smart Antibacterial Humidifier" <status>
Switch on "Humidifier - Switch Status" (G_humidifier) {channel="miio:basic:humidifier:on"}
Number fault "Humidifier - Device Fault" (G_humidifier) {channel="miio:basic:humidifier:fault"}
Number fan_level "Humidifier - Fan Level" (G_humidifier) {channel="miio:basic:humidifier:fan_level"}
Number:Dimensionless target_humidity "Humidifier - Target Humidity" (G_humidifier) {channel="miio:basic:humidifier:target_humidity"}
Number:Dimensionless relative_humidity "Environment - Relative Humidity" (G_humidifier) {channel="miio:basic:humidifier:relative_humidity"}
Number:Temperature temperature "Environment - Temperature" (G_humidifier) {channel="miio:basic:humidifier:temperature"}
Switch alarm "Alarm - Alarm" (G_humidifier) {channel="miio:basic:humidifier:alarm"}
Switch on1 "Indicator Light - Switch Status" (G_humidifier) {channel="miio:basic:humidifier:on1"}
Switch water_shortage_fault "Custom - Water Shortage Fault" (G_humidifier) {channel="miio:basic:humidifier:water_shortage_fault"}
Switch the_tank_filed "Custom - The Tank Filed" (G_humidifier) {channel="miio:basic:humidifier:the_tank_filed"}
```

### Mi Smart Humidifier (deerma.humidifier.mjjsq) 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 @@ -51,6 +51,7 @@ public enum MiIoDevices {
CUCO_PLUG_CP1("cuco.plug.cp1", "Gosund Smart Plug", THING_TYPE_BASIC),
DEERMA_HUMIDIFIER_JSQ("deerma.humidifier.jsq", "Mi Smart Antibacterial Humidifier", THING_TYPE_BASIC),
DEERMA_HUMIDIFIER_JSQ1("deerma.humidifier.jsq1", "Mi S Smart Humidifer ", THING_TYPE_BASIC),
DEERMA_HUMIDIFIER_JSQ5("deerma.humidifier.jsq5", "Mi Smart Antibacterial Humidifier", THING_TYPE_BASIC),
DEERMA_HUMIDIFIER_MJJSQ("deerma.humidifier.mjjsq", "Mi Smart Humidifier", THING_TYPE_BASIC),
DMAKER_AIRFRESH_A1("dmaker.airfresh.a1", "Mi Fresh Air Ventilator A1-150", THING_TYPE_BASIC),
DMAKER_AIRFRESH_T2017("dmaker.airfresh.t2017", "Mi Fresh Air Ventilator", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"deviceMapping": {
"id": [
"deerma.humidifier.jsq5"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Humidifier - 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": "Humidifier - Device Fault",
"channel": "fault",
"type": "Number",
"stateDescription": {
"readOnly": true,
"options": [
{
"value": "0",
"label": "No Faults"
},
{
"value": "1",
"label": "Insufficient Water"
},
{
"value": "2",
"label": "Water Separation"
}
]
},
"refresh": true,
"actions": [],
"readmeComment": "Value mapping `[\"0\"\u003d\"No Faults\",\"1\"\u003d\"Insufficient Water\",\"2\"\u003d\"Water Separation\"]`"
},
{
"property": "fan-level",
"siid": 2,
"piid": 5,
"friendlyName": "Humidifier - Fan Level",
"channel": "fan_level",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "1",
"label": "Level1"
},
{
"value": "2",
"label": "Level2"
},
{
"value": "3",
"label": "Level3"
},
{
"value": "4",
"label": "Humidity"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping `[\"1\"\u003d\"Level1\",\"2\"\u003d\"Level2\",\"3\"\u003d\"Level3\",\"4\"\u003d\"Humidity\"]`"
},
{
"property": "target-humidity",
"siid": 2,
"piid": 6,
"friendlyName": "Humidifier - Target Humidity",
"channel": "target_humidity",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"minimum": 40,
"maximum": 80,
"step": 1,
"pattern": "%.0f %%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
]
},
{
"property": "relative-humidity",
"siid": 3,
"piid": 1,
"friendlyName": "Environment - Relative Humidity",
"channel": "relative_humidity",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"minimum": 0,
"maximum": 100,
"step": 1,
"pattern": "%.0f %%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "humidity",
"tags": [
"Measurement",
"Humidity"
]
},
{
"property": "temperature",
"siid": 3,
"piid": 7,
"friendlyName": "Environment - Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": -30,
"maximum": 100,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "alarm",
"siid": 5,
"piid": 1,
"friendlyName": "Alarm - Alarm",
"channel": "alarm",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "on1",
"siid": 6,
"piid": 1,
"friendlyName": "Indicator Light - Switch Status",
"channel": "on1",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "water-shortage-fault",
"siid": 7,
"piid": 1,
"friendlyName": "Custom - Water Shortage Fault",
"channel": "water_shortage_fault",
"type": "Switch",
"stateDescription": {
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "the-tank-filed",
"siid": 7,
"piid": 2,
"friendlyName": "Custom - The Tank Filed",
"channel": "the_tank_filed",
"type": "Switch",
"stateDescription": {
"readOnly": true
},
"refresh": true,
"actions": []
}
],
"experimental": false
}
}

0 comments on commit d571df1

Please sign in to comment.