Robot vacuum, how to make dust bin emptying easy?

My robot vacuum (Roborock S5) is located under the sofa so I can’t just take the dust bin off while charging. So I’ve though of setting up a Google Assistant command like ’empty dust bin’ so that the robot would drive in front of waste basket for easier dust bin removal.

Should not be too difficult to implement, so let’s get started..

Getting the coordinates

I already have Roborock S5 integrated into Home Assistant (how to get the token), so I only needed to get the proper coordinates next to waste basket and setup a Home Assistant script for it.

After finding out that Roborock dock is always located at point X: 25500, Y:25500, I started to expirement different coordinates with python-miio software. Driving the robot by incrementing values by decades, seemed like 1000 ‘xiaomi points’ 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 🙂

Home Assistant script

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:

empty_dust_bin:
  alias: Vacuum empty dust bin
  sequence:
  - data:
      command: app_goto_target
      params: [28200,30000]
    service: vacuum.send_command
    entity_id: vacuum.xiaomi_vacuum_cleaner

Setting up Google Assistant command

…and to be able to send the command through voice, I had to setup a custom routine to call ‘Vacuum empty dust bin’ scene through Google Assistant.

Going to Google Home app, syncing devices and then creating the routine with command ‘Empty dust bin’, the job was done. Of course all other Google Home devices had to be sync’d again also.

Conclusion

This was easy task to implement and once again small improvement to my smart home system. Now I don’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 🙂

Below is a small demonstration of the whole setup:

Leave a Reply

Your email address will not be published.