Xiaomi roborock vacuum S50 IFTTT problems


(CL) #1

Hi all,

I am a newbie on openhab and have limited computer knowledge.
Background:(I bought a roborock S50 and wanna control it for zone cleaning using openhab. I tried home assistant on my win10 but the pc can’t run 24/7 so I give it up. I later found my Synology 214se can install home assistant but with very low verions so gave up again. Later again I found openhab which I had 0 knowledge but it could be installed on my synology. )
After that, I found only 4 commands(vacuum,pause,spot clean,dock) on the paperui. I set up IFTTT to control it and I was able to use 3 of them except spot clean. I did turn on the Execute Command channel under my vacuum thing but I don’t know how to use it since this doesn’t appear on IFTTT new applet item section.
My vacuum was previously a Australian model but I flashed it to Chinese model so I can add it to mainland china server. The firmware is only 3.3.9_001702 but it does have zone cleaning and go to function.(maybe chinese model firmwares are different from other models in Australia and Euro)

My questions are:
1: For spot clean, what format of command I should use because there is a space between 2 words?
2: With this Chinese firmware 3.3.9_001702, does it still qualify for using the “execute command”? Although its version is not 3.3.9_003194, it actually has zone cleaning function.
3: Let’s assume it can handle zone cleaning through “execute command”. how do I use it? It doesn’t appear in IFTTT after I turn on the execute command channel. Are there any files I need to edit? Thanks. Please write more detail at your convenience because I am very new on openhab.

Regards
Clement


(CL) #2

I found that using app_zoned_clean[[29900,24900,24300,28700,1]] but I don’t know where and how to use it. I also tried to use rule files but don’t know how to put in the command.


(yo) #3

Hi
first of all you must create items for each action and zone you want to control, here is an example: replace with your values: example :

Switch RobotVacuumNAMEOFTHEZONEArea

items files look like this :

/*Aspi*/


Group gVacuumArea "Nettoyage de Zone" <movecontrol>

Switch RobotVacuumActionSalleamangerArea        "Nettoyage Salle a manger"          <lawnmower>         (gVacuumArea)   [ "Switchable" ] 
Switch RobotVacuumActionCuisineArea             "Nettoyage Cuisine"                 <kitchen>           (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionSalonArea               "Nettoyage Salon"                   <sofa>              (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionEntreeArea              "Nettoyage Entrée"                  <frontdoor>         (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionCouloirArea             "Nettoyage Couloir"                 <corridor>          (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionDressingArea            "Nettoyage Dressing"                <washingmachine>    (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionChambre_de_clementArea  "Nettoyage Chambre de clément"      <boy_2>             (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionBureauArea              "Nettoyage Bureau"                  <office>            (gVacuumArea)   [ "Switchable" ]
Switch RobotVacuumActionMaisonArea              "Nettoyage Maison"                  <groundfloor>       (gVacuumArea)   [ "Switchable" ]

then you need to install in paper ui / addon / transformation / RegEx Transformation
also in paper ui / addon / transformation / Map Transformation

then create a rule file like this one :

rule "Vacuum Cleaning Area Request"
when
  Member of gVacuumArea changed to ON
then
  // Only if the mi robot is currently on the dock
  if (RoborockVacuum_StatusState.state == "Charging") {
    val areaName = transform("REGEX", "RobotVacuumAction(\\w+)Area", triggeringItem.name)
    val areaMap = transform("MAP", "vacuum_area.map", areaName)

    if (areaMap != "")
      RoborockVacuum_ActionsCommands.sendCommand('app_zoned_clean[' + areaMap + ']')
  }
end

and finally create a map of your home in the transform directory and named it : vaccum_area.map

in this file, thanks to the android app flole vac found here [https://play.google.com/store/apps/details?id=de.flole.xiaomi], put the coordinates of your zones by launching a complete cleaning session, after cleaning completed and the map realized, define each zone by pressing “add zone”, then long press “cleaning button” and get the coordinates, put them in the vaccum_area.map you’ve created, it should be like this :

Salleamanger=[24801,25158,30901,27708,1]
Cuisine=[23262,27978,27462,29828,1]
Salon=[28598,29752,31948,33652,1]
Entree=[26934,28011,30984,29061,1]
Chambre_de_clement=[28449,33804,32249,37454,1]
Dressing=[24560,33818,28360,37468,1]
Couloir=[27414,28840,28264,33690,1]
Piece_de_vie=[23417,25285,32067,33735,1]
Bureau=[24680,29983,27330,31683,1]
Maison=[23280,25080,32230,37530,1]

Each zone name must be the same as in your item files !

to finish in your sitemap copy this :

Frame label="Aspirateur"{
		
		Group item=gVac {
		Switch item=actionControl mappings=[vacuum="Vacuum", pause="Pause",spot="Spot", dock="Base"]
 		Switch item=actionFan mappings=[38="Silence", 60="Normal", 77="Fort",90="Max", 1="Custom"]
		Group item=gVacuumArea
		Default item=statusBat 
		Default item=statusArea 
		Default item=statusTime 
		Group  item=gVacStat
		}

note the Group item= gVaccumArea same as in your item file.

i made it trhought this topic:
https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/578

look may 2018 in history


(yo) #4

3: Let’s assume it can handle zone cleaning through “execute command”. how do I use it? It doesn’t appear in IFTTT after I turn on the execute command channel. Are there any files I need to edit?

create an account in https://myopenhab.org/

see this:
https://www.openhab.org/addons/integrations/openhabcloud/#openhab-cloud-connector

then in paper/ui/configurations/services/openhab cloud/ configure

Documentation here:
https://www.openhab.org/docs/ecosystem/ifttt/

Select item you want to see in IFTTT :for example:

RobotVacuumActionSalleamangerArea

Create your applets in IFTT

Send command ON

here you are

ok google clean the kitchen and all done !

regards


(CL) #5

Thanks so much for your replies. I will try it out. Have a happy new year.

Regards
Clement