{"id":193,"date":"2020-09-21T05:06:42","date_gmt":"2020-09-21T05:06:42","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=193"},"modified":"2021-07-10T12:40:39","modified_gmt":"2021-07-10T12:40:39","slug":"robot-vacuum-how-to-make-dust-bin-emptying-easy","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2020\/09\/21\/robot-vacuum-how-to-make-dust-bin-emptying-easy\/","title":{"rendered":"Robot vacuum, how to make dust bin emptying easy?"},"content":{"rendered":"\n<p>My robot vacuum (Roborock S5) is located under the sofa so I can&#8217;t just take the dust bin off while charging. So I&#8217;ve though of setting up a Google Assistant command like &#8217;empty dust bin&#8217; so that the robot would drive in front of waste basket for easier dust bin removal.<\/p>\n\n\n\n<p>Should not be too difficult to implement, so let&#8217;s get started..<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting the coordinates<\/h2>\n\n\n\n<p>I already have Roborock S5 integrated into Home Assistant (<a rel=\"noreferrer noopener\" href=\"https:\/\/python-miio.readthedocs.io\/en\/latest\/discovery.html\" data-type=\"URL\" data-id=\"https:\/\/python-miio.readthedocs.io\/en\/latest\/discovery.html\" target=\"_blank\">how to get the token<\/a>), so I only needed to get the proper coordinates next to waste basket and setup a Home Assistant script for it.<\/p>\n\n\n\n<p>After finding out that Roborock dock is always located at point X: 25500, Y:25500, I started to expirement different coordinates with <a rel=\"noreferrer noopener\" href=\"https:\/\/python-miio.readthedocs.io\/en\/latest\/discovery.html\" data-type=\"URL\" data-id=\"https:\/\/python-miio.readthedocs.io\/en\/latest\/discovery.html\" target=\"_blank\">python-miio<\/a> software. Driving the robot by incrementing values by decades, seemed like 1000 &#8216;xiaomi points&#8217; is about 1m in real life. By calculating proper positions (and using some try-fail-try-again method) I eventually got the points X:28200,Y:30000 to be near my waste basket at the kitchen. Simple as that \ud83d\ude42<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"541\" height=\"500\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2020\/09\/roborock_route.png\" alt=\"\" class=\"wp-image-198\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2020\/09\/roborock_route.png 541w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2020\/09\/roborock_route-300x277.png 300w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Home Assistant script<\/h2>\n\n\n\n<p>Next thing was to make a custom script to sent the Roborock to that specific point. By adding following script in my scripts.yaml it appeared in scripts section:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>empty_dust_bin:\n  alias: Vacuum empty dust bin\n  sequence:\n  - data:\n      command: app_goto_target\n      params: &#91;28200,30000]\n    service: vacuum.send_command\n    entity_id: vacuum.xiaomi_vacuum_cleaner<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up Google Assistant command<\/h2>\n\n\n\n<p>&#8230;and to be able to send the command through voice, I had to setup a custom routine to call &#8216;Vacuum empty dust bin&#8217; scene through Google Assistant. <\/p>\n\n\n\n<p>Going to Google Home app, syncing devices and then creating the routine with command &#8216;Empty dust bin&#8217;, the job was done. Of course all other Google Home devices had to be sync&#8217;d again also.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>This was easy task to implement and once again small improvement to my smart home system. Now I don&#8217;t have to pause vacuum in a middle of cleanup in order to empty the bin, I just can command it to near basket every now and then. I just wish my S5 had dust bin fill rate sensor, so I could do this automatically \ud83d\ude42 <\/p>\n\n\n\n<p>Below is a small demonstration of the whole setup:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Empty dust bin command with Roborock S5\" width=\"774\" height=\"435\" src=\"https:\/\/www.youtube.com\/embed\/_vB7daRcnFk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My robot vacuum (Roborock S5) is located under the sofa so I can&#8217;t just take the dust bin off while charging. So I&#8217;ve though of&hellip;<\/p>\n","protected":false},"author":1,"featured_media":200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[100,2],"tags":[29,7,28,27],"class_list":["post-193","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","category-inspiration","tag-dust-bin","tag-home-assistant","tag-roborock","tag-robot-vacuum","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2020\/09\/vacuum_sofa.png","author_info":{"display_name":"Toni","author_link":"https:\/\/www.creatingsmarthome.com\/index.php\/author\/topsy\/"},"_links":{"self":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/comments?post=193"}],"version-history":[{"count":11,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":560,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/193\/revisions\/560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/200"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}