Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running vacuum.start while charging on dock starts a new clean rather than resuming current clean #608

Open
cryptk opened this issue Feb 28, 2024 · 4 comments

Comments

@cryptk
Copy link

cryptk commented Feb 28, 2024

Version of the custom_component

1.0.13

What vacuum are you using?

Roborock S8 Pro Ultra

Describe the bug

If a clean is in progress, but the vacuum battery has run low and it has returned to the dock to charge, issuing a vacuum.start service call does not resume the in-progress clean, but rather starts a whole new clean.

This appears to be due to the checks at https://github.com/humbertogontijo/homeassistant-roborock/blob/main/custom_components/roborock/vacuum.py#L355-L366 and this robot does not have a state of Paused, Idle or Error while it is on the dock charging mid-clean but rather a state of Docked.

I still need to validate what the value of self._device_status.in_cleaning is during these mid-clean charging sessions, but it may be as simple as adding STATE_DOCKED to the check on at https://github.com/humbertogontijo/homeassistant-roborock/blob/main/custom_components/roborock/vacuum.py#L355 to resolve this if in_cleaning is 2 or 3. Give me a few to run the battery down again and I'll report back with further details. I do know that the integration knows that a clean is still in progress as the cleaning_progress sensor is still reporting a correct value between 0%-100%

Debug log

I will have to grab these once I am able to run the battery down again if they are needed.

@Lash-L
Copy link
Collaborator

Lash-L commented Mar 2, 2024

What is it looking like?

@cryptk
Copy link
Author

cryptk commented Mar 2, 2024

Every time I have run my vacuum, something broke at work while it was on the dock recharging 😞. I'll make a point to get the attributes from it this coming week.

@Lash-L
Copy link
Collaborator

Lash-L commented Mar 3, 2024

Tested on mine - seems the entire if check is kind of redundant tbh.

Just needs to check the in cleaning value, we can call start regardless of it's state. If it is currently running, it will ignore it.

@cryptk
Copy link
Author

cryptk commented Mar 4, 2024

I have attributes in a few scenarios. It does look like we might want to keep the if check for at least one edge case, when the vacuum is getting ready to wash the mop at the beginning of a clean, it's state is "returning" and inCleaning is 0, even though it's getting ready to go do a clean, so we probably shouldn't issue a start? Not sure what happens if we send a start while it's in that state since inCleaning is 0 ad not some non-zero state like it normally is during a clean.


Vacuum charging and not cleaning

likely important attributes:

state: docked
battery: 12
inCleaning: 0
chargeStatus: 1
stateName: charging
status: charging
Full attributes
fan_speed_list: off, quiet, balanced, turbo, max, custom, max_plus
mop_mode_list: standard, deep, deep_plus, fast, custom
mop_intensity_list: off, mild, moderate, intense, custom
battery_level: 12
battery_icon: mdi:battery-charging-20
fan_speed: max
msgVer: 2
msgSeq: 905
state: docked
battery: 12
cleanTime: 5879
cleanArea: 97167500
squareMeterCleanArea: 97.2
errorCode: 0
mapPresent: 1
inCleaning: 0
inReturning: 0
inFreshState: 1
labStatus: 1
waterBoxStatus: 1
backType: -1
washPhase: 0
washReady: 0
fanPower: 104
dndEnabled: 0
mapStatus: 3
isLocating: 0
lockStatus: 0
waterBoxMode: 202
waterBoxCarriageStatus: 1
mopForbiddenEnable: 1
cameraStatus: 387
isExploring: 0
adbumperStatus: 0, 0, 0
waterShortageStatus: 0
dockType: 7
dustCollectionStatus: 0
autoDustCollection: 1
avoidCount: 94
mopMode: 300
debugMode: 0
collisionAvoidStatus: 1
switchMapMode: 0
dockErrorStatus: 0
chargeStatus: 1
unsaveMapReason: 4
unsaveMapFlag: 0
washStatus: 256
dryStatus: 1
rdt: 10620
cleanPercent: 0
rss: 2
dss: 2729
commonStatus: 2
errorCodeName: none
stateName: charging
waterBoxModeName: moderate
fanPowerOptions: off, quiet, balanced, turbo, max, custom, max_plus
fanPowerName: max
mopModeName: standard
status: charging
mop_mode: standard
mop_intensity: moderate
error: null
icon: mdi:robot-vacuum
friendly_name: Peter Pan
supported_features: 16383

Vacuum heading towards dock to wash mop at beginning of cleaning

likely important attributes:

