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

Add additional sensors and settings to Roborock vacuums #1543

Closed
wants to merge 67 commits into from

Conversation

starkillerOG
Copy link
Contributor

@starkillerOG starkillerOG commented Sep 30, 2022

Add additional sensors and improve the already implemented sensors for the Roborock S7 MaxV.

Change the decorator ids to qualified name instead of simply name in order to prevent unique_id collisions in HomeAssistant for example with DNDStatus.start and CleaningDetails.start

Implement choices_attribute for setting decorator such that Enums can be evaluated at runtime by retrieving it from the device.

Split vacuum enums to a separte file to prevent circular imports

Controls added:

  • Mop routing (enum)
  • Mop scrub intensity (enum)
  • Mulit map (which floor is active, enum)
  • Auto dust collection (switch)
    Buttons added:
  • start dust collection
  • stop dust collection
    sensors added:
  • floor 0-4 clean start (when the last clean was per floor)
  • Last clean map name

Roborock_s7MaxV - 1
Roborock_s7MaxV - 2
Roborock_s7MaxV - 3

@crshray
Copy link

crshray commented Nov 5, 2022

This is great! Any idea if the clean & dirty water tank status is exposed?

@craigcabrey I did not see that in the status response, but I have a s7MaxV+ (auto-empty dock) not the Ultra with the Ultra dock, so I can't test the water tank status. Do you see the clean&dirty tank status in the miio home app?

I tested with my s7 MaxV ultra and it looks like clean&dirty tank status is exposed via the dock_error_status field in the get_status response, if clean water tank is empty, dock_error_status will have a value of 38, if dirty water tank is full, dock_error_status will have a value of 39, if both errors happen at the same time, dock_error_status will have a value of 38 (i.e. clean water tank error takes precedence over the dirty water tank error).

@craigcabrey
Copy link
Contributor

This is great! Any idea if the clean & dirty water tank status is exposed?

@craigcabrey I did not see that in the status response, but I have a s7MaxV+ (auto-empty dock) not the Ultra with the Ultra dock, so I can't test the water tank status. Do you see the clean&dirty tank status in the miio home app?

Missed this, sorry! Yea as noted by @crshray it is available in the app.

@starkillerOG
Copy link
Contributor Author

@crshray thanks for the info, I added a dock_error and dock_error_code sensor in the latest commit.
Unfortunately I could not find a list of "dock_error_status" codes, so I only added 0, 38 and 39 for now.

rytilahti pushed a commit that referenced this pull request Nov 9, 2022
Split out from #1543
Will be used for Multi Map Enum select.
@h3rbst
Copy link

h3rbst commented Nov 28, 2022

This looks really great! Do you know if it would be possible to start the additional Dryer Module as well? I am using the S7 Pro Ultra where the Dryer currently is not supported by the app. Would be nice if it is possible via Home Assistant.

@h3rbst Xioami Miio is based on the protocol used by the xiaomi miio app, so if it is not available in the xiaomi miio app, it will not be possible to implement in HomeAssistant. Starting a dust collection will be added as a button (but that is also possible in the xiaomi miio app).

So I found out, that the dryer setting is now available in the Xiaomi Home App. Is it possible to add this setting to Home Assistant? (see last point in attached picture)
Bildschirmfoto 2022-11-28 um 16 51 18

@starkillerOG
Copy link
Contributor Author

starkillerOG commented Nov 28, 2022

@h3rbst yes that is certainly possible, but I would need to have decoded packet captures to figure out the commands that you would like to have added to HomeAssistant (preferablly just capture as much as possible).
See the discussion here: home-assistant/core#69869

I only have the auto-empty doc, not the ultra-doc. So I cannot capture the washing related settings myself.

@starkillerOG
Copy link
Contributor Author

Now that the last piece of this PR has been split out here: #1614
This PR can be closed.

@h3rbst
Copy link

h3rbst commented Dec 9, 2022

@starkillerOG is it possible to activate this for the S7 Pro Ultra as well? The S7 Pro Ultra has the same Dock as the MaxV

@starkillerOG
Copy link
Contributor Author

@h3rbst These features are added for all models that support them.
Although it is still in dev and not released yet.
We first need a new python-miio release.

@h3rbst
Copy link

h3rbst commented Dec 9, 2022

@h3rbst These features are added for all models that support them. Although it is still in dev and not released yet. We first need a new python-miio release.

Ah okay, I see. I thought, since the PR is already merged, that it is part of the new December release.

@xsasx
Copy link

xsasx commented Jul 13, 2023

@starkillerOG Sorry for maybe my stupidness - as i understand you rigt - i should have with the normal miio integration in homeassistant the feature that you created with the MOP intensity etc ? Cause i have it not with my Roborock S7 or do i need to change any file under my Homeassistant server with your files (replace)

@starkillerOG
Copy link
Contributor Author

@xsasx No that needs a new version of Python-miio to be released.
I have been waiting on a new version for a long time...

Maybe @rytilahti could shed some light on when a new version would be expected.

@neforce
Copy link

neforce commented Aug 16, 2023

i'm experiencing sometimes trouble loading the map of the Xiaomi app. However, roborock app itself is working will. But when i use roborock app, i miss a lot of sensors which i'm using now. If i read this thread well, is it true that i can use roborock app on my phone, and use the roborock integration of Home Assistant after this commit in this issue has been merged?

@JR2012thman
Copy link

@xsasx No that needs a new version of Python-miio to be released. I have been waiting on a new version for a long time...

Maybe @rytilahti could shed some light on when a new version would be expected.

Is there any movement on this? I am happy to send commands as needed but this would be a great set of features for those who are less technical.

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

Successfully merging this pull request may close these issues.

10 participants