Это видео недоступно.
Сожалеем об этом.
Easily retrieve Xiaomi and Roborock vacuum token & add to Home Assistant
HTML-код
- Опубликовано: 3 авг 2024
- With great work from community, adding Roborock or Xiaomi robot vacuums to Home Assistant is easy and fast. And this includes retrieving tokens for robot vacuums - without a need for Xiaomi or any other gateway.
See where robot vacuums are on the map, send them to zones, move to new location and much more can now be done from within Home Assistant
You need to have Xiaomi Mi Home app because this currently is not working with Roborock app - Android and iOS version will work.
Retrieveing token:
Piotr Machowski Xiaomi-cloud-tokens-extractor
⏵ github.com/PiotrMachowski/Xia...
Maxmudjon
⏵ github.com/Maxmudjon/Get_MiHo...
Integration if you have Mi Home styj02ym model:
⏵ github.com/nqkdev/home-assist...
Add to lovelace Simple Vacuum card:
⏵ github.com/benct/lovelace-xia...
Real time robot maps:
⏵ github.com/PiotrMachowski/Hom...
⏵ github.com/PiotrMachowski/lov...
Retrieving room information
⏵ github.com/rytilahti/python-miio
miiocli vacuum --ip IP_FROM_ROBOT --token TOKEN_FROM_ROBOT get_room_mapping
00:00 Intro
00:24 Thank you to all channel members
00:47 What we will do today
02:11 What if you don't have user name in Mi Home app
02:55 Retrieving token - Piotr's app
04:43 Alternative token retrieval - Max's app
06:13 Adding Xiaomi / Roborock to Home Assistant
08:39 Adding lovelace cars - Simple Vacuum
10:09 Xiaomi Cloud robot vacuum map
13:57 Multifloor support in maps
15:12 Improved Robot vacuum map with control
19:55 Unsupported robots?
20:21 Final thoughts
Please, give me a thumb up if you liked this video, subscribe if you still haven't and I'll see you next time!
Have fun!
BeardedTinker
P.S. If you would like to support me and this channel, you can JOIN and become member!
ruclips.net/user/BeardedTinker...
Twitter: @BeardedTinker
Discord: / discord
#howto #HomeAssistant #roborock #xiaomi #token
Panie Piotrze serdeczne dzięki.
He did a great job!!
Excellent video. Had my roborock up and running in home assistant without a hitch following it. I just did the whole copying of the 4 .js files differently; using Visual Studio Code I opened a terminal, cd'd to the correct folder and used the wget commands from the github page. Next step: aligning the zones to my home-layout ;-).
Nice!!! As I said, I was lazy :) On my main setup I did everything from console and it was much faster of course :)
Have fun with Zones - this is on my ToDo list!!!
Bravo, odličan video. Kao poručen video, juče stigao roboorock :D
:) Hvala! Nadam se da će biti od pomoći!!
WOW! THANK YOU FOR YOUR TIME! VERY COMPLETE VIDEO!
Glad you enjoyed it!
Great Video, thank you! Had troubles to integrate my Roborock S7, because i made a second wifi for ito devices so the connection failed. After many tries I managed it now with your help!
Glad you got it working! How are you satisfied with S7?
@@BeardedTinker I'm very satisfied with it, the paths are really smart and the result is quite good. Battery Time is enough for 120 m2.
I've been holding off on integrating this into home assistance because I did not think it would work with multi-floor mapping. Looks like it will. Thanks for this video, I shall give it a go.
Currently you can't select floor map from within this card. But it should display map of the current floor when it finishes positioning.
@@BeardedTinker Yeah that's awesome for me, didn't release the multi-floor would work at all. That is good enough for me at this stage. Be awesome of floor selection was added at some stage though.
Waiting for that myself. From what I've read from author, he's working on it but it requires him to redo whole component from scratch.
@@BeardedTinker yikes 😳. Big job.
@@BeardedTinker Right now I'm struggling with logging into the mi-home app. Won't accept my password. When I try to set up a recovery pw (or even phone number) it asked me to enter a code, but it won't activate the keyboard so I can enter the damn thing.
Thank you! Will test it soon!)
It should work really great! Have fun with it!
Thank You!!! Big HELP!!!!
So you finally went for the S5Max rather than the more expensive models. Hope you're as happy with it as I am. I didn't integrate my roborock so far as I'm using the Roborock app (I wasn't sure whether the Xiaomi app supported all the features that the roborock has).
Yes, I caved in and promotion they had was plus😉
In terms of Roborock app - yes, you need Xiaomi, but that was also not an issue as from what I've read functionality is the same. Before Roborock app even had less functionality for some robots.
thank you - very useful!
Thank you Phil!
Odličan video 👍
Thank you - hvala puno Mario!!!
Great video. Do you have control of mopping using the lovelace cards?
In terms of off and/or amount of water - no. From what I gather it's related to main integration and for some strange reason, it's missing there. Strange to have indication if mop is attached or not, but no ability to control it. My guess is that when they add this to integration, you will be able to select no-mop zones in cards too.
Another great video. One more plus for selecting Roborock as my first robo vacuum cleaner. Are you satisfied with S5?
Thank you Alen!!! I'm extremely happy with it - was considering S5 Max or S6 MaxV but with sale available in on line shop for S5 Max it was a no-brainer to get S5 max - the price difference was so big that I could get almost 2x S5 max for price of 1 S6 MaxV.
Wife is very happy,, it works really great - so far didn't have issues with positioning when moving it to other floors or locking in room. It has been working almost every day last 2-3 weeks and haven't noticed any issues or problems.
@@BeardedTinker last question :D Where did you buy it?
Here - www.centar-tehnike.hr/xiaomi-roborock-s5-max-s5e02-00-robotski-usisavac-503497-crni-proizvod-14182/ price drops sometimes to less then 2.900
Thanks!
You're welcome and thanks for the comment!
Hi Thank you for that great video!
I have a quick question.
My roborock s5 is set to turbo mode, and when i give him coordinates to clean,
He first turn himself on on turbo mode - making a lot of noise, and then driving to the requested spot to clean it.
I would like it to set it's fan to "quite", drive to the requested area, switch to turbo and then clean.
That way if he passes through the living room for example while i'm watching TV, he doesn't annoys me.
What i did, is i added a command to the script which first send the vacuum to a near spot (so he drives there quietly) and then start to clean the requested area.
However in reality, once he get to the requested spot - nothing happens he ignores all the rest of the commands.
Any thoughts?
Well, that's excellent question. Just tried today and it didn't work. Neve played with it as I mostly use integration to see status or current cleaning state.
But for me even sending it to specific spot failed today, so have to solve that first 😂
@@BeardedTinker This is my script for sending it to a specific location:
alias: Vacuum (Maintenance) - Trash Can
sequence:
- service: vacuum.send_command
target:
entity_id: vacuum.alfred
data:
command: app_goto_target
params:
- 28260
- 36574
mode: single
It works great.
But again, i can't seem to concatenate commands.
great video: wanted to ask if there is a way to add ore than one Robot vacuum ?
With custom component you should be able to add multiple vacuums, just change name of each one in HA.
@@BeardedTinker ok ill give that a try
Can the S7 be in both the RoboRock and Xiaomi app ? Or can it only be it one of them ? I like the Roborock app, and I would be sad if I had to remove it from there.
Hi Anders. Hmm - you will be sad. Unfortunately, as far as I know, it's still not possible for Roborock vacuums to be in two apps at the same time. Each app created unique token, and for this to work it needs to be token that can be retrieved from Xiaomi servers.
Great video, thank you. My Viomi Vacuum V6 fails to connect, when entering the IP and API token in the Xiaomi Miio integration, it says failed to connect. Great video though.
Thanks for the comment - really much appreciated!
Couldn't find this vacuum on the list of supported devices - didn't look if the library behind the component supports it though.
Thanks for the video, dumb question, where do you get the Mi Home Login? Tried the Roborock login but it didn't work? Thanks.
You need to have account created with Mi Home App - both iOS and Android versions will do.
This doesn't work with Roborock app. It uses different servers (and token).
@@BeardedTinker - Ah ok. Well I have a S7 so maybe it won't work then anyway?
@@BradGarlandit should work - S7 is supported in this component and of course Mi Home add too (AFAIK).
There was issue in Home Assistant, as it wasn't using latest library for Mi/Roborock vacuums, but that was fixed some time ago.
Hi, BeardedThinker can you explain how to find the coordinates and how to configure the zones in the Lovelace Xiaomi Vacuum Map card? The info on GitHub is not clear, and I could not find any additional documentation that will explain the process. Thanks in advance :D
Still haven't done it myself because it doesn't support multi-floor setup (to have zones mapped to floors).
From what I've gathered, you need to enable debug in this integration to be able to see current coordinates. Then move robot to specific point on the map and press start. It should move there and give you current coordinates when stopped. But - haven't tried it.
Other option is to use that suggested app (haven't installed it) and then probably it will give you coordinates when you move robot to specific point.
When I add the entity to Lovelace, it provides the status of the vacuum, but it does not give me all of the other information under "Fan speed". Do you have any idea why?
Did you try and see in developer tools it fan options are available for it? Not sure other than that they are not properly loaded what could be the issue.
the best video
Thank you Roberto!!!! 😃
@@BeardedTinker How can I extract the coordinates?
For specific zone? Did you try as suggested here? github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card#hints
I never tried becaus didn't need it so far.
thanks for the video. I have a rebranded viomi V2 (named Minihelpers Hydra S7). Do you think it would be possible for me to extract the token? I could only connect the robot via the minihelpers app which is not very robust.
Hi! For this to work, you need to add this Vacuum via Xiaomi Mi Home App - you can try playing with country/region setting, but this is needed in order to use this.
For me, most devices did work with EU servers, but for some devices I did have to use China Mainland as region to add them.
Hi yes I couldnt get it to connect to the mi home app. Even manually.
Thanks for your job. Unfortunately for me, map extractor doesn't work with STYJ02YM :(
Thank you for your comment! Yes, unfortunately, this model is using completely different map then all others use. On GitHub there were some attempts to integrate it in Piotrs Map Cloud extractor, but so far no luck.
@@BeardedTinker It works now ;)
@@piotrmachowski3391 that's great!!!
When I click add integration on "Xiaomi Miio", a window pops up and asks "Select which device you want to connect" and there is only one option for connect to xiaomi gateway, which I do not have. Any advice?
There are two options Xiaomi Miio and Xiaomi Gateway. Just tried on my setup and selecting Miio allowed me to enter IP address of any Xiaomi device.
You can try restarting HA or check log if there is any error there with integration.
@@BeardedTinker Hi, I have exact same issue - I don't see two options for "Xiaomi Miio". Only a text "Select to which device you want to connect." but with only one option visible: "Connect to a Xiaomi Gateway" (no other checkbox).
My log file shows:
2021-06-24 19:29:47 WARNING (SyncWorker_3) [miio.gateway] Unknown subdevice type SubDeviceInfo(sid='u', type_id='n', unknown='k', unknown2='n', fw_ver='o') discovered, of Xiaomi gateway with ip: 192.168.1.65
2021-06-24 19:29:47 INFO (SyncWorker_3) [miio.gateway] Gateway device type 'Unknown' does not have device specific methods defined, only basic default methods will be available
2021-06-24 19:29:47 INFO (SyncWorker_3) [miio.gateway] Discovered subdevice type 'Unknown', has no device specific properties defined, this device has not been fully implemented yet (model: unknown, name: unknown (u)).
@@paweldmochowski4124 you need to put your creds and the region of the server and tick configure mannually .After that it will pop the section that @BeardedTinker mentions here
And what if I am using apple log in/registration as an alternative in xiaomi home. So in this case I don’t have even a password to be able to extract the tokens I would want to. May I delete my whole account and start all over again with a simple email registration?
You should be able to do that. I've never tried. I had phone number account, so used that.
Token Extractor worked great. Using Xiaomi Miio integration looks different from Video, now defaults to "Cloud Login" or option to enable manual. (Extractor built in now?) Trying cloud login it's able to detect I have an S7 (Roborock) but HA logs shows "[homeassistant.config_entries] Config entry 'Roborock S7' for xiaomi_miio integration not ready yet; Retrying in background" Nothing else reported. Deleted that and installed again using Manual method. Provided the IP address and token reported from extractor tool but says "Failed to Connect". I can ping the vacuum IP address from HA. Any suggestion?
That's good question. I've seen that internal component has been updated in 2021.11 (or was it.10) to now handle token extraction.
But one other thing I've also noticed in last 30-45 days, that in log file I've seen Xiaomi request for 2 factor authentication. This error is not visible in front end. Not sure if this and your problem are related.
Retrying in background isn't necessarily bad thing, maybe there is timeout with server or something similar. You could try that route once again and restart HA.
@@BeardedTinker - So found my issue, besides a mDNS reflector being needed as S7 is on a different subnet, I needed a 1:1 NAT masquerade for Home Assistant to the IOT VLAN (uses a UDP packet which will only respond when the source address is on the same subnet as the Roborock S7. So when the Xiaomi Mi integration in HA attempts to send a packet to the Roborock S7, the source address needs to be changed (masquerade) to look like it’s coming from the gateway of the subnet the Roborock S7 is on.) Once I did that the Cloud Login worked and no Token Extraction was required.
I’m unable to find the model in the list. Mine is a Mi Robot Vacuum Mop P and in the token extractor it says viomi vacuum v10. None of which am able to find in the list
You could try selecting v8 model - not sure if it will work but I've seen some had success with it.
@@BeardedTinker Thanks for replying. I was unable to see any viomi vacuum displayed in that list. I could only see roborock vacuum's. Not sure if I'm doing something wrong. I added the integration for styj02ym also and tried. Then I'm getting an error unable to load token when i check configuration.
I guess it started to take it in when I finally removed !secret. I dont know why and I dont know if it's safe to do so. Still configuring the rest of the item
Not sure what could be the issue with secrets, but glad you got it working at the end.
@@BeardedTinker thank you for the support 😊
You should check out Valetudo!
Valetudo looks great but for me also very limiting. While in warranty (2 years) I have no need to root it.
And reason why I would never us it and also never recommend it is unfortunately lack of multi-floor support. Answer author gave is very clear on this (why no multi-floor). But suggestion to just buy more vacuums is ...
@@BeardedTinker i understand, i only have a single floor (appartment) and the reason i went for it is i didn't want any unnecessary cloud interaction (especially with China).
@@justinfrom1986 for that it should be great! BTW - US cloud/China cloud are same thing, just first one has been doing it for longer.😂
@@BeardedTinker haha yes, thats why i run everything locally :)
Neither of the two token extractors work anymore, are there any alternatives?
There are few that should work listed in Home Assistant site. Have you tried any of them? www.home-assistant.io/integrations/xiaomi_miio/#xiaomi-cloud-tokens-extractor
Hello, I have my Roborock S5 setup in HA with Lovelace Xiaomi Vacuum Map card all setup
I now have a S5 Max, I have added my S5 Max to HA via the integration but I cannot find out a way to have 2 separate maps (Lovelace Xiaomi Vacuum Map card)
What do I need to do so I can have a S5 and S5 Max Lovelace Xiaomi Vacuum Map card
THANK YOU
It should be simple, BUIT I haven't tried it myself.
You need both tokens. Duplicate for each camera entity (this is only part of the code so you can see the difference):
camera:
- platform: xiaomi_cloud_map_extractor
name: S5
host: XXX.XXX.X.XXX
token: S5-token
...
- platform: xiaomi_cloud_map_extractor
name: S5Max
host: XXX.XXX.X.XXX
token: S5Max-token
...
If you missed it everything is the same, adapt to each of vacuums and add 'name:' to give unique name for each map.
Just please drop me a line if it works.
@@BeardedTinker Thank you that worked!
Hello. I have just tried and got stuck after creating the integration with my token and can see my Roborock S6, but it shows "try setup again" and check protocol. Protocol says: "Config entry 'Robby' for xiaomi_miio integration not ready yet; Retrying in background". I tried several times but always got the same result. Do you have any idea what I can do now?
Roborock S6 should work no matter what. Do you have alternative firmware on it or original? And what app do you use Roborock or Xiaomi? Those are the only two things that pop on my mind.
@@BeardedTinker I have the original firmware and I only use the Roborock app on iphone. Should I use the Xiaomi app instead?
Yes, Xiaomi one is meede for this integration to work. Token is pulled from that account.
@@BeardedTinker OK, I have installed Xiaomi Home app and signed on. It shows my Roborock S6, but says that it is not online. I try to activate it now.
It looks like I have to enter a new password. In order to do that the app wants a 4 digit PIN, that I don't have. Any idea where this PIN comes from?
Oh, my bad. I had to define this PIN here 😀
Sorry, is it not clear for me how to extract my zones and edit them to Xiaomi Vacuum Map card. Thank you
Try looking at this post: github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/318
I don't use zones in my setup so never played with it that much. Last time I tried it was with much older version.
Is it local or cloud integration?
This one is using cloud. That's why you need API token. Maps are all stored in cloud, some data is retrieved locally, but you need to have vacuum added to cloud Mi account.
Hello, is it possible to add two robots for the same house ?
If you use HACS Xiaomi Cloud Map integration, you can add multiple robots. For each you just need to add line with name: and that should be it.
Nice video, but it looks like its been some updates on this, maybe do a new one?
When i try to add the card in lovleace UI i just get error message saying custom card doesnt exist. how do i solve this?
Did you first install custom card?
@@BeardedTinker i dont think so. I think i’ve solved it though. Great video!
Great, what card are you using, one with just map or the other that allows you to control vacuum?
@@BeardedTinker the one that allows me to control it
is working for Xiaomi 1C too?
In the list of supported devices there is 1C - but it updates only when app is opened or something. It's using Dreame map format.
github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#supported-devices
Anyway for local control?
With stock firmware no. But check Valetudo firmware.
@@BeardedTinker Sweet, managed to get the Valetudo firmware on but there doesn't appear to be any tutorial on RUclips on how to relink it up to home assistant sadly.
@@KrispKiwi you need to follow instructions in Valetudo manual for that. I think you need MQTT for that one - not using it myself, so can't help you unfortunately.
valetudo.cloud/pages/integrations/home-assistant-integration.html
it's easier with the new version. we only require to login.
Yes, that's true...
@@BeardedTinker
I have the early Roborock S5. There are 9 sensors (brush/filter…etc) not supported on HA.
how do you edit the zones. to me they’re a bunch of numbers. it’s so confusing.
@@XellosMetallium zones I edit only in app (if you are thinking on sizing them). In HA I just pull those values and nothing else.
As for the brush/filer,... sensors it can also be a bug, but maybe depends on the model. I haven't seen issue on them, but you can check at GitHub repository if this has been reported.
in the video at minute 15,42 Min, I can't find the link. if it's easy for you put it here because it doesn't exist
It's now available through HACS - here is the link github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card
works not with my S7. It is identified as a A15 and doesn't work
Roborock S7 is A15 - that's abbreviated model name :)
In terms of support - new version supports S7:
github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor
@@BeardedTinker I found this.... github.com/home-assistant/core/issues/49022
This somehow ended in SPAM - is it working now for you? I see that it was related to HA and version of library it was using.
@@BeardedTinker Since Core update it works 💪
I can't write anything on password after username. I dont know why, can you help me with it, please?
Never seen that error before. My best guess is to try and reload page with CTRL+F5 (on PC).
I have the same problem right now. It doesn’t let me type anything at password. CTRL F5 doesn’t help.
Just enter your password and hit enter.. even if it shows that it is not typing 👍🏼
@@DieTwanJust enter your password and hit enter.. even if it shows that it is not typing 👍🏼
15:54 not json but java
Nice catch!!! Thanks!
Can't type passw
Loves to hear his own voice
It's his video, what voice should be heard? Get a life, sad loser.