From 5d63fb168981c9b249299b654ac3c478d5f84851 Mon Sep 17 00:00:00 2001 From: mabosch74 <57590926+mabosch74@users.noreply.github.com> Date: Mon, 26 Apr 2021 12:13:30 +0200 Subject: [PATCH] [miio] added functions for Vacuums P2009/2036/2157 (#10269) * Fixed typo for starting sequence * Added support for "find me" & "test sound" function * Added clear names for faults Signed-off-by: Marcel Bossert-Schwab --- .../database/dreame.vacuum.p2009-miot.json | 162 +++++++++++++++++- 1 file changed, 156 insertions(+), 6 deletions(-) diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2009-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2009-miot.json index 3a62d30f894..09d69f9e0e4 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2009-miot.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2009-miot.json @@ -26,6 +26,14 @@ { "value": "dock", "label": "Goto Dock" + }, + { + "value": "findme", + "label": "Find me" + }, + { + "value": "testsound", + "label": "Test Sound" } ] }, @@ -35,7 +43,7 @@ "command": "action", "parameterType": "EMPTY", "siid": 2, - "aiid": 2, + "aiid": 1, "condition": { "name": "matchValue", "parameters": [ @@ -72,6 +80,34 @@ } ] } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 7, + "aiid": 1, + "condition": { + "name": "matchValue", + "parameters" : [ + { + "matchValue": "findme" + } + ] + } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 7, + "aiid": 2, + "condition": { + "name": "matchValue", + "parameters" : [ + { + "matchValue": "testsound" + } + ] + } } ], "readmeComment": "Value mapping [\"sweep\"\u003d\"Sweep\",\"stopsweep\"\u003d\"Stop Sweep\",\"dock\"\u003d\"Goto Dock\"]" @@ -132,11 +168,125 @@ "channel": "fault", "type": "Number", "stateDescription": { - "minimum": 0, - "maximum": 100, - "step": 1, - "pattern": "%.0f", - "readOnly": true + "readOnly": true, + "options": [ + { + "value": "0", + "label": "No Error" + }, + { + "value": "1", + "label": "Drop" + }, + { + "value": "2", + "label": "Cliff" + }, + { + "value": "3", + "label": "Bumper" + }, + { + "value": "4", + "label": "Gesture" + }, + { + "value": "5", + "label": "Bumper Repeat" + }, + { + "value": "6", + "label": "Drop Repeat" + }, + { + "value": "7", + "label": "Optical Flow" + }, + { + "value": "8", + "label": "No Box" + }, + { + "value": "9", + "label": "No Tankbox" + }, + { + "value": "10", + "label": "Waterbox Empty" + }, + { + "value": "11", + "label": "Box full" + }, + { + "value": "12", + "label": "Brush" + }, + { + "value": "13", + "label": "Side Brush" + }, + { + "value": "14", + "label": "Fan" + }, + { + "value": "15", + "label": "Left Wheel motor" + }, + { + "value": "16", + "label": "Right Wheel motor" + }, + { + "value": "17", + "label": "Turn suffocate" + }, + { + "value": "18", + "label": "Forward suffocate" + }, + { + "value": "19", + "label": "Charger get" + }, + { + "value": "20", + "label": "Battery low" + }, + { + "value": "21", + "label": "Charge fault" + }, + { + "value": "22", + "label": "Battery percentage" + }, + { + "value": "23", + "label": "Heart" + }, + { + "value": "24", + "label": "Camera occlusion" + }, + { + "value": "25", + "label": "Camera fault" + }, + { + "value": "26", + "label": "Event battery" + }, + { + "value": "27", + "label": "Forward looking" + }, + { + "value": "28", + "label": "Gyroscope" + } + ] }, "refresh": true, "actions": []