-
-
Notifications
You must be signed in to change notification settings - Fork 63
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 support for the Xiaomi Mija Robot Vacuum 1T (dreame.vacuum.p2041) #51
Conversation
Add a room_clean action
Add a room_clean action
Thanks! From what I can see everything looks clean and good! Will merge it later! |
One more question how do you know that the room clean has two parameters? Since in the spec there is only one parameter described, only 10... |
need2buy posted a comment here with some code attached. This included the function room_id_cleanup below:
I have no idea myself how the guys over at python_miot figured out the command format. |
Just as a small update, in the upcoming update i removed the ROOM_CLEAN action and instead i have added the room clean parameters to the START_CLEAN action which has the same id. I think there is no need to split it in two actions. You will need to adjust your config then when the update is out! |
Thanks for cleaning up the specification for the 1T! I see I missed a few differences.
I don’t mind keeping a fork of this with the action added if it’s just a hack for the one device model. It does seem like room cleaning is a desirable feature and it would be nice to see it added in a more general implementation, but it’s always going to be a bit of hassle for the user to figure out the room ids etc. |
Ahhh, that is my mistake. I do not know how this slipped through. Of course I wanted to add the 1 parameter there but somehow I forgot... Will correct that in the next update! So the action will be START_CLEAN but with the two parameters 1 and 10. |
I just got this robot. The miot command set is almost identical to dreame.vacuum.p2008. Everything seems to work.
I also wanted room cleaning functionality. I have added a room_clean action for the vacuum which calls the cleaning command with the appropriate parameters to initiate targeted cleaning. The custom action definition for room cleaning in the homebridge config has to be something like:
{
"action": "room_clean",
"name": "Clean Kitchen",
"params": [
18,
"{"selects": [[4,1,1,2,1]]}"
]
}
The first parameter of 18 is passed to piid 1 and indicates room cleaning (19 would be area cleaning).
The value in the double square brackets, passed to piid 10, is then:
[[room_id, number of cleaning repetitions, vacuum power, mopping water flow, index]]
I believe multiple rooms to be cleaned can also be selected.
I got this command format from the discussion here: rytilahti/python-miio#870 (comment)
In my case the room IDs were simply 1,2,3,4 and I figured out which room they correspond to manually.