Smart garage for xiaomi roborock vacuum cleaner built into a closet

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.


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

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

And i let it switch this relay.

https://www.elektronicawereld.nl/categorie/componenten_onderdelen_relais_elektromagneten/relais_mechanisch/product/13685/omron_relais_my4_serie/details

https://www.elektronicawereld.nl/categorie/componenten_onderdelen_relais_elektromagneten/relais_mechanisch/product/13694/omron_relaisvoetje_my4_serie/details/container/print

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


I did the configuration with text file’s

Modbus.things

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

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

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

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

Roborock.rules

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

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

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.

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.

1 Like

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.

2 Likes

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.