Hi,
Recently I have created a custom card that enables you to control Xiaomi Vacuums by marking points/drawing zones on a map (just like in Mi Home). Additionally you can define zones in configuration and select which of them you wan to run.
Hi,
Recently I have created a custom card that enables you to control Xiaomi Vacuums by marking points/drawing zones on a map (just like in Mi Home). Additionally you can define zones in configuration and select which of them you wan to run.
Wow, nice work!
I have not yet tried this (on gen1 vacuum at the moment, so no persistant maps, but with a gen2 on the way), but Iâm interested to know if itâs possible (now or in the future) to use a live map as the background?
This in combination with Xiaomi Vacuum (rooted) live map with floor plan would be amazing.
Unfortunately each time map changes you have to recalibrate map image, so lack of maps persistency in gen1 is a real issue.
I have seen live map feature, but I havenât rooted my vacuum yet, it sits on my TODO list
I guess it depends on how often your card refresh the background image, but as long as the map is dumped to an image file, could it be used as background and refresh on change? Maybe a setting in the card config?
This would, as you said, not work with gen1 as the map is not persistant, but a gen2 could do the trick.
Oh, and you should absolutely root your vacuum, having the live map in Home Assistant is very convenient
I am sure I will somehow figure it out when my vacuum will be rooted. Right now I have a lot of other things to do
issue is that the map orientation is not always the same.
Most of the time my vacuum will start in the same direction, but every so often it does not and the map is rotated.
That would make it difficult to use as background for something to be superimposed on topâŚ
I like the predefined zones.
Oh, I thought the persiatant map-feature of gen2 (S50) helped with this. I havenât tested this, so if the orientation varies I agree that it wonât work.
On gen2 (at least in my case) everything is working perfectly, map has never rotated by itself
You have to follow instructions from readme:
In my case I have first sent vacuum to both positions to have them marked on the map, then took screenshots and created map from them.
Thank you! But I lost the way. Are the reference points have to be defined on the created map in pixels if I understand correctly. But how can I do that? Wich software used for it? Where from are mesured the points?
Exactly. You can do it using for example Paint or Gimp. Most of image editors display coordinates of mouse in pixels. They are measured from upper left corner.
This is awesome [3_14])!
Iâm completely new to HA. What should be the correct name for âentity:â? My vacuum is named âroborock.vacuum.s5â in configuration.yaml, but if I use âentity: xiaomi_roborock.vacuum.s5â I get error
Failed to call service vacuum/xiaomi_clean_zone. not a valid value for dictionary value @ data[âentity_idâ]
Thanks in advance.
Are you sure this is full id of your vacuum entity? You can check it in tab <HA_URL>/dev-state. It probably should be vacuum.roborock_vacuum_s5
Ok, Iâm not sure what was the problem, the entity was corrrect, I checked on States as you directed. Then I restarted HA one more time just to be sure and now it works!
Thanks your for help and the custom Card!
It would be nice to have an Stop/Return button next to Start.
I am happy that it is working
Personally I use this card with much nicer looking picture-elements card, that has features you are talking about:
Thank you so much. this card is fantastic. I recommend cutting the image with 1: 1 square pixel settings. It is very precise.
Great job A few things:
Had to fine-tune the Base/Reference coordinates manually as using the Base/Ref coords from the image had the X axis way off. This was simple enough with trial-and-error, in just a few minutes everything was aligned perfectly. Not sure if this was because I did something wrong, is the image supposed to be a specific resolution? The X/Ys had to be adjusted by 10-30 each. Since it was an easy fix, it isnât too important.
Suggestions:
As far as I know/tested Roborock S5 can only do up to 5 zones at a time. The App doesnât let you add more, and if you do (via commands) the vacuum will go crazy when it starts cleaning zone 6: It goes back to the start and just drives around like crazy. I suggest limiting Zone/Preset selection to max 5 zones (or creating something that pauses the vacuum and starts the next 5 zones, if itâs done but not going for a recharge).
It seems like the preset zone order is random (at least not the order it was clicked in)? Being able to control the order is great (the first zone in the list is cleaned first). It would be great if the cleaning order was based on which preset zone you click first, second, etcâŚ