[miio] Add support for xiaomi.airconditions c/ma/mc/mh/mt modesl (#9380)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2020-12-22 22:49:54 +01:00 committed by GitHub
parent 09b1037ea1
commit f88225113b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2119 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -218,6 +218,66 @@ public enum MiIoDevices {
YUNMI_WATERPURI_LX10("yunmi.waterpuri.lx10", "Mi Water Purifier lx10", THING_TYPE_BASIC), YUNMI_WATERPURI_LX10("yunmi.waterpuri.lx10", "Mi Water Purifier lx10", THING_TYPE_BASIC),
YUNMI_WATERPURI_LX11("yunmi.waterpuri.lx11", "Mi Water Purifier C1 (Triple Setting)", THING_TYPE_BASIC), YUNMI_WATERPURI_LX11("yunmi.waterpuri.lx11", "Mi Water Purifier C1 (Triple Setting)", THING_TYPE_BASIC),
YUNMI_WATERPURI_LX12("yunmi.waterpuri.lx12", "Mi Water Purifier S1", THING_TYPE_BASIC), YUNMI_WATERPURI_LX12("yunmi.waterpuri.lx12", "Mi Water Purifier S1", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA1("xiaomi.aircondition.ma1", "Mi Inverter Air Conditioner (1.5HP)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA2("xiaomi.aircondition.ma2",
"Mi Inverter Air Conditioner (1.5HP, China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA4("xiaomi.aircondition.ma4", "Mi Vertical Air Conditioner (2HP)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA5("xiaomi.aircondition.ma5",
"Mi Smart Vertical Air Conditioner C1 (2HP / Inverter / China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA6("xiaomi.aircondition.ma6",
"Mi Smart Air Conditioner C1 (1.5HP / Conventional / China Energy Label Level 3)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MA9("xiaomi.aircondition.ma9",
"Mi Smart Air Conditioner C1 (1HP / Inverter / China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_C10("xiaomi.aircondition.c10",
"Mi Smart Ultra Electricity Saving Vertical Air Conditioner (2HP/Inverter/New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_C11("xiaomi.aircondition.c11",
"Mi Smart Ultra Electricity Saving Vertical Air Conditioner (3HP/Inverter/New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC1("xiaomi.aircondition.mc1",
"Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC2("xiaomi.aircondition.mc2",
"Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC4("xiaomi.aircondition.mc4",
"Mi Smart Air Conditioner A (1HP / Inverter / China Energy Label Level <1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC5("xiaomi.aircondition.mc5",
"Mi Smart Air Conditioner A (1.5HP / Inverter / China Energy Label Level <1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC6("xiaomi.aircondition.mc6",
"Mi Smart Vertical Air Conditioner A (2HP / Inverter / China Energy Label Level <1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC7("xiaomi.aircondition.mc7",
"Mi Smart Vertical Air Conditioner A (3HP / Inverter / China Energy Label Level <1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC8("xiaomi.aircondition.mc8",
"Mi Smart Ultra Electricity Saving Air Conditioner(1.5HP/Inverter/New China Energy Label Level 3)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MC9("xiaomi.aircondition.mc9",
"Mi Smart Ultra Electricity Saving Vertical Air Conditioner(2HP/Inverter/New China Energy Label Level 3)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MH1("xiaomi.aircondition.mh1",
"Mi Smart Air Conditioner C (1HP / Inverter / New China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MH2("xiaomi.aircondition.mh2",
"Mi Smart Air Conditioner C (1.5HP / Inverter / New China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MH3("xiaomi.aircondition.mh3",
"Mi Smart Ultra Electricity Saving Air Conditioner(1HP/Inverter/New China Energy Label Level 3)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT1("xiaomi.aircondition.mt1",
"Mi Smart Air Conditioner X (1HP / Inverter / New China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT2("xiaomi.aircondition.mt2",
"Mi Smart Air Conditioner X (1.5HP / Inverter / New China Energy Label Level 1)", THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT3("xiaomi.aircondition.mt3",
"Mi Smart Gentle Breeze Air Conditioner (1HP / Inverter / New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT4("xiaomi.aircondition.mt4",
"Mi Smart Gentle Breeze Air Conditioner (1.5HP / Inverter / New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT5("xiaomi.aircondition.mt5",
"Mi Smart Gentle Breeze Vertical Air Conditioner (3HP / Inverter / New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT7("xiaomi.aircondition.mt7",
"Mi Smart Ultra Electricity Saving Air Conditioner (1HP/Inverter/New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_AIRCONDITION_MT8("xiaomi.aircondition.mt8",
"Mi Smart Ultra Electricity Saving Air Conditioner (1.5HP/Inverter/New China Energy Label Level 1)",
THING_TYPE_BASIC),
XIAOMI_REPEATER_V2("xiaomi.repeater.v2", "Mi Wi-Fi Repeater 2", THING_TYPE_UNSUPPORTED), XIAOMI_REPEATER_V2("xiaomi.repeater.v2", "Mi Wi-Fi Repeater 2", THING_TYPE_UNSUPPORTED),
XIAOMI_WIFISPEAKER_V1("xiaomi.wifispeaker.v1", "Mi Network Speaker", THING_TYPE_UNSUPPORTED), XIAOMI_WIFISPEAKER_V1("xiaomi.wifispeaker.v1", "Mi Network Speaker", THING_TYPE_UNSUPPORTED),
XJX_TOILET_PRO("xjx.toilet.pro", "Uclean Smart Toilet Seat", THING_TYPE_BASIC), XJX_TOILET_PRO("xjx.toilet.pro", "Uclean Smart Toilet Seat", THING_TYPE_BASIC),

View File

@ -48,6 +48,7 @@ public enum MiIoQuantiyTypes {
LITRE(Units.LITRE, "liter"), LITRE(Units.LITRE, "liter"),
LUX(Units.LUX), LUX(Units.LUX),
RADIANS(Units.RADIAN, "radians"), RADIANS(Units.RADIAN, "radians"),
KILOWATT_HOUR(Units.KILOWATT_HOUR, "kwh"),
SQUARE_METRE(SIUnits.SQUARE_METRE, "square_meter", "squaremeter"), SQUARE_METRE(SIUnits.SQUARE_METRE, "square_meter", "squaremeter"),
PERCENT(Units.PERCENT), PERCENT(Units.PERCENT),
KGM3(Units.KILOGRAM_PER_CUBICMETRE, "kilogram_per_cubicmeter"), KGM3(Units.KILOGRAM_PER_CUBICMETRE, "kilogram_per_cubicmeter"),

View File

@ -0,0 +1,315 @@
{
"deviceMapping": {
"id": [
"xiaomi.aircondition.ma1",
"xiaomi.aircondition.ma2",
"xiaomi.aircondition.ma4",
"xiaomi.aircondition.ma5",
"xiaomi.aircondition.ma6",
"xiaomi.aircondition.ma9"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Power",
"channel": "on",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "mode",
"siid": 2,
"piid": 2,
"friendlyName": "Air Conditioner - Mode",
"channel": "mode",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "1",
"label": "Cool"
},
{
"value": "2",
"label": "Dry"
},
{
"value": "3",
"label": "Heat"
},
{
"value": "4",
"label": "Fan"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"tags": [
"Control"
],
"readmeComment": "Value mapping [2\u003d\"Cool\",3\u003d\"Dry\",4\u003d\"Fan\",5\u003d\"Heat\"]"
},
{
"property": "target-temperature",
"siid": 2,
"piid": 3,
"friendlyName": "Air Conditioner - Target Temperature",
"channel": "target-temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": 16,
"maximum": 31,
"step": 0.0,
"pattern": "%.1f %unit%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "temperature",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "eco",
"siid": 2,
"piid": 4,
"friendlyName": "Air Conditioner - Eco",
"channel": "eco",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "heater",
"siid": 2,
"piid": 5,
"friendlyName": "Air Conditioner - Heater",
"channel": "heater",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "sleep-mode",
"siid": 2,
"piid": 6,
"friendlyName": "Air Conditioner - Sleep Mode",
"channel": "sleep-mode",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "dryer",
"siid": 2,
"piid": 7,
"friendlyName": "Air Conditioner - Dryer",
"channel": "dryer",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "fan-level",
"siid": 3,
"piid": 1,
"friendlyName": "Fan Control - Fan Level",
"channel": "fan-level",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "0",
"label": "Auto"
},
{
"value": "1",
"label": "Level1"
},
{
"value": "2",
"label": "Level2"
},
{
"value": "3",
"label": "Level3"
},
{
"value": "4",
"label": "Level4"
},
{
"value": "5",
"label": "Level5"
},
{
"value": "6",
"label": "Level6"
},
{
"value": "7",
"label": "Level7"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "fan",
"tags": [
"Control",
"Level"
],
"readmeComment": "Value mapping [0\u003d\"Auto\",1\u003d\"Level1\",2\u003d\"Level2\",3\u003d\"Level3\",4\u003d\"Level4\",5\u003d\"Level5\",6\u003d\"Level6\",7\u003d\"Level7\"]"
},
{
"property": "vertical-swing",
"siid": 3,
"piid": 2,
"friendlyName": "Fan Control - Vertical Swing",
"channel": "vertical-swing",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Control",
"Opening"
]
},
{
"property": "temperature",
"siid": 4,
"piid": 1,
"friendlyName": "Environment - Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": -20.0,
"maximum": 80.0,
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "temperature",
"tags": [
"Measurement",
"Temperature"
]
},
{
"property": "alarm",
"siid": 5,
"piid": 1,
"friendlyName": "Alarm - Alarm",
"channel": "alarm",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "alarm",
"tags": [
"Alarm"
]
},
{
"property": "on1",
"siid": 6,
"piid": 1,
"friendlyName": "Indicator Light - Switch Status",
"channel": "on1",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
}
],
"experimental": true
}
}

View File

@ -0,0 +1,474 @@
{
"deviceMapping": {
"id": [
"xiaomi.aircondition.c10",
"xiaomi.aircondition.c11",
"xiaomi.aircondition.mc1",
"xiaomi.aircondition.mc2",
"xiaomi.aircondition.mc4",
"xiaomi.aircondition.mc5",
"xiaomi.aircondition.mc6",
"xiaomi.aircondition.mc7",
"xiaomi.aircondition.mc8",
"xiaomi.aircondition.mc9",
"xiaomi.aircondition.mh1",
"xiaomi.aircondition.mh2",
"xiaomi.aircondition.mh3",
"xiaomi.aircondition.mt1",
"xiaomi.aircondition.mt2",
"xiaomi.aircondition.mt3",
"xiaomi.aircondition.mt4",
"xiaomi.aircondition.mt5",
"xiaomi.aircondition.mt7",
"xiaomi.aircondition.mt8"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Power",
"channel": "on",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "mode",
"siid": 2,
"piid": 2,
"friendlyName": "Air Conditioner - Mode",
"channel": "mode",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "2",
"label": "Cool"
},
{
"value": "3",
"label": "Dry"
},
{
"value": "4",
"label": "Fan"
},
{
"value": "5",
"label": "Heat"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"tags": [
"Control"
],
"readmeComment": "Value mapping [2\u003d\"Cool\",3\u003d\"Dry\",4\u003d\"Fan\",5\u003d\"Heat\"]"
},
{
"property": "target-temperature",
"siid": 2,
"piid": 4,
"friendlyName": "Air Conditioner - Target Temperature",
"channel": "target-temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": 16,
"maximum": 31,
"step": 0.0,
"pattern": "%.1f %unit%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "temperature",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "eco",
"siid": 2,
"piid": 7,
"friendlyName": "Air Conditioner - Eco",
"channel": "eco",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "heater",
"siid": 2,
"piid": 9,
"friendlyName": "Air Conditioner - Heater",
"channel": "heater",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "dryer",
"siid": 2,
"piid": 10,
"friendlyName": "Air Conditioner - Dryer",
"channel": "dryer",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "sleep-mode",
"siid": 2,
"piid": 11,
"friendlyName": "Air Conditioner - Sleep Mode",
"channel": "sleep-mode",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "fan-level",
"siid": 3,
"piid": 2,
"friendlyName": "Fan Control - Fan Level",
"channel": "fan-level",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "0",
"label": "Auto"
},
{
"value": "1",
"label": "Level1"
},
{
"value": "2",
"label": "Level2"
},
{
"value": "3",
"label": "Level3"
},
{
"value": "4",
"label": "Level4"
},
{
"value": "5",
"label": "Level5"
},
{
"value": "6",
"label": "Level6"
},
{
"value": "7",
"label": "Level7"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "fan",
"tags": [
"Control",
"Level"
],
"readmeComment": "Value mapping [0\u003d\"Auto\",1\u003d\"Level1\",2\u003d\"Level2\",3\u003d\"Level3\",4\u003d\"Level4\",5\u003d\"Level5\",6\u003d\"Level6\",7\u003d\"Level7\"]"
},
{
"property": "vertical-swing",
"siid": 3,
"piid": 4,
"friendlyName": "Fan Control - Vertical Swing",
"channel": "vertical-swing",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Control",
"Opening"
]
},
{
"property": "temperature",
"siid": 4,
"piid": 7,
"friendlyName": "Environment - Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": -30,
"maximum": 100,
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "temperature",
"tags": [
"Measurement",
"Temperature"
]
},
{
"property": "alarm",
"siid": 5,
"piid": 1,
"friendlyName": "Alarm - Alarm",
"channel": "alarm",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "alarm",
"tags": [
"Alarm"
]
},
{
"property": "on1",
"siid": 6,
"piid": 1,
"friendlyName": "Indicator Light - Switch Status",
"channel": "on1",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "electricity",
"siid": 8,
"piid": 1,
"friendlyName": "Power consumption accumulation in kWh",
"channel": "electricity",
"type": "Number:Energy",
"unit": "kwh",
"stateDescription": {
"minimum": 0,
"maximum": 999999,
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "energy",
"tags": [
"Measurement",
"Energy"
]
},
{
"property": "elec-count",
"siid": 8,
"piid": 3,
"friendlyName": "Electricity - Count",
"channel": "elec-count",
"channelType": "miot_uint16",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 65535,
"step": 1,
"pattern": "%.1f",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "energy",
"tags": [
"Measurement",
"Energy"
]
},
{
"property": "clean",
"siid": 9,
"piid": 1,
"friendlyName": "Maintenance - Clean",
"channel": "clean",
"type": "String",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "STRING"
}
]
},
{
"property": "examine",
"siid": 9,
"piid": 2,
"friendlyName": "Maintenance - Examine",
"channel": "examine",
"type": "String",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "STRING"
}
],
"category": "switch"
},
{
"property": "running-duration",
"siid": 9,
"piid": 5,
"friendlyName": "Maintenance - Running Duration",
"channel": "running-duration",
"type": "Number:Duration",
"unit": "seconds",
"stateDescription": {
"minimum": 0,
"maximum": 876000,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "time",
"tags": [
"Measurement",
"Duration"
]
},
{
"property": "fan-percent",
"siid": 10,
"piid": 1,
"friendlyName": "Fan Speed %",
"channel": "fan-percent",
"type": "Number:Dimentionless",
"unit": "percent",
"stateDescription": {
"minimum": 1,
"maximum": 101,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "fan",
"tags": [
"Setpoint",
"Level"
]
},
{
"property": "timer",
"siid": 10,
"piid": 3,
"friendlyName": "Enhance - Timer",
"channel": "timer",
"type": "String",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "STRING"
}
],
"category": "time",
"tags": [
"Setpoint",
"Timestamp"
]
}
],
"experimental": true
}
}