Home Assistant Community

Add Map to Xiaomi vacuum cleaner

#114

I have Hassio HA and the vacuum, however I can’t figure out how to get this working. Any advice is greatly appreciated so maybe both of us can get going with this…

As per @asphalter guide, do we need incrond? Can we use the following component for build_maps.py without incrond?


Not a Linux/Python guy so I am basically doing a trial and error methodology, and searching for the stuff I don’t know how to do like all the vacuum rooting thing.

We can assume you’re using a RedHat like system (CentOS, Fedora, RedHat, SuSe, …) as destination host.

  • Ensure that you’ve installed python-pillow package. On RedHat like systems you can issue the command yum install python-pillow
  • Ensure that you’ve installed incrond package. On RedHat like systems you can issue the command > yum install incron
  • Copy vacuum/etc/incron.d/vacuum_maps to /etc/incron.d/vacuum_maps.
  • Create the directories /home/homeassistant/.homeassistant/scripts , /home/homeassistant/.homeassistant/www , /home/homeassistant/.homeassistant/vacuum if not exist.
  • Make sure to fix the ownership of these directories to the user homeassistant .
  • Copy the script homeassistant/home/homeassistant/scripts/build_maps.py to /home/homeassistant/.homeassistant/scripts/build_maps.py.
  • Copy the script homeassistant/home/homeassistant/scripts/incrond_vacuum_maps.sh to /home/homeassistant/.homeassistant/scripts/incrond_vacuum_maps.sh.
  • Make sure to give to the file the right permissions with the command: chown 755 /home/homeassistant/.homeassistant/scripts/incrond_vacuum_maps.sh .
0 Likes

#115

Actually i will try with this i don’t know if i will be able to install that but…

0 Likes

#116

@gurbina93 and @SoulSlayer I’m running my MiRobot this on a hassio. For the live maps component I’m running with a Valetudo service running on the Mirobot.

I’ll post up steps on how I did it shortly.

2 Likes

#117

Wow that would be very nice a little tutorial! Thank you!

0 Likes

#118

Guys , I’d love to have maps in HASS also, did someone try to root xiaowa e20/e35 vacuum, which I have ?

0 Likes

#119

Instructions to install and configure Valetudo Live Map on a rooted MiRobot

Ok, once you’ve rooted the MiRobot the steps below will get you a Live Map into Home assistant using Valetudo.

Install and Start Valetudo on the MiRobot

  1. Open up the the Terminal run the below commands
  2. mkdir valetudo && cd valetudo This will create a folder on your Linux VM for you to download the needed packages
  3. wget https://raw.githubusercontent.com/Hypfer/Valetudo/master/deployment/valetudo.conf
  4. wget https://github.com/Hypfer/Valetudo/releases/download/0.0.7/valetudo use a newer version of Valetudo if one exists
  5. scp valetudo [email protected]:/usr/local/bin/ (This copies the downloaded files to the MiRobot. Use the IP of the MiRobot & the password you set as your SSH key when building your firmware)
  6. scp valetudo.conf [email protected]:/etc/init/
  7. ssh [email protected] SSH into the MiRobot
  8. chmod +x /usr/local/bin/valetudo
  9. service valetudo start
  10. You should now be able to see Valetudo WebServer if you enter the IP address of your MiRobot into a web browser

Configure the Valetudo Live Map into your Home Assistant

  1. Follow this post’s instructions: Valetudo - Xiaomi Vacuum Dustcloud alternative, Live Maps
7 Likes

#120

Thanks to share this …a small idea from me what u can do with rooted robot and hadashboard

0 Likes

#121

Hi!

Nice dashboard. :wink:

From your picture it seems that you can choose areas or zones for cleaning in your setup. Is that correct? If so, how did you do that? :smile:

0 Likes

#122

Unfortunately there’s no selectable zoned cleaning for the moment but there will be. Stay tuned :crossed_fingers:

0 Likes

#123

Thanks for thé compliment…I just added new valetudo version with zoned cleaning on map.will test it and post if it works well

0 Likes

#124

@thundergreen can you share the configuration? I also have valetudo in my robot

0 Likes

#125

It has been added to the latest release see here and watch the link :wink:

Here the final:

0 Likes

#126

Just added zoned cleaning…see below :wink:

0 Likes

#127

Here the GO TO

Here the zoned cleaning

0 Likes

#128

That’s great, it’s very nice looking.

I’m not able to add the map into the HA Dashboard. I have set the map into a camera entity. Any thought?

0 Likes

#129

The zoned cleaning is iframe

And normal map looks like:

vacuum_map: 
  title: Cacuum Live Map
  widget_style: "opacity: 1; border: 1px solid red; border-radius: 40px; opacity: 0.5;"
#  widget_style: "opacity: 0.5"
  widget_type: camera
  entity_picture: http://192.168.1.22:8123/api/camera_proxy/camera.vacuum_map_valetudo?token=6dcffa482abfc5abcaa843f8f1d976b7a20324ba12a013e167acbc592548eef6&api_password=hass
#  entity_picture: http://192.168.1.22:8123/local/navmap.png
#  entity_picture: http://192.168.1.22:8123/api/camera_proxy_stream/camera.vacuum_map_valetudo?token=4635ac911e7f680f9ecc52951e0ec7dedec31b8db1aad8924f1aed8dd55a6fcf
  refresh: 1
2 Likes

#130

not the zone cleaning. The realtime map itself

0 Likes

#131

My light control

0 Likes

#132

The Zones can’t be saved for Hass currently using the new screen, right?
In Valetudo i can create a zone,zone, by typing the coordinates manually, save these and start the area cleaning directly.

Would it maybe be possible to add a checkbox or something similar (to show original coordinates instead of Valetudo coordinates) so that we can copy and paste the values for Hass?

0 Likes

#133

Not quiet sure what u mean exactly … My zoned cleaning with the map is more for you exceptionally cleaning like after an accident of dirt … your coordinates for fixed zones can be read out by the Android app flole… Fir me the zoned cleaning is really an idea exceptionally use case …I have automations for zoned cleaning

0 Likes