# Smart garage for xiaomi roborock vacuum cleaner built into a closet

**URL:** <https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106>\
**Category:** openHAB Stories\
**Tags:** xiaomi-robot-vacuum\
**Created:** [October 25, 2020, 11:14am UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106 "2020-10-25T11:14:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rado1](https://community.openhab.org/user_avatar/community.openhab.org/rado1/32/32585_2.png) [@Rado1](https://community.openhab.org/u/Rado1)\
**Post date:** [October 25, 2020, 11:14am UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/1 "2020-10-25T11:14:21Z")

</div>

Hello,

Today I want to share my smart garage for my xiaomi roborock S5 robot vacuum cleaner.  
When the robot vacuum cleaner starts, the door opens automatically and when it starts to recharge the door closes. I do this by some rules that indicate the status of the robot vacuum cleaner.

[![](https://img.youtube.com/vi/u-DnFueRJ34/maxresdefault.jpg "Smart garage for robotic vacuum cleaner with openHAB.") ](https://www.youtube.com/watch?v=u-DnFueRJ34)

 ![PXL_20201025_093527826](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/a/f/af7e57e879b2d8674284e556cbef2464944184ac.jpeg)  
I built the closet myself.  
I used this actuator and voltage converter.

[https://www.vekto.nl/voeding-12vdc-60w-4-5a-dinrail-ingang-85-264vac](https://www.vekto.nl/voeding-12vdc-60w-4-5a-dinrail-ingang-85-264vac)

[https://www.mijn-artikel.nl/Webwinkel-Product-440581571/DC-12V-50-500mm-700N-slag-buismotor-2-4-8-12-16-20-inch-lineaire-actuatormotor.html](https://www.mijn-artikel.nl/Webwinkel-Product-440581571/DC-12V-50-500mm-700N-slag-buismotor-2-4-8-12-16-20-inch-lineaire-actuatormotor.html)

To control the actuator with openhab I used the following modbus module with 1x usb to RS485 converter.

[https://nl.aliexpress.com/item/32738571820.html?gps-id=pcStoreLeaderboard&scm=1007.22922.122102.0&scm\_id=1007.22922.122102.0&scm-url=1007.22922.122102.0&pvid=aa7c888e-64ea-4ca9-81dd-48d1050b136b&spm=a2g0o.store\_home.smartLeaderboard\_136449541.32738571820](https://nl.aliexpress.com/item/32738571820.html?gps-id=pcStoreLeaderboard&scm=1007.22922.122102.0&scm_id=1007.22922.122102.0&scm-url=1007.22922.122102.0&pvid=aa7c888e-64ea-4ca9-81dd-48d1050b136b&spm=a2g0o.store_home.smartLeaderboard_136449541.32738571820)

And i let it switch this relay.

> **[Omron Relais - MY4 serie - ElektronicaWereld.nl - Goedkoopste van Nederland](https://www.elektronicawereld.nl/categorie/componenten_onderdelen_relais_elektromagneten/relais_mechanisch/product/13685/omron_relais_my4_serie/details)**
>
> ElektronicaWereld.nl - Relais - Spoelspanning 12 Volt DC - 4x wisselcontact (max. schakelvermogen 250V - 5A)

> **[Omron Relaisvoetje - MY4 serie - ElektronicaWereld.nl - Goedkoopste van...](https://www.elektronicawereld.nl/categorie/componenten_onderdelen_relais_elektromagneten/relais_mechanisch/product/13694/omron_relaisvoetje_my4_serie/details/container/print)**
>
> ElektronicaWereld.nl - Omron Relaisvoetje voor relais uit de MY4 serie - De aansluitdraden kunnen nu geschroefd worden

You have to install the following bindings for more info read the doc’s of the bindings.

> **[Xiaomi Wifi devices (Mi IO) - Bindings](https://www.openhab.org/addons/bindings/miio/#Country-Servers)**
>
> This binding is used to control Xiaomi products implementing the Mi IO protocol.

[https://www.openhab.org/v2.5/addons/bindings/modbus/](https://www.openhab.org/v2.5/addons/bindings/modbus/)

I did the configuration with text file’s

Modbus.things

```csv
Bridge modbus:serial:slave1 [port="/dev/ttyUSB-RS485" ,id=1 , baud=9600, stopBits="1", parity="none",timeBetweenTransactionsMillis=35,dataBits=8, encoding="rtu"]{

Bridge poller slave1coils [start=0, length=8, refresh=1000, type="coil"]{
    
        Thing data do00 [readStart="0", readValueType="bit", writeStart="0", writeValueType="bit", writeType="coil",updateUnchangedValuesEveryMillis="5000000"]}

```

Modbus.items

```csv
Switch Roborock { channel="modbus:data:slave1:slave1coils:do0:switch" }

```

Roborock.items(dont forget to set the device id to your vacuumcleaner)

```csv
Number statusId "Status id [:%s]" (gVac,gVacStat) {channel="miio:generic:070A5AF2:status#state_id" } 

```

Roborock.rules

```csv
rule "Roborock start vacuum"
when
	Item statusId changed to 5
then 
    sendCommand(Roborock, ON)
end

rule "Roborock start charging"
when
    Item statusId changed to 8
then  
    sendCommand(Roborock, OFF)           
               
end

```

.sitemap

```csv
Frame label="Roborock" {  
        Switch item=Roborock
        Switch item=actionControl mappings=[vacuum="Vacuum", pause="Pause",spot="Spot", dock="Dock"]
        Text item=statusStatus
        }

```

---

<div class="post-metadata">

**Author:** ![Dibbler42](https://community.openhab.org/user_avatar/community.openhab.org/dibbler42/32/56084_2.png) [@Dibbler42](https://community.openhab.org/u/Dibbler42)\
**Post date:** [October 25, 2020, 11:53am UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/2 "2020-10-25T11:53:00Z")

</div>

Great idea!!! I have to keep it in mind. What happen if the roboroc has a full trash bin? My roomba move to the base ststion. Maybe it is a little bit uncomfortable to empty the bin from with the closet.

Again great idea.

---

<div class="post-metadata">

**Author:** ![Rado1](https://community.openhab.org/user_avatar/community.openhab.org/rado1/32/32585_2.png) [@Rado1](https://community.openhab.org/u/Rado1)\
**Post date:** [October 25, 2020, 12:04pm UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/3 "2020-10-25T12:04:22Z")

</div>

I just tell google assistant to start cleaning and roborock comes out of the closet I pause it empty the bin and let it dock again, I only have to empty it once a week.

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [October 25, 2020, 1:54pm UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/4 "2020-10-25T13:54:01Z")

</div>

I have a switch, labelled “Clean Robot” and that switch does

`XiaomiRobotVacuum1SActionsCommands.sendCommand("app_goto_target[25229,25593]")`

send the robot to a comfortable place for cleaning the bin.

---

<div class="post-metadata">

**Author:** ![Daniel\_Linder](https://community.openhab.org/user_avatar/community.openhab.org/daniel_linder/32/36113_2.png) [@Daniel\_Linder](https://community.openhab.org/u/Daniel_Linder)\
**Post date:** [October 26, 2020, 8:02pm UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/5 "2020-10-26T20:02:19Z")

</div>

I had a similar setup a few years ago, when I had a roomba with limited “smartness”. I had the hatch under one of the kitchen cabinets. That way, when released it always starting to clean the kitchen.  
Similar actuator, but I used a qubino dc rollershutter relay.  
With the roborock, I just let it hide under the living room sofa. Obviously not as cool. But it’s not seen anyways.  
To avoid anyone (children) getting their toes or fingers mashed up, I would recommend an IR barrier that breaks the circuit. Those actuators are plenty powerful.

---

<div class="post-metadata">

**Author:** ![draymott](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/5f9b8f/32.png) [@draymott](https://community.openhab.org/u/draymott)\
**Post date:** [February 3, 2023, 9:36pm UTC](https://community.openhab.org/t/smart-garage-for-xiaomi-roborock-vacuum-cleaner-built-into-a-closet/107106/6 "2023-02-03T21:36:19Z")

</div>

hello. what hinges did you use? can you send a pic of the seam with the garage door closed. curious how hidden the hinges are under the toe kick.
