diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index f8659b300..60e346d7f 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -124,6 +124,8 @@ Currently the miio binding supports more than 210 different models. | Yeelight Smart Bath Heater | miio:unsupported | yeelight.bhf_light.v2 | No | | | Gosund Plug | miio:basic | [cuco.plug.cp1](#cuco-plug-cp1) | Yes | | | XIAOMI MIJIA WIDETECH WDH318EFW1 Dehumidifier | miio:unsupported | nwt.derh.wdh318efw1 | No | | +| Vacuum 1C STYTJ01ZHM | miio:basic | [dreame.vacuum.mc1808](#dreame-vacuum-mc1808) | Yes | | +| dreame.vacuum.p2008 | miio:basic | [dreame.vacuum.p2008](#dreame-vacuum-p2008) | Yes | Identified manual actions for execution
`action{"did":"vacuum-start-sweep","siid":2,"aiid":1,"in":[]}`
`action{"did":"vacuum-stop-sweeping","siid":2,"aiid":2,"in":[]}`
`action{"did":"battery-start-charge","siid":3,"aiid":1,"in":[]}`
`action{"did":"brush-cleaner-reset-brush-life","siid":9,"aiid":1,"in":[]}`
`action{"did":"brush-cleaner-reset-brush-life","siid":10,"aiid":1,"in":[]}`
`action{"did":"filter-reset-filter-life","siid":11,"aiid":1,"in":[]}`
`action{"did":"vacuum-extend-start-clean","siid":4,"aiid":1,"in":[10.0]}`
`action{"did":"vacuum-extend-stop-clean","siid":4,"aiid":2,"in":[]}`
`action{"did":"map-map-req","siid":6,"aiid":1,"in":[2.0]}`
`action{"did":"map-update-map","siid":6,"aiid":2,"in":[4.0]}`
`action{"did":"audio-position","siid":7,"aiid":1,"in":[]}`
`action{"did":"audio-play-sound","siid":7,"aiid":2,"in":[]}`
`action{"did":"time-delete-timer","siid":8,"aiid":1,"in":[3.0]}`
Please test and feedback if they are working to they can be linked to a channel.
Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses | | Mi Air Purifier mb1 | miio:basic | [zhimi.airpurifier.mb1](#zhimi-airpurifier-mb1) | Yes | | | Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc1](#zhimi-airpurifier-mc1) | Yes | | | Mi Air Purifier 2S | miio:basic | [zhimi.airpurifier.mc2](#zhimi-airpurifier-mc2) | Yes | | @@ -242,7 +244,6 @@ Currently the miio binding supports more than 210 different models. | Xiaomi Mijia vacuum V-RVCLM21B | miio:basic | [viomi.vacuum.v6](#viomi-vacuum-v6) | Yes | | | Xiaomi Mijia vacuum mop STYJ02YM | miio:basic | [viomi.vacuum.v7](#viomi-vacuum-v7) | Yes | | | Xiaomi Mijia vacuum mop STYJ02YM v2 | miio:basic | [viomi.vacuum.v8](#viomi-vacuum-v8) | Yes | | -| Vacuum 1C STYTJ01ZHM | miio:basic | [dreame.vacuum.mc1808](#dreame-vacuum-mc1808) | Yes | | | roborock.vacuum.c1 | miio:unsupported | roborock.vacuum.c1 | No | | | Rockrobo Xiaowa Sweeper v2 | miio:unsupported | roborock.sweeper.e2v2 | No | | | Rockrobo Xiaowa Sweeper v3 | miio:unsupported | roborock.sweeper.e2v3 | No | | @@ -970,6 +971,79 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | SerialNumber | String | Device Information-Device Serial Number | | | On | Switch | Switch-Switch Status | | +### Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| vacuumaction | String | Vacuum Action | | +| BatteryLevel | Number | Battery-Battery Level | | +| ChargingState | Number | Battery-Charging State | | +| Fault | Number | Robot Cleaner-Device Fault | | +| Status | Number | Robot Cleaner-Status | | +| BrushLeftTime | String | Main Cleaning Brush-Brush Left Time | | +| BrushLifeLevel | Number | Main Cleaning Brush-Brush Life Level | | +| FilterLifeLevel | Number | Filter-Filter Life Level | | +| FilterLeftTime | String | Filter-Filter Left Time | | +| BrushLeftTime1 | String | Side Cleaning Brush-Brush Left Time | | +| BrushLifeLevel1 | Number | Side Cleaning Brush-Brush Life Level | | +| WorkMode | Number | clean-workmode | | +| Area | String | clean-area | | +| Timer | String | clean-timer | | +| Mode | Number | clean-mode | | +| TotalCleanTime | String | clean-total time | | +| TotalCleanTimes | String | clean-total times | | +| TotalCleanArea | String | clean-Total area | | +| CleanLogStartTime | String | clean-Start Time | | +| ButtonLed | String | clean-led | | +| TaskDone | Number | clean-task done | | +| LifeSieve | String | consumable-life-sieve | | +| LifeBrushSide | String | consumable-life-brush-side | | +| LifeBrushMain | String | consumable-life-brush-main | | +| Enable | Switch | annoy-enable | | +| StartTime | String | annoy-start-time | | +| StopTime | String | annoy-stop-time | | +| MapView | String | map-map-view | | +| Volume | Number | audio-volume | | +| VoicePackets | String | audio-voiceId | | +| TimeZone | String | timezone | | + +### dreame.vacuum.p2008 (dreame.vacuum.p2008) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| status | Number | Robot Cleaner - Status | Value mapping [1="Sweeping",2="Idle",3="Paused",4="Error",5="Go Charging",6="Charging"] | +| fault | Number | Robot Cleaner - Device Fault | Value mapping [0="No Faults"] | +| battery-level | Number | Battery - Battery Level | | +| charging-state | Number | Battery - Charging State | Value mapping [1="Charging",2="Not Charging",5="Go Charging"] | +| brush-left-time | Number:Time | Main Cleaning Brush - Brush Left Time | | +| brush-life-level | Number:Dimensionless | Main Cleaning Brush - Brush Life Level | | +| brush-left-time1 | Number:Time | Side Cleaning Brush - Brush Left Time | | +| brush-life-level1 | Number:Dimensionless | Side Cleaning Brush - Brush Life Level | | +| filter-life-level | Number:Dimensionless | Filter - Filter Life Level | | +| filter-left-time | Number:Time | Filter - Filter Left Time | | +| work-mode | Number | Vacuum Extend - Work Mode | | +| cleaning-time | Number:Time | Vacuum Extend - Cleaning Time | | +| cleaning-area | Number:Area | Vacuum Extend - Cleaning Area | | +| cleaning-mode | Number | Vacuum Extend - Cleaning Mode | Value mapping [0="",1="",2="",3=""] | +| mop-mode | Number | Vacuum Extend - Mop Mode | Value mapping [1="low",2="medium",3="high"] | +| waterbox-status | Number | Vacuum Extend - Waterbox Status | Value mapping [0="",1=""] | +| task-status | Number | Vacuum Extend - Task Status | Value mapping [0="",1=""] | +| break-point-restart | Number | Vacuum Extend - Break Point Restart | Value mapping [0="Off",1="On"] | +| carpet-press | Number | Vacuum Extend - Carpet Press | Value mapping [0="Off",1="On"] | +| enable | Switch | Do Not Disturb - Enable | | +| start-time | String | Do Not Disturb - Start Time | | +| end-time | String | Do Not Disturb - End Time | | +| volume | Number | Audio - Volume | | +| voice-packet-id | String | Audio - Voice Packet Id | | +| voice-change-state | String | Audio - Voice Change State | | +| time-zone | String | Time - Time Zone | | +| timer-clean | String | Time - Timer Clean | | +| first-clean-time | Number | Clean Logs - First Clean Time | | +| total-clean-time | Number:Time | Clean Logs - Total Clean Time | | +| total-clean-times | Number | Clean Logs - Total Clean Times | | +| total-clean-area | Number | Clean Logs - Total Clean Area | | +| save-map-status | Number | Vslam Extend - Save Map Status | Value mapping [0="Off",1="On",-1="Not Enabled"] | + ### Mi Air Purifier mb1 (zhimi.airpurifier.mb1) Channels | Channel | Type | Description | Comment | @@ -2070,42 +2144,6 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | is_mop | Number | is_mop | | | has_newmap | Number | has_newmap | | -### Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) Channels - -| Channel | Type | Description | Comment | -|------------------|---------|-------------------------------------|------------| -| vacuumaction | String | Vacuum Action | | -| BatteryLevel | Number | Battery-Battery Level | | -| ChargingState | Number | Battery-Charging State | | -| Fault | Number | Robot Cleaner-Device Fault | | -| Status | Number | Robot Cleaner-Status | | -| BrushLeftTime | String | Main Cleaning Brush-Brush Left Time | | -| BrushLifeLevel | Number | Main Cleaning Brush-Brush Life Level | | -| FilterLifeLevel | Number | Filter-Filter Life Level | | -| FilterLeftTime | String | Filter-Filter Left Time | | -| BrushLeftTime1 | String | Side Cleaning Brush-Brush Left Time | | -| BrushLifeLevel1 | Number | Side Cleaning Brush-Brush Life Level | | -| WorkMode | Number | clean-workmode | | -| Area | String | clean-area | | -| Timer | String | clean-timer | | -| Mode | Number | clean-mode | | -| TotalCleanTime | String | clean-total time | | -| TotalCleanTimes | String | clean-total times | | -| TotalCleanArea | String | clean-Total area | | -| CleanLogStartTime | String | clean-Start Time | | -| ButtonLed | String | clean-led | | -| TaskDone | Number | clean-task done | | -| LifeSieve | String | consumable-life-sieve | | -| LifeBrushSide | String | consumable-life-brush-side | | -| LifeBrushMain | String | consumable-life-brush-main | | -| Enable | Switch | annoy-enable | | -| StartTime | String | annoy-start-time | | -| StopTime | String | annoy-stop-time | | -| MapView | String | map-map-view | | -| Volume | Number | audio-volume | | -| VoicePackets | String | audio-voiceId | | -| TimeZone | String | timezone | | - ### Mijia 1 Gang Wall Smart Switch (WIFI) - PTX switch (090615.switch.xswitch01) Channels | Channel | Type | Description | Comment | @@ -3956,6 +3994,85 @@ String SerialNumber "Device Information-Device Serial Number" (G_plug) {channel= Switch On "Switch-Switch Status" (G_plug) {channel="miio:basic:plug:On"} ``` +### Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) item file lines + +note: Autogenerated example. Replace the id (vacuum) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_vacuum "Vacuum 1C STYTJ01ZHM" +String vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"} +Number BatteryLevel "Battery-Battery Level" (G_vacuum) {channel="miio:basic:vacuum:BatteryLevel"} +Number ChargingState "Battery-Charging State" (G_vacuum) {channel="miio:basic:vacuum:ChargingState"} +Number Fault "Robot Cleaner-Device Fault" (G_vacuum) {channel="miio:basic:vacuum:Fault"} +Number Status "Robot Cleaner-Status" (G_vacuum) {channel="miio:basic:vacuum:Status"} +String BrushLeftTime "Main Cleaning Brush-Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:BrushLeftTime"} +Number BrushLifeLevel "Main Cleaning Brush-Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:BrushLifeLevel"} +Number FilterLifeLevel "Filter-Filter Life Level" (G_vacuum) {channel="miio:basic:vacuum:FilterLifeLevel"} +String FilterLeftTime "Filter-Filter Left Time" (G_vacuum) {channel="miio:basic:vacuum:FilterLeftTime"} +String BrushLeftTime1 "Side Cleaning Brush-Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:BrushLeftTime1"} +Number BrushLifeLevel1 "Side Cleaning Brush-Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:BrushLifeLevel1"} +Number WorkMode "clean-workmode" (G_vacuum) {channel="miio:basic:vacuum:WorkMode"} +String Area "clean-area" (G_vacuum) {channel="miio:basic:vacuum:Area"} +String Timer "clean-timer" (G_vacuum) {channel="miio:basic:vacuum:Timer"} +Number Mode "clean-mode" (G_vacuum) {channel="miio:basic:vacuum:Mode"} +String TotalCleanTime "clean-total time" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanTime"} +String TotalCleanTimes "clean-total times" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanTimes"} +String TotalCleanArea "clean-Total area" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanArea"} +String CleanLogStartTime "clean-Start Time" (G_vacuum) {channel="miio:basic:vacuum:CleanLogStartTime"} +String ButtonLed "clean-led" (G_vacuum) {channel="miio:basic:vacuum:ButtonLed"} +Number TaskDone "clean-task done" (G_vacuum) {channel="miio:basic:vacuum:TaskDone"} +String LifeSieve "consumable-life-sieve" (G_vacuum) {channel="miio:basic:vacuum:LifeSieve"} +String LifeBrushSide "consumable-life-brush-side" (G_vacuum) {channel="miio:basic:vacuum:LifeBrushSide"} +String LifeBrushMain "consumable-life-brush-main" (G_vacuum) {channel="miio:basic:vacuum:LifeBrushMain"} +Switch Enable "annoy-enable" (G_vacuum) {channel="miio:basic:vacuum:Enable"} +String StartTime "annoy-start-time" (G_vacuum) {channel="miio:basic:vacuum:StartTime"} +String StopTime "annoy-stop-time" (G_vacuum) {channel="miio:basic:vacuum:StopTime"} +String MapView "map-map-view" (G_vacuum) {channel="miio:basic:vacuum:MapView"} +Number Volume "audio-volume" (G_vacuum) {channel="miio:basic:vacuum:Volume"} +String VoicePackets "audio-voiceId" (G_vacuum) {channel="miio:basic:vacuum:VoicePackets"} +String TimeZone "timezone" (G_vacuum) {channel="miio:basic:vacuum:TimeZone"} +``` + +### dreame.vacuum.p2008 (dreame.vacuum.p2008) item file lines + +note: Autogenerated example. Replace the id (vacuum) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_vacuum "dreame.vacuum.p2008" +Number status "Robot Cleaner - Status" (G_vacuum) {channel="miio:basic:vacuum:status"} +Number fault "Robot Cleaner - Device Fault" (G_vacuum) {channel="miio:basic:vacuum:fault"} +Number battery-level "Battery - Battery Level" (G_vacuum) {channel="miio:basic:vacuum:battery-level"} +Number charging-state "Battery - Charging State" (G_vacuum) {channel="miio:basic:vacuum:charging-state"} +Number:Time brush-left-time "Main Cleaning Brush - Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:brush-left-time"} +Number:Dimensionless brush-life-level "Main Cleaning Brush - Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:brush-life-level"} +Number:Time brush-left-time1 "Side Cleaning Brush - Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:brush-left-time1"} +Number:Dimensionless brush-life-level1 "Side Cleaning Brush - Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:brush-life-level1"} +Number:Dimensionless filter-life-level "Filter - Filter Life Level" (G_vacuum) {channel="miio:basic:vacuum:filter-life-level"} +Number:Time filter-left-time "Filter - Filter Left Time" (G_vacuum) {channel="miio:basic:vacuum:filter-left-time"} +Number work-mode "Vacuum Extend - Work Mode" (G_vacuum) {channel="miio:basic:vacuum:work-mode"} +Number:Time cleaning-time "Vacuum Extend - Cleaning Time" (G_vacuum) {channel="miio:basic:vacuum:cleaning-time"} +Number:Area cleaning-area "Vacuum Extend - Cleaning Area" (G_vacuum) {channel="miio:basic:vacuum:cleaning-area"} +Number cleaning-mode "Vacuum Extend - Cleaning Mode" (G_vacuum) {channel="miio:basic:vacuum:cleaning-mode"} +Number mop-mode "Vacuum Extend - Mop Mode" (G_vacuum) {channel="miio:basic:vacuum:mop-mode"} +Number waterbox-status "Vacuum Extend - Waterbox Status" (G_vacuum) {channel="miio:basic:vacuum:waterbox-status"} +Number task-status "Vacuum Extend - Task Status" (G_vacuum) {channel="miio:basic:vacuum:task-status"} +Number break-point-restart "Vacuum Extend - Break Point Restart" (G_vacuum) {channel="miio:basic:vacuum:break-point-restart"} +Number carpet-press "Vacuum Extend - Carpet Press" (G_vacuum) {channel="miio:basic:vacuum:carpet-press"} +Switch enable "Do Not Disturb - Enable" (G_vacuum) {channel="miio:basic:vacuum:enable"} +String start-time "Do Not Disturb - Start Time" (G_vacuum) {channel="miio:basic:vacuum:start-time"} +String end-time "Do Not Disturb - End Time" (G_vacuum) {channel="miio:basic:vacuum:end-time"} +Number volume "Audio - Volume" (G_vacuum) {channel="miio:basic:vacuum:volume"} +String voice-packet-id "Audio - Voice Packet Id" (G_vacuum) {channel="miio:basic:vacuum:voice-packet-id"} +String voice-change-state "Audio - Voice Change State" (G_vacuum) {channel="miio:basic:vacuum:voice-change-state"} +String time-zone "Time - Time Zone" (G_vacuum) {channel="miio:basic:vacuum:time-zone"} +String timer-clean "Time - Timer Clean" (G_vacuum) {channel="miio:basic:vacuum:timer-clean"} +Number first-clean-time "Clean Logs - First Clean Time" (G_vacuum) {channel="miio:basic:vacuum:first-clean-time"} +Number:Time total-clean-time "Clean Logs - Total Clean Time" (G_vacuum) {channel="miio:basic:vacuum:total-clean-time"} +Number total-clean-times "Clean Logs - Total Clean Times" (G_vacuum) {channel="miio:basic:vacuum:total-clean-times"} +Number total-clean-area "Clean Logs - Total Clean Area" (G_vacuum) {channel="miio:basic:vacuum:total-clean-area"} +Number save-map-status "Vslam Extend - Save Map Status" (G_vacuum) {channel="miio:basic:vacuum:save-map-status"} +``` + ### Mi Air Purifier mb1 (zhimi.airpurifier.mb1) item file lines note: Autogenerated example. Replace the id (airpurifier) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. @@ -5287,45 +5404,6 @@ Number is_mop "is_mop" (G_vacuum) {channel="miio:basic:vacuum:is_mop"} Number has_newmap "has_newmap" (G_vacuum) {channel="miio:basic:vacuum:has_newmap"} ``` -### Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) item file lines - -note: Autogenerated example. Replace the id (vacuum) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. - -```java -Group G_vacuum "Vacuum 1C STYTJ01ZHM" -String vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"} -Number BatteryLevel "Battery-Battery Level" (G_vacuum) {channel="miio:basic:vacuum:BatteryLevel"} -Number ChargingState "Battery-Charging State" (G_vacuum) {channel="miio:basic:vacuum:ChargingState"} -Number Fault "Robot Cleaner-Device Fault" (G_vacuum) {channel="miio:basic:vacuum:Fault"} -Number Status "Robot Cleaner-Status" (G_vacuum) {channel="miio:basic:vacuum:Status"} -String BrushLeftTime "Main Cleaning Brush-Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:BrushLeftTime"} -Number BrushLifeLevel "Main Cleaning Brush-Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:BrushLifeLevel"} -Number FilterLifeLevel "Filter-Filter Life Level" (G_vacuum) {channel="miio:basic:vacuum:FilterLifeLevel"} -String FilterLeftTime "Filter-Filter Left Time" (G_vacuum) {channel="miio:basic:vacuum:FilterLeftTime"} -String BrushLeftTime1 "Side Cleaning Brush-Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:BrushLeftTime1"} -Number BrushLifeLevel1 "Side Cleaning Brush-Brush Life Level" (G_vacuum) {channel="miio:basic:vacuum:BrushLifeLevel1"} -Number WorkMode "clean-workmode" (G_vacuum) {channel="miio:basic:vacuum:WorkMode"} -String Area "clean-area" (G_vacuum) {channel="miio:basic:vacuum:Area"} -String Timer "clean-timer" (G_vacuum) {channel="miio:basic:vacuum:Timer"} -Number Mode "clean-mode" (G_vacuum) {channel="miio:basic:vacuum:Mode"} -String TotalCleanTime "clean-total time" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanTime"} -String TotalCleanTimes "clean-total times" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanTimes"} -String TotalCleanArea "clean-Total area" (G_vacuum) {channel="miio:basic:vacuum:TotalCleanArea"} -String CleanLogStartTime "clean-Start Time" (G_vacuum) {channel="miio:basic:vacuum:CleanLogStartTime"} -String ButtonLed "clean-led" (G_vacuum) {channel="miio:basic:vacuum:ButtonLed"} -Number TaskDone "clean-task done" (G_vacuum) {channel="miio:basic:vacuum:TaskDone"} -String LifeSieve "consumable-life-sieve" (G_vacuum) {channel="miio:basic:vacuum:LifeSieve"} -String LifeBrushSide "consumable-life-brush-side" (G_vacuum) {channel="miio:basic:vacuum:LifeBrushSide"} -String LifeBrushMain "consumable-life-brush-main" (G_vacuum) {channel="miio:basic:vacuum:LifeBrushMain"} -Switch Enable "annoy-enable" (G_vacuum) {channel="miio:basic:vacuum:Enable"} -String StartTime "annoy-start-time" (G_vacuum) {channel="miio:basic:vacuum:StartTime"} -String StopTime "annoy-stop-time" (G_vacuum) {channel="miio:basic:vacuum:StopTime"} -String MapView "map-map-view" (G_vacuum) {channel="miio:basic:vacuum:MapView"} -Number Volume "audio-volume" (G_vacuum) {channel="miio:basic:vacuum:Volume"} -String VoicePackets "audio-voiceId" (G_vacuum) {channel="miio:basic:vacuum:VoicePackets"} -String TimeZone "timezone" (G_vacuum) {channel="miio:basic:vacuum:TimeZone"} -``` - ### Mijia 1 Gang Wall Smart Switch (WIFI) - PTX switch (090615.switch.xswitch01) item file lines note: Autogenerated example. Replace the id (switch) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index 8674bf6d0..3e9ca19b7 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java @@ -57,6 +57,8 @@ public enum MiIoDevices { BATHHEATER_V2("yeelight.bhf_light.v2", "Yeelight Smart Bath Heater", THING_TYPE_UNSUPPORTED), CUCOPLUG_CP1("cuco.plug.cp1", "Gosund Plug", THING_TYPE_BASIC), DEHUMIDIFIER_FW1("nwt.derh.wdh318efw1", "XIAOMI MIJIA WIDETECH WDH318EFW1 Dehumidifier", THING_TYPE_UNSUPPORTED), + DREAME_VACUUM_MC1808("dreame.vacuum.mc1808", "Vacuum 1C STYTJ01ZHM", THING_TYPE_BASIC), + DREAME_VACUUM_P2008("dreame.vacuum.p2008", "dreame.vacuum.p2008", THING_TYPE_BASIC), ZHIMI_AIRPURIFIER_MB1("zhimi.airpurifier.mb1", "Mi Air Purifier mb1", THING_TYPE_BASIC), ZHIMI_AIRPURIFIER_MC1("zhimi.airpurifier.mc1", "Mi Air Purifier 2S", THING_TYPE_BASIC), ZHIMI_AIRPURIFIER_MC2("zhimi.airpurifier.mc2", "Mi Air Purifier 2S", THING_TYPE_BASIC), @@ -176,7 +178,6 @@ public enum MiIoDevices { VACUUME_V6("viomi.vacuum.v6", "Xiaomi Mijia vacuum V-RVCLM21B", THING_TYPE_BASIC), VACUUME_V7("viomi.vacuum.v7", "Xiaomi Mijia vacuum mop STYJ02YM", THING_TYPE_BASIC), VACUUME_V8("viomi.vacuum.v8", "Xiaomi Mijia vacuum mop STYJ02YM v2", THING_TYPE_BASIC), - VACUUM_MC1808("dreame.vacuum.mc1808", "Vacuum 1C STYTJ01ZHM", THING_TYPE_BASIC), ROBOROCK_VACUUM_C1("roborock.vacuum.c1", "roborock.vacuum.c1", THING_TYPE_UNSUPPORTED), SWEEPER2("roborock.sweeper.e2v2", "Rockrobo Xiaowa Sweeper v2", THING_TYPE_UNSUPPORTED), SWEEPER3("roborock.sweeper.e2v3", "Rockrobo Xiaowa Sweeper v3", THING_TYPE_UNSUPPORTED), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2008-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2008-miot.json new file mode 100644 index 000000000..59a7e8a57 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.p2008-miot.json @@ -0,0 +1,630 @@ +{ + "deviceMapping": { + "id": [ + "dreame.vacuum.p2008" + ], + "propertyMethod": "get_properties", + "maxProperties": 1, + "channels": [ + { + "property": "status", + "siid": 2, + "piid": 1, + "friendlyName": "Robot Cleaner - Status", + "channel": "status", + "type": "Number", + "stateDescription": { + "readOnly": true, + "options": [ + { + "value": "1", + "label": "Sweeping" + }, + { + "value": "2", + "label": "Idle" + }, + { + "value": "3", + "label": "Paused" + }, + { + "value": "4", + "label": "Error" + }, + { + "value": "5", + "label": "Go Charging" + }, + { + "value": "6", + "label": "Charging" + } + ] + }, + "refresh": true, + "actions": [], + "readmeComment": "Value mapping [1\u003d\"Sweeping\",2\u003d\"Idle\",3\u003d\"Paused\",4\u003d\"Error\",5\u003d\"Go Charging\",6\u003d\"Charging\"]" + }, + { + "property": "fault", + "siid": 2, + "piid": 2, + "friendlyName": "Robot Cleaner - Device Fault", + "channel": "fault", + "type": "Number", + "stateDescription": { + "readOnly": true, + "options": [ + { + "value": "0", + "label": "No Faults" + } + ] + }, + "refresh": true, + "actions": [], + "readmeComment": "Value mapping [0\u003d\"No Faults\"]" + }, + { + "property": "battery-level", + "siid": 3, + "piid": 1, + "friendlyName": "Battery - Battery Level", + "channel": "battery-level", + "type": "Number", + "channelType": "system:battery-level", + "stateDescription": { + "pattern": "%.0f %%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "charging-state", + "siid": 3, + "piid": 2, + "friendlyName": "Battery - Charging State", + "channel": "charging-state", + "type": "Number", + "stateDescription": { + "readOnly": true, + "options": [ + { + "value": "1", + "label": "Charging" + }, + { + "value": "2", + "label": "Not Charging" + }, + { + "value": "5", + "label": "Go Charging" + } + ] + }, + "refresh": true, + "actions": [], + "readmeComment": "Value mapping [1\u003d\"Charging\",2\u003d\"Not Charging\",5\u003d\"Go Charging\"]" + }, + { + "property": "brush-left-time", + "siid": 9, + "piid": 1, + "friendlyName": "Main Cleaning Brush - Brush Left Time", + "channel": "brush-left-time", + "type": "Number:Time", + "unit": "hours", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "brush-life-level", + "siid": 9, + "piid": 2, + "friendlyName": "Main Cleaning Brush - Brush Life Level", + "channel": "brush-life-level", + "type": "Number:Dimensionless", + "unit": "percentage", + "stateDescription": { + "pattern": "%.0f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "brush-left-time1", + "siid": 10, + "piid": 1, + "friendlyName": "Side Cleaning Brush - Brush Left Time", + "channel": "brush-left-time1", + "type": "Number:Time", + "unit": "hours", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "brush-life-level1", + "siid": 10, + "piid": 2, + "friendlyName": "Side Cleaning Brush - Brush Life Level", + "channel": "brush-life-level1", + "type": "Number:Dimensionless", + "unit": "percentage", + "stateDescription": { + "pattern": "%.0f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "filter-life-level", + "siid": 11, + "piid": 1, + "friendlyName": "Filter - Filter Life Level", + "channel": "filter-life-level", + "type": "Number:Dimensionless", + "unit": "percentage", + "stateDescription": { + "pattern": "%.0f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "filter-left-time", + "siid": 11, + "piid": 2, + "friendlyName": "Filter - Filter Left Time", + "channel": "filter-left-time", + "type": "Number:Time", + "unit": "hours", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "work-mode", + "siid": 4, + "piid": 1, + "friendlyName": "Vacuum Extend - Work Mode", + "channel": "work-mode", + "type": "Number", + "stateDescription": { + "pattern": "%.1f", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "cleaning-time", + "siid": 4, + "piid": 2, + "friendlyName": "Vacuum Extend - Cleaning Time", + "channel": "cleaning-time", + "type": "Number:Time", + "unit": "minutes", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "cleaning-area", + "siid": 4, + "piid": 3, + "friendlyName": "Vacuum Extend - Cleaning Area", + "channel": "cleaning-area", + "type": "Number:Area", + "unit": "square_meter", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "cleaning-mode", + "siid": 4, + "piid": 4, + "friendlyName": "Vacuum Extend - Cleaning Mode", + "channel": "cleaning-mode", + "type": "Number", + "stateDescription": { + "options": [ + { + "value": "0", + "label": "mode 0" + }, + { + "value": "1", + "label": "mode 1" + }, + { + "value": "2", + "label": "mode 2" + }, + { + "value": "3", + "label": "mode 3" + } + ] + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ], + "readmeComment": "Value mapping [0\u003d\"\",1\u003d\"\",2\u003d\"\",3\u003d\"\"]" + }, + { + "property": "mop-mode", + "siid": 4, + "piid": 5, + "friendlyName": "Vacuum Extend - Mop Mode", + "channel": "mop-mode", + "type": "Number", + "stateDescription": { + "options": [ + { + "value": "1", + "label": "low water" + }, + { + "value": "2", + "label": "medium water" + }, + { + "value": "3", + "label": "high water" + } + ] + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ], + "readmeComment": "Value mapping [1\u003d\"low\",2\u003d\"medium\",3\u003d\"high\"]" + }, + { + "property": "waterbox-status", + "siid": 4, + "piid": 6, + "friendlyName": "Vacuum Extend - Waterbox Status", + "channel": "waterbox-status", + "type": "Number", + "stateDescription": { + "readOnly": true, + "options": [ + { + "value": "0", + "label": "Status 0" + }, + { + "value": "1", + "label": "Status 1" + } + ] + }, + "refresh": true, + "actions": [], + "readmeComment": "Value mapping [0\u003d\"\",1\u003d\"\"]" + }, + { + "property": "task-status", + "siid": 4, + "piid": 7, + "friendlyName": "Vacuum Extend - Task Status", + "channel": "task-status", + "type": "Number", + "stateDescription": { + "readOnly": true, + "options": [ + { + "value": "0", + "label": "Status 0" + }, + { + "value": "1", + "label": "Status 1" + } + ] + }, + "refresh": true, + "actions": [], + "readmeComment": "Value mapping [0\u003d\"\",1\u003d\"\"]" + }, + { + "property": "break-point-restart", + "siid": 4, + "piid": 11, + "friendlyName": "Vacuum Extend - Break Point Restart", + "channel": "break-point-restart", + "type": "Number", + "stateDescription": { + "options": [ + { + "value": "0", + "label": "Off" + }, + { + "value": "1", + "label": "On" + } + ] + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ], + "readmeComment": "Value mapping [0\u003d\"Off\",1\u003d\"On\"]" + }, + { + "property": "carpet-press", + "siid": 4, + "piid": 12, + "friendlyName": "Vacuum Extend - Carpet Press", + "channel": "carpet-press", + "type": "Number", + "stateDescription": { + "options": [ + { + "value": "0", + "label": "Off" + }, + { + "value": "1", + "label": "On" + } + ] + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ], + "readmeComment": "Value mapping [0\u003d\"Off\",1\u003d\"On\"]" + }, + { + "property": "enable", + "siid": 5, + "piid": 1, + "friendlyName": "Do Not Disturb - Enable", + "channel": "enable", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "start-time", + "siid": 5, + "piid": 2, + "friendlyName": "Do Not Disturb - Start Time", + "channel": "start-time", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "end-time", + "siid": 5, + "piid": 3, + "friendlyName": "Do Not Disturb - End Time", + "channel": "end-time", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "volume", + "siid": 7, + "piid": 1, + "friendlyName": "Audio - Volume", + "channel": "volume", + "type": "Number", + "stateDescription": { + "pattern": "%.1f" + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "voice-packet-id", + "siid": 7, + "piid": 2, + "friendlyName": "Audio - Voice Packet Id", + "channel": "voice-packet-id", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "voice-change-state", + "siid": 7, + "piid": 3, + "friendlyName": "Audio - Voice Change State", + "channel": "voice-change-state", + "type": "String", + "stateDescription": { + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "time-zone", + "siid": 8, + "piid": 1, + "friendlyName": "Time - Time Zone", + "channel": "time-zone", + "type": "String", + "stateDescription": { + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "timer-clean", + "siid": 8, + "piid": 2, + "friendlyName": "Time - Timer Clean", + "channel": "timer-clean", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "first-clean-time", + "siid": 12, + "piid": 1, + "friendlyName": "Clean Logs - First Clean Time", + "channel": "first-clean-time", + "type": "Number", + "stateDescription": { + "pattern": "%.1f", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "total-clean-time", + "siid": 12, + "piid": 2, + "friendlyName": "Clean Logs - Total Clean Time", + "channel": "total-clean-time", + "type": "Number:Time", + "unit": "minutes", + "stateDescription": { + "pattern": "%.1f %unit%", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "total-clean-times", + "siid": 12, + "piid": 3, + "friendlyName": "Clean Logs - Total Clean Times", + "channel": "total-clean-times", + "type": "Number", + "stateDescription": { + "pattern": "%.1f", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "total-clean-area", + "siid": 12, + "piid": 4, + "friendlyName": "Clean Logs - Total Clean Area", + "channel": "total-clean-area", + "type": "Number", + "stateDescription": { + "pattern": "%.1f", + "readOnly": true + }, + "refresh": true, + "actions": [] + }, + { + "property": "save-map-status", + "siid": 13, + "piid": 1, + "friendlyName": "Vslam Extend - Save Map Status", + "channel": "save-map-status", + "type": "Number", + "stateDescription": { + "options": [ + { + "value": "0", + "label": "Off" + }, + { + "value": "1", + "label": "On" + }, + { + "value": "-1", + "label": "Not Enabled" + } + ] + }, + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ], + "readmeComment": "Value mapping [0\u003d\"Off\",1\u003d\"On\",-1\u003d\"Not Enabled\"]" + } + ], + "readmeComment": "Identified manual actions for execution\u003cbr /\u003e`action{\"did\":\"vacuum-start-sweep\",\"siid\":2,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"vacuum-stop-sweeping\",\"siid\":2,\"aiid\":2,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"battery-start-charge\",\"siid\":3,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":9,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":10,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"filter-reset-filter-life\",\"siid\":11,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"vacuum-extend-start-clean\",\"siid\":4,\"aiid\":1,\"in\":[10.0]}`\u003cbr /\u003e`action{\"did\":\"vacuum-extend-stop-clean\",\"siid\":4,\"aiid\":2,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"map-map-req\",\"siid\":6,\"aiid\":1,\"in\":[2.0]}`\u003cbr /\u003e`action{\"did\":\"map-update-map\",\"siid\":6,\"aiid\":2,\"in\":[4.0]}`\u003cbr /\u003e`action{\"did\":\"audio-position\",\"siid\":7,\"aiid\":1,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"audio-play-sound\",\"siid\":7,\"aiid\":2,\"in\":[]}`\u003cbr /\u003e`action{\"did\":\"time-delete-timer\",\"siid\":8,\"aiid\":1,\"in\":[3.0]}`\u003cbr /\u003ePlease test and feedback if they are working to they can be linked to a channel.", + "experimental": true + } +}