Skip to content

Commit

Permalink
[miio] Improve Viomi vacuums, add docking and route channel & mapping (
Browse files Browse the repository at this point in the history
…openhab#11763)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
  • Loading branch information
marcelrv authored and andrasU committed Nov 12, 2022
1 parent 0c8a47e commit aecdfda
Show file tree
Hide file tree
Showing 3 changed files with 408 additions and 40 deletions.
60 changes: 33 additions & 27 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2415,60 +2415,63 @@ Note, not all the values need to be in the json file, e.g. a subset of the param

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause"]` |
| state | Number | State | |
| mode | Number | Mode | |
| err_state | Number | Error | |
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause","3"="Dock"]` |
| state | Number | State | Value mapping `["0"="Idle Undocked","1"="Idle","2"="Paused","3"="Sweeping","4"="Go Charging","5"="Charging","6"="Sweeping and Mopping","7"="Mopping"]` |
| mode | Number | Clean Mode | Value mapping `["0"="Everywhere","1"="Edges","2"="Surface","3"="Fixed Location"]` |
| err_state | Number | Error | Value mapping `["0"="Sleeping and not charging","500"="Radar timed out","501"="Wheels stuck","502"="Low battery","503"="Dust bin missing","508"="Uneven ground","509"="Cliff sensor erro","510"="Collision sensor error","511"="Could not return to dock","512"="Could not return to dock","513"="Could not navigate","514"="Vacuum stuck","515"="Charging erro","516"="Mop temperature error","521"="Water tank is not installed","522"="Mop is not installed","525"="Insufficient water in water tank","527"="Remove mop","528"="Dust bin missing","529"="Mop and water tank missing","530"="Mop and water tank missin","531"="Water tank is not installed","2101"="Unsufficient battery, continuing cleaning after recharge","2103"="Charging","2104"="Fully charged"]` |
| battery_life | Number | Battery | |
| box_type | Number | Box type | |
| box_type | Number | Box type | Value mapping `["0"="No Bin","1"="Sweep","2"="Mop","3"="Sweep and Mop"]` |
| mop_type | Number | mop_type | |
| mop_route | Number | Mop Route | Value mapping `["0"="S-Pattern","1"="Y-Pattern"]` |
| s_time | Number | Clean time | |
| s_area | Number | Clean Area | |
| suction_grade | Number | suction_grade | |
| water_grade | Number | water_grade | |
| suction_grade | Number | suction_grade | Value mapping `["0"="Silent","1"="Basic","2"="Medium","3"="Strong"]` |
| water_grade | Number | water_grade | Value mapping `["11"="Low","12"="Medium","13"="High"]` |
| remember_map | Number | remember_map | |
| has_map | Number | has_map | |
| is_mop | Number | is_mop | |
| is_mop | Number | is_mop | Value mapping `["0"="Vacuum","1"="Vacuum And Mop","2"="Mop","3"="CleanZone","4"="CleanSpot"]` |
| has_newmap | Number | has_newmap | |

### Mi Robot Vacuum-Mop P (<a name="viomi-vacuum-v7">viomi.vacuum.v7</a>) Channels

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause"]` |
| state | Number | State | |
| mode | Number | Mode | |
| err_state | Number | Error | |
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause","3"="Dock"]` |
| state | Number | State | Value mapping `["0"="Idle Undocked","1"="Idle","2"="Paused","3"="Sweeping","4"="Go Charging","5"="Charging","6"="Sweeping and Mopping","7"="Mopping"]` |
| mode | Number | Clean Mode | Value mapping `["0"="Everywhere","1"="Edges","2"="Surface","3"="Fixed Location"]` |
| err_state | Number | Error | Value mapping `["0"="Sleeping and not charging","500"="Radar timed out","501"="Wheels stuck","502"="Low battery","503"="Dust bin missing","508"="Uneven ground","509"="Cliff sensor erro","510"="Collision sensor error","511"="Could not return to dock","512"="Could not return to dock","513"="Could not navigate","514"="Vacuum stuck","515"="Charging erro","516"="Mop temperature error","521"="Water tank is not installed","522"="Mop is not installed","525"="Insufficient water in water tank","527"="Remove mop","528"="Dust bin missing","529"="Mop and water tank missing","530"="Mop and water tank missin","531"="Water tank is not installed","2101"="Unsufficient battery, continuing cleaning after recharge","2103"="Charging","2104"="Fully charged"]` |
| battery_life | Number | Battery | |
| box_type | Number | Box type | |
| box_type | Number | Box type | Value mapping `["0"="No Bin","1"="Sweep","2"="Mop","3"="Sweep and Mop"]` |
| mop_type | Number | mop_type | |
| mop_route | Number | Mop Route | Value mapping `["0"="S-Pattern","1"="Y-Pattern"]` |
| s_time | Number | Clean time | |
| s_area | Number | Clean Area | |
| suction_grade | Number | suction_grade | |
| water_grade | Number | water_grade | |
| suction_grade | Number | suction_grade | Value mapping `["0"="Silent","1"="Basic","2"="Medium","3"="Strong"]` |
| water_grade | Number | water_grade | Value mapping `["11"="Low","12"="Medium","13"="High"]` |
| remember_map | Number | remember_map | |
| has_map | Number | has_map | |
| is_mop | Number | is_mop | |
| is_mop | Number | is_mop | Value mapping `["0"="Vacuum","1"="Vacuum And Mop","2"="Mop","3"="CleanZone","4"="CleanSpot"]` |
| has_newmap | Number | has_newmap | |

### Mi Robot Vacuum-Mop P (<a name="viomi-vacuum-v8">viomi.vacuum.v8</a>) Channels

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause"]` |
| state | Number | State | |
| mode | Number | Mode | |
| err_state | Number | Error | |
| vacuumaction | Number | Vacuum Action | Value mapping `["1"="Start","0"="Stop","2"="Pause","3"="Dock"]` |
| state | Number | State | Value mapping `["0"="Idle Undocked","1"="Idle","2"="Paused","3"="Sweeping","4"="Go Charging","5"="Charging","6"="Sweeping and Mopping","7"="Mopping"]` |
| mode | Number | Clean Mode | Value mapping `["0"="Everywhere","1"="Edges","2"="Surface","3"="Fixed Location"]` |
| err_state | Number | Error | Value mapping `["0"="Sleeping and not charging","500"="Radar timed out","501"="Wheels stuck","502"="Low battery","503"="Dust bin missing","508"="Uneven ground","509"="Cliff sensor erro","510"="Collision sensor error","511"="Could not return to dock","512"="Could not return to dock","513"="Could not navigate","514"="Vacuum stuck","515"="Charging erro","516"="Mop temperature error","521"="Water tank is not installed","522"="Mop is not installed","525"="Insufficient water in water tank","527"="Remove mop","528"="Dust bin missing","529"="Mop and water tank missing","530"="Mop and water tank missin","531"="Water tank is not installed","2101"="Unsufficient battery, continuing cleaning after recharge","2103"="Charging","2104"="Fully charged"]` |
| battery_life | Number | Battery | |
| box_type | Number | Box type | |
| box_type | Number | Box type | Value mapping `["0"="No Bin","1"="Sweep","2"="Mop","3"="Sweep and Mop"]` |
| mop_type | Number | mop_type | |
| mop_route | Number | Mop Route | Value mapping `["0"="S-Pattern","1"="Y-Pattern"]` |
| s_time | Number | Clean time | |
| s_area | Number | Clean Area | |
| suction_grade | Number | suction_grade | |
| water_grade | Number | water_grade | |
| suction_grade | Number | suction_grade | Value mapping `["0"="Silent","1"="Basic","2"="Medium","3"="Strong"]` |
| water_grade | Number | water_grade | Value mapping `["11"="Low","12"="Medium","13"="High"]` |
| remember_map | Number | remember_map | |
| has_map | Number | has_map | |
| is_mop | Number | is_mop | |
| is_mop | Number | is_mop | Value mapping `["0"="Vacuum","1"="Vacuum And Mop","2"="Mop","3"="CleanZone","4"="CleanSpot"]` |
| has_newmap | Number | has_newmap | |

### Viomi S9 (<a name="viomi-vacuum-v18">viomi.vacuum.v18</a>) Channels
Expand Down Expand Up @@ -7716,11 +7719,12 @@ note: Autogenerated example. Replace the id (vacuum) in the channel with your ow
Group G_vacuum "Viomi Cleaning Robot V-RVCLM21B" <status>
Number vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"}
Number state "State" (G_vacuum) {channel="miio:basic:vacuum:state"}
Number mode "Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number mode "Clean Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number err_state "Error" (G_vacuum) {channel="miio:basic:vacuum:err_state"}
Number battery_life "Battery" (G_vacuum) {channel="miio:basic:vacuum:battery_life"}
Number box_type "Box type" (G_vacuum) {channel="miio:basic:vacuum:box_type"}
Number mop_type "mop_type" (G_vacuum) {channel="miio:basic:vacuum:mop_type"}
Number mop_route "Mop Route" (G_vacuum) {channel="miio:basic:vacuum:mop_route"}
Number s_time "Clean time" (G_vacuum) {channel="miio:basic:vacuum:s_time"}
Number s_area "Clean Area" (G_vacuum) {channel="miio:basic:vacuum:s_area"}
Number suction_grade "suction_grade" (G_vacuum) {channel="miio:basic:vacuum:suction_grade"}
Expand All @@ -7739,11 +7743,12 @@ note: Autogenerated example. Replace the id (vacuum) in the channel with your ow
Group G_vacuum "Mi Robot Vacuum-Mop P" <status>
Number vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"}
Number state "State" (G_vacuum) {channel="miio:basic:vacuum:state"}
Number mode "Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number mode "Clean Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number err_state "Error" (G_vacuum) {channel="miio:basic:vacuum:err_state"}
Number battery_life "Battery" (G_vacuum) {channel="miio:basic:vacuum:battery_life"}
Number box_type "Box type" (G_vacuum) {channel="miio:basic:vacuum:box_type"}
Number mop_type "mop_type" (G_vacuum) {channel="miio:basic:vacuum:mop_type"}
Number mop_route "Mop Route" (G_vacuum) {channel="miio:basic:vacuum:mop_route"}
Number s_time "Clean time" (G_vacuum) {channel="miio:basic:vacuum:s_time"}
Number s_area "Clean Area" (G_vacuum) {channel="miio:basic:vacuum:s_area"}
Number suction_grade "suction_grade" (G_vacuum) {channel="miio:basic:vacuum:suction_grade"}
Expand All @@ -7762,11 +7767,12 @@ note: Autogenerated example. Replace the id (vacuum) in the channel with your ow
Group G_vacuum "Mi Robot Vacuum-Mop P" <status>
Number vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"}
Number state "State" (G_vacuum) {channel="miio:basic:vacuum:state"}
Number mode "Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number mode "Clean Mode" (G_vacuum) {channel="miio:basic:vacuum:mode"}
Number err_state "Error" (G_vacuum) {channel="miio:basic:vacuum:err_state"}
Number battery_life "Battery" (G_vacuum) {channel="miio:basic:vacuum:battery_life"}
Number box_type "Box type" (G_vacuum) {channel="miio:basic:vacuum:box_type"}
Number mop_type "mop_type" (G_vacuum) {channel="miio:basic:vacuum:mop_type"}
Number mop_route "Mop Route" (G_vacuum) {channel="miio:basic:vacuum:mop_route"}
Number s_time "Clean time" (G_vacuum) {channel="miio:basic:vacuum:s_time"}
Number s_area "Clean Area" (G_vacuum) {channel="miio:basic:vacuum:s_area"}
Number suction_grade "suction_grade" (G_vacuum) {channel="miio:basic:vacuum:suction_grade"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,8 @@ ch.viomi.vacuum.v8.err_state = Error
ch.viomi.vacuum.v8.has_map = has_map
ch.viomi.vacuum.v8.has_newmap = has_newmap
ch.viomi.vacuum.v8.is_mop = is_mop
ch.viomi.vacuum.v8.mode = Mode
ch.viomi.vacuum.v8.mode = Clean Mode
ch.viomi.vacuum.v8.mop_route = Mop Route
ch.viomi.vacuum.v8.mop_type = mop_type
ch.viomi.vacuum.v8.remember_map = remember_map
ch.viomi.vacuum.v8.s_area = Clean Area
Expand Down Expand Up @@ -2074,6 +2075,65 @@ option.viomi.vacuum.v18-miot.water-grade-2 = 3 Blocks
option.viomi.vacuum.v18-miot.wdr-mode-0 = Mode 0
option.viomi.vacuum.v18-miot.wdr-mode-1 = Mode 1
option.viomi.vacuum.v18-miot.wdr-mode-2 = Mode 2
option.viomi.vacuum.v8.box_type-0 = No Bin
option.viomi.vacuum.v8.box_type-1 = Sweep
option.viomi.vacuum.v8.box_type-2 = Mop
option.viomi.vacuum.v8.box_type-3 = Sweep and Mop
option.viomi.vacuum.v8.err_state-0 = Sleeping and not charging
option.viomi.vacuum.v8.err_state-2101 = Unsufficient battery, continuing cleaning after recharge
option.viomi.vacuum.v8.err_state-2103 = Charging
option.viomi.vacuum.v8.err_state-2104 = Fully charged
option.viomi.vacuum.v8.err_state-500 = Radar timed out
option.viomi.vacuum.v8.err_state-501 = Wheels stuck
option.viomi.vacuum.v8.err_state-502 = Low battery
option.viomi.vacuum.v8.err_state-503 = Dust bin missing
option.viomi.vacuum.v8.err_state-508 = Uneven ground
option.viomi.vacuum.v8.err_state-509 = Cliff sensor erro
option.viomi.vacuum.v8.err_state-510 = Collision sensor error
option.viomi.vacuum.v8.err_state-511 = Could not return to dock
option.viomi.vacuum.v8.err_state-512 = Could not return to dock
option.viomi.vacuum.v8.err_state-513 = Could not navigate
option.viomi.vacuum.v8.err_state-514 = Vacuum stuck
option.viomi.vacuum.v8.err_state-515 = Charging erro
option.viomi.vacuum.v8.err_state-516 = Mop temperature error
option.viomi.vacuum.v8.err_state-521 = Water tank is not installed
option.viomi.vacuum.v8.err_state-522 = Mop is not installed
option.viomi.vacuum.v8.err_state-525 = Insufficient water in water tank
option.viomi.vacuum.v8.err_state-527 = Remove mop
option.viomi.vacuum.v8.err_state-528 = Dust bin missing
option.viomi.vacuum.v8.err_state-529 = Mop and water tank missing
option.viomi.vacuum.v8.err_state-530 = Mop and water tank missin
option.viomi.vacuum.v8.err_state-531 = Water tank is not installed
option.viomi.vacuum.v8.is_mop-0 = Vacuum
option.viomi.vacuum.v8.is_mop-1 = Vacuum And Mop
option.viomi.vacuum.v8.is_mop-2 = Mop
option.viomi.vacuum.v8.is_mop-3 = CleanZone
option.viomi.vacuum.v8.is_mop-4 = CleanSpot
option.viomi.vacuum.v8.mode-0 = Everywhere
option.viomi.vacuum.v8.mode-1 = Edges
option.viomi.vacuum.v8.mode-2 = Surface
option.viomi.vacuum.v8.mode-3 = Fixed Location
option.viomi.vacuum.v8.mop_route-0 = S-Pattern
option.viomi.vacuum.v8.mop_route-1 = Y-Pattern
option.viomi.vacuum.v8.state-0 = Idle Undocked
option.viomi.vacuum.v8.state-1 = Idle
option.viomi.vacuum.v8.state-2 = Paused
option.viomi.vacuum.v8.state-3 = Sweeping
option.viomi.vacuum.v8.state-4 = Go Charging
option.viomi.vacuum.v8.state-5 = Charging
option.viomi.vacuum.v8.state-6 = Sweeping and Mopping
option.viomi.vacuum.v8.state-7 = Mopping
option.viomi.vacuum.v8.suction_grade-0 = Silent
option.viomi.vacuum.v8.suction_grade-1 = Basic
option.viomi.vacuum.v8.suction_grade-2 = Medium
option.viomi.vacuum.v8.suction_grade-3 = Strong
option.viomi.vacuum.v8.vacuumaction-0 = Stop
option.viomi.vacuum.v8.vacuumaction-1 = Start
option.viomi.vacuum.v8.vacuumaction-2 = Pause
option.viomi.vacuum.v8.vacuumaction-3 = Dock
option.viomi.vacuum.v8.water_grade-11 = Low
option.viomi.vacuum.v8.water_grade-12 = Medium
option.viomi.vacuum.v8.water_grade-13 = High
option.xiaomi.aircondition.ma1-miot.fan-level-0 = Auto
option.xiaomi.aircondition.ma1-miot.fan-level-1 = Level1
option.xiaomi.aircondition.ma1-miot.fan-level-2 = Level2
Expand Down
Loading

0 comments on commit aecdfda

Please sign in to comment.