forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[miio] add support for Mi Smart Standing Fan 2 (dmaker.fan.p18) (open…
…hab#11106) closing openhab#11053 Signed-off-by: Marcel Verpaalen <[email protected]> Signed-off-by: Dave J Schoepel <[email protected]>
Showing
3 changed files
with
356 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
317 changes: 317 additions & 0 deletions
317
bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p18-miot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,317 @@ | ||
{ | ||
"deviceMapping": { | ||
"id": [ | ||
"dmaker.fan.p18" | ||
], | ||
"propertyMethod": "get_properties", | ||
"maxProperties": 1, | ||
"channels": [ | ||
{ | ||
"property": "", | ||
"friendlyName": "Actions", | ||
"channel": "actions", | ||
"type": "String", | ||
"stateDescription": { | ||
"options": [ | ||
{ | ||
"value": "fan-toggle", | ||
"label": "Fan Toggle" | ||
} | ||
] | ||
}, | ||
"actions": [ | ||
{ | ||
"command": "action", | ||
"parameterType": "EMPTY", | ||
"siid": 2, | ||
"aiid": 1, | ||
"condition": { | ||
"name": "matchValue", | ||
"parameters": [ | ||
{ | ||
"matchValue": "fan-toggle" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"property": "on", | ||
"siid": 2, | ||
"piid": 1, | ||
"friendlyName": "Fan - Switch Status", | ||
"channel": "on", | ||
"type": "Switch", | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "ONOFFBOOL" | ||
} | ||
], | ||
"category": "switch", | ||
"tags": [ | ||
"Switch" | ||
] | ||
}, | ||
{ | ||
"property": "fan-level", | ||
"siid": 2, | ||
"piid": 2, | ||
"friendlyName": "Fan - Fan Level", | ||
"channel": "fan_level", | ||
"type": "Number", | ||
"stateDescription": { | ||
"options": [ | ||
{ | ||
"value": "1", | ||
"label": "Level1" | ||
}, | ||
{ | ||
"value": "2", | ||
"label": "Level2" | ||
}, | ||
{ | ||
"value": "3", | ||
"label": "Level3" | ||
}, | ||
{ | ||
"value": "4", | ||
"label": "Level4" | ||
} | ||
] | ||
}, | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "NUMBER" | ||
} | ||
], | ||
"category": "fan", | ||
"tags": [ | ||
"SetPoint" | ||
], | ||
"readmeComment": "Value mapping `[\"1\"\u003d\"Level1\",\"2\"\u003d\"Level2\",\"3\"\u003d\"Level3\",\"4\"\u003d\"Level4\"]`" | ||
}, | ||
{ | ||
"property": "mode", | ||
"siid": 2, | ||
"piid": 3, | ||
"friendlyName": "Fan - Mode", | ||
"channel": "mode", | ||
"type": "Number", | ||
"stateDescription": { | ||
"options": [ | ||
{ | ||
"value": "0", | ||
"label": "Straight Wind" | ||
}, | ||
{ | ||
"value": "1", | ||
"label": "Natural Wind" | ||
} | ||
] | ||
}, | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "NUMBER" | ||
} | ||
], | ||
"category": "flow", | ||
"tags": [ | ||
"Control" | ||
], | ||
"readmeComment": "Value mapping `[\"0\"\u003d\"Straight Wind\",\"1\"\u003d\"Natural Wind\"]`" | ||
}, | ||
{ | ||
"property": "horizontal-swing", | ||
"siid": 2, | ||
"piid": 4, | ||
"friendlyName": "Fan - Horizontal Swing", | ||
"channel": "horizontal_swing", | ||
"type": "Switch", | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "ONOFFBOOL" | ||
} | ||
], | ||
"category": "switch", | ||
"tags": [ | ||
"Switch" | ||
] | ||
}, | ||
{ | ||
"property": "horizontal-angle", | ||
"siid": 2, | ||
"piid": 5, | ||
"friendlyName": "Fan - Horizontal Angle", | ||
"channel": "horizontal_angle", | ||
"type": "Number", | ||
"stateDescription": { | ||
"options": [ | ||
{ | ||
"value": "30", | ||
"label": "30" | ||
}, | ||
{ | ||
"value": "60", | ||
"label": "60" | ||
}, | ||
{ | ||
"value": "90", | ||
"label": "90" | ||
}, | ||
{ | ||
"value": "120", | ||
"label": "120" | ||
}, | ||
{ | ||
"value": "140", | ||
"label": "140" | ||
} | ||
] | ||
}, | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "STRING" | ||
} | ||
], | ||
"category": "incline", | ||
"tags": [ | ||
"Setpoint" | ||
], | ||
"readmeComment": "Value mapping `[\"30\"\u003d\"30\",\"60\"\u003d\"60\",\"90\"\u003d\"90\",\"120\"\u003d\"120\",\"140\"\u003d\"140\"]`" | ||
}, | ||
{ | ||
"property": "off-delay-time", | ||
"siid": 2, | ||
"piid": 6, | ||
"friendlyName": "Fan - Power Off Delay Time", | ||
"channel": "off_delay_time", | ||
"type": "Number:Time", | ||
"unit": "minutes", | ||
"stateDescription": { | ||
"minimum": 0, | ||
"maximum": 480, | ||
"step": 1, | ||
"pattern": "%.0f %unit%" | ||
}, | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "STRING" | ||
} | ||
] | ||
}, | ||
{ | ||
"property": "brightness", | ||
"siid": 2, | ||
"piid": 7, | ||
"friendlyName": "Fan - Brightness", | ||
"channel": "brightness", | ||
"type": "Switch", | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "ONOFFBOOL" | ||
} | ||
] | ||
}, | ||
{ | ||
"property": "alarm", | ||
"siid": 2, | ||
"piid": 8, | ||
"friendlyName": "Fan - Alarm", | ||
"channel": "alarm", | ||
"type": "Switch", | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "ONOFFBOOL" | ||
} | ||
] | ||
}, | ||
{ | ||
"property": "motor-control", | ||
"siid": 2, | ||
"piid": 9, | ||
"friendlyName": "Fan - Motor Control", | ||
"channel": "motor_control", | ||
"type": "Number", | ||
"stateDescription": { | ||
"options": [ | ||
{ | ||
"value": "0", | ||
"label": "NO" | ||
}, | ||
{ | ||
"value": "1", | ||
"label": "LEFT" | ||
}, | ||
{ | ||
"value": "2", | ||
"label": "RIGHT" | ||
} | ||
] | ||
}, | ||
"refresh": false, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "NUMBER" | ||
} | ||
], | ||
"readmeComment": "Value mapping [\"0\"\u003d\"NO\",\"1\"\u003d\"LEFT\",\"2\"\u003d\"RIGHT\"]" | ||
}, | ||
{ | ||
"property": "speed-level", | ||
"siid": 2, | ||
"piid": 10, | ||
"friendlyName": "Fan - Speed Level", | ||
"channel": "speed_level", | ||
"type": "Number", | ||
"stateDescription": { | ||
"minimum": 1, | ||
"maximum": 100, | ||
"step": 1, | ||
"pattern": "%.0f" | ||
}, | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "NUMBER" | ||
} | ||
] | ||
}, | ||
{ | ||
"property": "physical-controls-locked", | ||
"siid": 3, | ||
"piid": 1, | ||
"friendlyName": "Physical Control Locked - Physical Control Locked", | ||
"channel": "physical_controls_locked", | ||
"type": "Switch", | ||
"refresh": true, | ||
"actions": [ | ||
{ | ||
"command": "set_properties", | ||
"parameterType": "ONOFFBOOL" | ||
} | ||
] | ||
} | ||
], | ||
"readmeComment": "Identified manual actions for execution\u003cbr /\u003e`action{\"did\":\"fan-toggle\",\"siid\":2,\"aiid\":1,\"in\":[]}`\u003cbr /\u003ePlease test and feedback if they are working to they can be linked to a channel.", | ||
"experimental": true | ||
} | ||
} |