Skip to content

Commit

Permalink
[miio] add support 5 zhimi heaters (#10231)
Browse files Browse the repository at this point in the history
* [miio] Add zhimi heaters

add new
zhimi.heater.ma2 Mi Smart Space Heater S
zhimi.heater.ma3 Mi Smart Baseboard Heater E
zhimi.heater.mc2 Mi Smart Space Heater S
zhimi.heater.na1 Smartmi Smart Fan
zhimi.heater.nb1 Smartmi Smart Fan Heater

improving existing
zhimi.heater.za1 Smartmi Radiant Heater Smart Version
zhimi.heater.za2 Smartmi Smart Convector Heater 1S
zhimi.heater.zb1 Smartmi Smart Convector Heater 1S

* [miio] add some more options
* remove accidental development file
* [miio] fix number:duration
* [miio] remove channeltype from heaters

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
  • Loading branch information
marcelrv authored Feb 25, 2021
1 parent cdf044c commit d16bb98
Show file tree
Hide file tree
Showing 12 changed files with 1,797 additions and 94 deletions.
284 changes: 231 additions & 53 deletions bundles/org.openhab.binding.miio/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ public enum MiIoDevices {
ZHIMI_FAN_ZA3("zhimi.fan.za3", "Smartmi Standing Fan 2", THING_TYPE_BASIC),
ZHIMI_FAN_ZA4("zhimi.fan.za4", "Smartmi Standing Fan 2S", THING_TYPE_BASIC),
ZHIMI_FAN_ZA5("zhimi.fan.za5", "Smartmi Standing Fan 3 ", THING_TYPE_BASIC),
ZHIMI_HEATER_MA2("zhimi.heater.ma2", "Mi Smart Space Heater S", THING_TYPE_BASIC),
ZHIMI_HEATER_MA3("zhimi.heater.ma3", "Mi Smart Baseboard Heater E", THING_TYPE_BASIC),
ZHIMI_HEATER_MC2("zhimi.heater.mc2", "Mi Smart Space Heater S", THING_TYPE_BASIC),
ZHIMI_HEATER_NA1("zhimi.heater.na1", "Smartmi Smart Fan", THING_TYPE_BASIC),
ZHIMI_HEATER_NB1("zhimi.heater.nb1", "Smartmi Smart Fan Heater", THING_TYPE_BASIC),
ZHIMI_HEATER_ZA1("zhimi.heater.za1", "Smartmi Radiant Heater Smart Version", THING_TYPE_BASIC),
ZHIMI_HEATER_ZA2("zhimi.heater.za2", "Smartmi Smart Convector Heater 1S", THING_TYPE_BASIC),
ZHIMI_HEATER_ZB1("zhimi.heater.zb1", "Smartmi Smart Convector Heater 1S", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"piid": 7,
"friendlyName": "Working Time",
"channel": "working-time",
"type": "Number:Duration",
"type": "Number:Time",
"unit": "minutes",
"stateDescription": {
"minimum": 0,
Expand Down Expand Up @@ -184,7 +184,7 @@
"piid": 1,
"friendlyName": "Imilab Timer - On Duration",
"channel": "on-duration",
"type": "Number:Duration",
"type": "Number:Time",
"unit": "seconds",
"stateDescription": {
"minimum": 0,
Expand All @@ -207,7 +207,7 @@
"piid": 2,
"friendlyName": "Imilab Timer - Off Duration",
"channel": "off-duration",
"type": "Number:Duration",
"type": "Number:Time",
"unit": "seconds",
"stateDescription": {
"minimum": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
"piid": 5,
"friendlyName": "Maintenance - Running Duration",
"channel": "running-duration",
"type": "Number:Duration",
"type": "Number:Time",
"unit": "seconds",
"stateDescription": {
"minimum": 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"deviceMapping": {
"id": [
"zhimi.heater.ma2"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Heater - 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": "Heater - Fault",
"channel": "fault",
"type": "Number",
"stateDescription": {
"readOnly": true,
"options": [
{
"value": "0",
"label": "No Error"
},
{
"value": "1",
"label": "NTC Connect Error"
},
{
"value": "2",
"label": "High Temperature Alarm"
},
{
"value": "3",
"label": "EEPROM Error"
},
{
"value": "4",
"label": "Multi Errors"
}
]
},
"refresh": true,
"actions": [],
"readmeComment": "Value mapping [\"0\"\u003d\"No Error\",\"1\"\u003d\"NTC Connect Error\",\"2\"\u003d\"High Temperature Alarm\",\"3\"\u003d\"EEPROM Error\",\"4\"\u003d\"Multi Errors\"]"
},
{
"property": "target-temperature",
"siid": 2,
"piid": 5,
"friendlyName": "Heater - Target Temperature",
"channel": "target_temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": 18,
"maximum": 28,
"step": 1,
"pattern": "%.1f %unit%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "temperature",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "countdown-time",
"siid": 3,
"piid": 1,
"friendlyName": "Countdown - Countdown Time",
"channel": "countdown_time",
"type": "Number:Time",
"unit": "hours",
"stateDescription": {
"minimum": 0,
"maximum": 12,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "STRING"
}
]
},
{
"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": "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"
}
],
"category": "alarm"
},
{
"property": "brightness",
"siid": 7,
"piid": 3,
"friendlyName": "Indicator Light - Brightness",
"channel": "brightness",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"options": [
{
"value": "0",
"label": "Bright"
},
{
"value": "1",
"label": "Dark"
},
{
"value": "2",
"label": "Extinguished"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"category": "light",
"tags": [
"Control",
"Light"
],
"readmeComment": "Value mapping [\"0\"\u003d\"Bright\",\"1\"\u003d\"Dark\",\"2\"\u003d\"Extinguished\"]"
},
{
"property": "hw-enable",
"siid": 8,
"piid": 8,
"friendlyName": "Private Service - Hw Enable",
"channel": "hw_enable",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "use-time",
"siid": 8,
"piid": 9,
"friendlyName": "Private Service - Use Time",
"channel": "use_time",
"type": "Number:Time",
"unit": "seconds",
"stateDescription": {
"minimum": 0,
"maximum": 2147483647,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": [],
"category": "time"
}
],
"experimental": true
}
}
Loading

0 comments on commit d16bb98

Please sign in to comment.