-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Create switch.xiaomi_vacuum #2771
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
Conversation
First revision
The `xiaomi_vacuum`switch platforms allows you to control the state of your [Xiaomi Mi Robot Vacuum](http://www.mi.com/roomrobot/). | ||
Current supported features are start and stop (go to dock). | ||
|
||
{% linkable_title Installation %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation should be unnecessary as homeassistant downloads the dependencies.
INFO:mirobo.vacuum: IP 192.168.8.1: Xiaomi Mi Robot Vacuum - token: b'ffffffffffffffffffffffffffffffff' | ||
``` | ||
|
||
If the value is as shown above, the vacuum has already been connected and it needs a reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value is full of ffs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, at least is what I experienced when running the commands. Is it not clear enough, maybe?
``` | ||
|
||
Configuration variables: | ||
- **name** (*Required*): The name of your robot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name is not required at the moment, should it be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't sure about the required ones, will change it to optional then!
@@ -0,0 +1,47 @@ | |||
The `xiaomi_vacuum`switch platforms allows you to control the state of your [Xiaomi Mi Robot Vacuum](http://www.mi.com/roomrobot/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Platform not platforms.
Tweaks in the copy
This token is only attainable before the device has been connected over the app to your local wifi. | ||
|
||
In order to fetch the token, reset the robot, connect to its the network its announcing (rockrobo-XXXX) | ||
and run the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this part is too vague (for users who do not know how to access the virtualenv/environment of homeassistant), but can't directly think of how to write it out in a nicer manner.
INFO:mirobo.vacuum: IP 192.168.8.1: Xiaomi Mi Robot Vacuum - token: b'ffffffffffffffffffffffffffffffff' | ||
``` | ||
|
||
If the value is as shown above, full of ffs, the vacuum has already been connected and it needs a reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"full of ffs" sounds weird. Maybe it'd be better to rewrite it in a more user-friendly manner?
edit: other than these two things, I think it's fine from my side.
One more note, all documentation needs an information table, see https://github.com/home-assistant/home-assistant.github.io/blob/current/source/_components/neato.markdown |
@rytilahti oh great, thanks for letting me know! will add it in a bit! |
@fabaff would you mind pointing me on the right direction to know where I should upload and what sizes and formats should the component image be like? Sorry I need to ask for this but I've tried searching for example "telldus_tellstick.png" which is one of the current Switch components in the whole repository and I couldn't find the image, so I'm a bit lost on where I should upload it |
Images for brands are located in |
@fabaff thanks! I tried to upload a new image but it says I have no permissions. I'm attaching it here in case you can do it? |
Tweaks on info table
File name is wrong for this documentation. |
@Landrash thanks for letting me know! I checked other switches and I followed same naming conventions. Would you mind telling me what's wrong in the file name? |
Changed filename to .markdown
@jcastro Filename of the documentation needed to end with .markdown. Changed it for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be some information missing but looks good in general.
and run the following command: | ||
|
||
``` | ||
mirobo discover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be some part missing on how the end users obtains this software.
{% linkable_title Getting started %} | ||
|
||
To be able to communicate with the vacuum one needs to have its IP address as well as an encryption token. | ||
This token is only attainable before the device has been connected over the app to your local wifi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must retrieve the token before using the mobile app to connect the device to your wireless network.
``` | ||
|
||
In order to fetch the token, reset the robot, connect to its the network its announcing (rockrobo-XXXX) | ||
and run the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to fetch the token, reset the vacuum following the instructions in the manual. Then,
connect to its built-in wireless network (**rockrobo-XXXX**) with a computer that has the
[python-mirobo](https://github.com/rytilahti/python-mirobo) package installed.
Run the following command:
``` | ||
|
||
If the value is exactly as shown above, meaning a lot of f letters, then the vacuum has already been connected and it needs a reset. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token is the value between the single quotes. If the value is exactly as shown above
(`ffffffffffffffffffffffffffffffff`), the vacuum was previously configured and it needs to be
reset to obtain a valid token.
and run the following command: | ||
|
||
```bash | ||
mirobo discover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No information is provided on what needs to be installed for this command to be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to fetch the token, reset the vacuum following the instructions in the manual. Then, connect to its built-in wireless network (**rockrobo-XXXX**) with a computer that has the [python-mirobo](https://github.com/rytilahti/python-mirobo) package installed. Run the following command:
Please address the comments by Landrash. |
{% linkable_title Getting started %} | ||
|
||
To be able to communicate with the vacuum one needs to have its IP address as well as an encryption token. | ||
This token is only attainable before the device has been connected over the app to your local wifi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence would be clearer as:
You must retrieve the token from the device before using the mobile app to connect it to your wireless network.
and run the following command: | ||
|
||
```bash | ||
mirobo discover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to fetch the token, reset the vacuum following the instructions in the manual. Then, connect to its built-in wireless network (**rockrobo-XXXX**) with a computer that has the [python-mirobo](https://github.com/rytilahti/python-mirobo) package installed. Run the following command:
INFO:mirobo.vacuum: IP 192.168.8.1: Xiaomi Mi Robot Vacuum - token: b'ffffffffffffffffffffffffffffffff' | ||
``` | ||
|
||
If the value is exactly as shown above, meaning a lot of f letters, then the vacuum has already been connected and it needs a reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token is the value between the single quotes. If the value is exactly as shown above
(`ffffffffffffffffffffffffffffffff`), the vacuum was previously configured and it needs to be
reset to obtain a valid token.
@jcastro Could you also take this PR in the documentation? Here are the services and fields:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes
Update, collaboration from other users
Added WIP token instructions based on some reading
@bramkragten sure, will add it! |
@bramkragten umm I'm a bit lost on how to structure it, mostly because I'm not too much into entities, attributes, services, etc... do you think a table like the ones here would be ok? https://home-assistant.io/components/media_player.plex/ |
@jcastro yeah, that would work fine! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and will be merged since parent PR has been merged.
@jcastro Want me to merge this as as and you'll create a new one for the services? |
@Landrash sure, sounds good! |
First revision
Description:
Pull request in home-assistant (if applicable): home-assistant/home-assistant#