Hi,
I am new at openHAB and I try to control my roborock s5 MAX with the xiaomi plugin.
I have a raspberry pi with openHAB 2.5.10
What I have done:
- Changed app from roborock to xiaomi home
- find out my token and set it up in the thing from roborock
- reading the parameters and sending some parameters to thr roborock works.
Now I try to send a command to clean one or more rooms via openHAB and I have no idea what to do and I don’t find an example?! Maybe I am to stupid to find it.
I have Items:
String actionVacuumRoom "Raum" {channel="miio:vacuum:132E5B51:actions#segment"}
String actionCommand "Vacuum Command" {channel="miio:vacuum:132E5B51:actions#commands" }
and I have a sitemap:
//------- Staubsauger
Text label="Staubsauger" icon="staubsauger" {
Switch item=VacuumVirtual
Text item=actionCommand
}
and I have a rule:
sendCommand(actionVacuumRoom,"16")
when I send this from a rule, the roborock start turning around in the docking station (docking station moves) and then roborock moves forword, stopps and moves back to docking station.
I have a multi level card so I have tested the command:
actionCommand.sendCommand("get_room_mapping")
and I received in my sitemap at actionCommand this:
{"result":[[16,"987001017278"],[17,"987001017275"],[18,"987001017279"],[19,"987001017277"],[20,"987001017276"]],"id":4397}
I have 5 rooms on level 1, so I changed the level in the app to the second level and started aagin get_room_mapping. I received this:
{"result":[[16,"987001017291"],[17,"987001017290"],[18,"987001017292"],[19,"987001017289"]],"id":4472}
I think this are the 4 rooms on level 2. I checked it with level 3(one room) and I received this:
{"result":[[16,"987001017293"]],"id":4487}
Then I startet to clean in level 1 one room and checked the log:
2020-11-23 18:10:12.030 [vent.ItemStateChangedEvent] - miio_vacuum_132E5B51_status_clean_area changed from 13.3475 to 0.0
2020-11-23 18:10:12.041 [vent.ItemStateChangedEvent] - statusArea changed from 13.3475 to 0.0
2020-11-23 18:10:12.048 [vent.ItemStateChangedEvent] - statusTime changed from 12 to 0
2020-11-23 18:10:12.063 [vent.ItemStateChangedEvent] - miio_vacuum_132E5B51_status_clean_time changed from 12 to 0
2020-11-23 18:10:12.084 [vent.ItemStateChangedEvent] - statusClean changed from 0 to 3
2020-11-23 18:10:12.089 [vent.ItemStateChangedEvent] - miio_vacuum_132E5B51_status_state changed from Charging to Room Clean
2020-11-23 18:10:12.094 [vent.ItemStateChangedEvent] - miio_vacuum_132E5B51_status_state_id changed from 8 to 18
2020-11-23 18:10:12.100 [vent.ItemStateChangedEvent] - actionControl changed from dock to vacuum
2020-11-23 18:10:12.104 [vent.ItemStateChangedEvent] - miio_vacuum_132E5B51_actions_control changed from dock to vacuum
2020-11-23 18:10:12.110 [vent.ItemStateChangedEvent] - actionVacuumOnOff changed from OFF to ON
Now I think I have to send a couple of commands to clean one ore more rooms.
I found thid command:
{
"method": "app_segment_clean",
"params": [16, 17, 18],
"id": 6764
}
But I have no idea how to use this in openHAB.
I hope I gave you all the informations you need and I hope somebody can help me.