state: returning
battery: 22
inCleaning: 0
chargeStatus: 1
stateName: going_to_wash_the_mop
status: going_to_wash_the_mop
Full attributes
fan_speed_list: off, quiet, balanced, turbo, max, custom, max_plus
mop_mode_list: standard, deep, deep_plus, fast, custom
mop_intensity_list: off, mild, moderate, intense, custom
battery_level: 22
battery_icon: mdi:battery-20
fan_speed: max
msgVer: 2
msgSeq: 974
state: returning
battery: 22
cleanTime: 5879
cleanArea: 97167500
squareMeterCleanArea: 97.2
errorCode: 0
mapPresent: 1
inCleaning: 0
inReturning: 0
inFreshState: 1
labStatus: 1
waterBoxStatus: 1
backType: -1
washPhase: 0
washReady: 0
fanPower: 104
dndEnabled: 0
mapStatus: 3
isLocating: 0
lockStatus: 0
waterBoxMode: 202
waterBoxCarriageStatus: 1
mopForbiddenEnable: 1
cameraStatus: 387
isExploring: 0
adbumperStatus: 0, 0, 0
waterShortageStatus: 0
dockType: 7
dustCollectionStatus: 0
autoDustCollection: 1
avoidCount: 94
mopMode: 300
debugMode: 0
collisionAvoidStatus: 1
switchMapMode: 0
dockErrorStatus: 0
chargeStatus: 1
unsaveMapReason: 4
unsaveMapFlag: 0
washStatus: 256
dryStatus: 1
rdt: 8880
cleanPercent: 0
rss: 2
dss: 2729
commonStatus: 2
errorCodeName: none
stateName: going_to_wash_the_mop
waterBoxModeName: moderate
fanPowerOptions: off, quiet, balanced, turbo, max, custom, max_plus
fanPowerName: max
mopModeName: standard
status: going_to_wash_the_mop
mop_mode: standard
mop_intensity: moderate
error: null
icon: mdi:robot-vacuum
friendly_name: Peter Pan
supported_features: 16383

Vacuum on the way to the dock to charge mid-clean

likely important attributes:

state: returning
battery: 20
inCleaning: 3
chargeStatus: 1
stateName: returning_home
status: returning_home
Full attributes
fan_speed_list: off, quiet, balanced, turbo, max, custom, max_plus
mop_mode_list: standard, deep, deep_plus, fast, custom
mop_intensity_list: off, mild, moderate, intense, custom
battery_level: 20
battery_icon: mdi:battery-20
fan_speed: max
msgVer: 2
msgSeq: 1021
state: returning
battery: 20
cleanTime: 233
cleanArea: 6967500
squareMeterCleanArea: 7
errorCode: 0
mapPresent: 1
inCleaning: 3
inReturning: 0
inFreshState: 0
labStatus: 1
waterBoxStatus: 1
backType: -1
washPhase: 0
washReady: 0
fanPower: 104
dndEnabled: 0
mapStatus: 3
isLocating: 0
lockStatus: 0
waterBoxMode: 202
waterBoxCarriageStatus: 1
mopForbiddenEnable: 1
cameraStatus: 387
isExploring: 0
adbumperStatus: 0, 0, 0
waterShortageStatus: 0
dockType: 7
dustCollectionStatus: 0
autoDustCollection: 1
avoidCount: 0
mopMode: 300
debugMode: 0
collisionAvoidStatus: 1
switchMapMode: 0
dockErrorStatus: 0
chargeStatus: 1
unsaveMapReason: 0
unsaveMapFlag: 0
washStatus: 768
dryStatus: 0
rdt: 0
cleanPercent: 30
rss: 2
dss: 2729
commonStatus: 2
errorCodeName: none
stateName: returning_home
waterBoxModeName: moderate
fanPowerOptions: off, quiet, balanced, turbo, max, custom, max_plus
fanPowerName: max
mopModeName: standard
status: returning_home
mop_mode: standard
mop_intensity: moderate
error: null
icon: mdi:robot-vacuum
friendly_name: Peter Pan
supported_features: 16383

Vacuum charging mid-clean

likely important attributes:

state: docked
battery: 19
inCleaning: 3
chargeStatus: 1
stateName: charging
status: charging
Full attributes
fan_speed_list: off, quiet, balanced, turbo, max, custom, max_plus
mop_mode_list: standard, deep, deep_plus, fast, custom
mop_intensity_list: off, mild, moderate, intense, custom
battery_level: 19
battery_icon: mdi:battery-charging-20
fan_speed: max
msgVer: 2
msgSeq: 1036
state: docked
battery: 19
cleanTime: 255
cleanArea: 7075000
squareMeterCleanArea: 7.1
errorCode: 0
mapPresent: 1
inCleaning: 3
inReturning: 0
inFreshState: 0
labStatus: 1
waterBoxStatus: 1
backType: -1
washPhase: 0
washReady: 0
fanPower: 104
dndEnabled: 0
mapStatus: 3
isLocating: 0
lockStatus: 0
waterBoxMode: 202
waterBoxCarriageStatus: 1
mopForbiddenEnable: 1
cameraStatus: 387
isExploring: 0
adbumperStatus: 0, 0, 0
waterShortageStatus: 0
dockType: 7
dustCollectionStatus: 0
autoDustCollection: 1
avoidCount: 0
mopMode: 300
debugMode: 0
collisionAvoidStatus: 1
switchMapMode: 0
dockErrorStatus: 0
chargeStatus: 1
unsaveMapReason: 0
unsaveMapFlag: 0
washStatus: 768
dryStatus: 0
rdt: 0
cleanPercent: 32
rss: 2
dss: 2729
commonStatus: 2
errorCodeName: none
stateName: charging
waterBoxModeName: moderate
fanPowerOptions: off, quiet, balanced, turbo, max, custom, max_plus
fanPowerName: max
mopModeName: standard
status: charging
mop_mode: standard
mop_intensity: moderate
error: null
icon: mdi:robot-vacuum
friendly_name: Peter Pan
supported_features: 16383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants