Xiaomi Robot Vacuum Binding

Hi, I am just about to take delivery of an Robrock S6 maxv. Is it still the case that I have to use the Xiaomi Home app and not the dedicated Roborock app?

@m4rk I expect it still the case, but you can always try…

@marcel_verpaalen In Xiaomi Home app for the room cleaning you can specify the number of cleaning cycles. Using the new channel actions#segment, might it be possible to set this parameter within this binding?
According to your detailed vacuum protocol documentation the relevant command ‘app_segment_clean’ does not support this feature so far. May you can check if this parameter could be supported by the binding in future?

I think this is only possible for zones See here for the zone command

As I found that the room names can be pulled, maybe somewhere in the future I’ll support it in the future incl proper names for the rooms to choose from.
Currently this is best send by a rule that has your specific room numbers defined.

Hi, i have 2 somwhat stupid questions.

  1. What is the difference between Actioncommand and Actioncontrol channel.

  2. Where do i find the commands i can use on these channels? For use in rules etc. I have read the docu. But I think im blind (Xioami IO binding) cheers.

@Ontrackx nah, it might be the case that the values for action control are not well described in the readme. But iirc vacuum,spot,pause and dock are the keywords.

The action command is described in the readme, it allows to send arbitrary commands to the vacuum to allow for functionality that the binding may not offer.
For those command you search the forum or look at my github

Thank you, i seem to having rouble getting it to dock via rule
ActionControl.sendCommand("dock ") is this correct?

You are aware of the space in your command?
If that is a typo, maybe pm a debuglog

hi @marcel_verpaalen

I just bought the Mi Water Purifier 600G yunmi.waterpuri.lx8.
all the channels are working only power and temperature have an error.

the channels for the filter 4 is missing.

I hope it helps, let me know if you want me to do some test.

my DEBUG log

2021-01-03 22:36:40.771 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0E8297A5' (miio:basic)
2021-01-03 22:36:40.773 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":1039,"method":"get_prop","params":["power","run_status","temperature","rinse","tds_in"]} -> 192.168.XX.XX (Device: 0E8297A5 token: BE866831XXXXXXXXXXXXXXXX5B3333AF Queue: 1).
2021-01-03 22:36:40.775 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":1040,"method":"get_prop","params":["tds_out","f1_totalflow","f1_totaltime","f1_usedflow","f1_usedtime"]} -> 192.168.XX.XX (Device: 0E8297A5 token: BE866831XXXXXXXXXXXXXXXX5B3333AF Queue: 2).
2021-01-03 22:36:40.776 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":1041,"method":"get_prop","params":["f2_totalflow","f2_totaltime","f2_usedflow","f2_usedtime","f3_totalflow"]} -> 192.168.XX.XX (Device: 0E8297A5 token: BE866831XXXXXXXXXXXXXXXX5B3333AF Queue: 3).
2021-01-03 22:36:40.778 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":1042,"method":"get_prop","params":["f3_totaltime","f3_usedflow","f3_usedtime"]} -> 192.168.XX.XX (Device: 0E8297A5 token: BE866831XXXXXXXXXXXXXXXX5B3333AF Queue: 4).
2021-01-03 22:36:40.780 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":1043,"method":"miIO.info","params":[]} -> 192.168.XX.XX (Device: 0E8297A5 token: BE866831XXXXXXXXXXXXXXXX5B3333AF Queue: 4).
2021-01-03 22:36:41.343 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0E8297A5 type: GET_PROPERTY, result: ["error",0,"error",0,0], fullresponse: {"id":1039,"result":["error",0,"error",0,0],"exe_time":510}
2021-01-03 22:36:41.345 [DEBUG] [io.internal.handler.MiIoBasicHandler] - 'miio:generic:0E8297A5' channel 'temperature' has unit 'CELCIUS' with symbol '°C'.
2021-01-03 22:36:41.347 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:0E8297A5 property temperature with '"error"' : java.lang.NumberFormatException: Not a digit.
2021-01-03 22:36:41.840 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0E8297A5 type: GET_PROPERTY, result: [100,3600,4320,180,192], fullresponse: {"id":1040,"result":[100,3600,4320,180,192],"exe_time":440}
2021-01-03 22:36:42.345 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0E8297A5 type: GET_PROPERTY, result: [3600,8640,180,203,7200], fullresponse: {"id":1041,"result":[3600,8640,180,203,7200],"exe_time":450}
2021-01-03 22:36:42.834 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0E8297A5 type: GET_PROPERTY, result: [17280,90,192], fullresponse: {"id":1042,"result":[17280,90,192],"exe_time":440}
2021-01-03 22:36:42.953 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0E8297A5 type: MIIO_INFO, result: {"life":27343,"uid":1661752958,"model":"yunmi.waterpuri.lx8","token":"BE866831XXXXXXXXXXXXXXXX5B3333AF","ipflag":1,"fw_ver":"2.1.0","mcu_fw_ver":"0004","miio_ver":"0.0.8","hw_ver":"esp8266","mmfree":25140,"mac":"XX:XX:XX:XX:XX:XX","wifi_fw_ver":"2709610","ap":{"ssid":"XXXXXX","bssid":"XX:XX:XX:XX:XX:XX","rssi":-71,"primary":11},"netif":{"localIp":"192.168.XX.XX","mask":"255.255.252.0","gw":"192.168.XX.XX"}}, fullresponse: {"id":1043,"result":{"life":27343,"uid":1661752958,"model":"yunmi.waterpuri.lx8","token":"BE866831XXXXXXXXXXXXXXXX5B3333AF","ipflag":1,"fw_ver":"2.1.0","mcu_fw_ver":"0004","miio_ver":"0.0.8","hw_ver":"esp8266","mmfree":25140,"mac":"XX:XX:XX:XX:XX:XX","wifi_fw_ver":"2709610","ap":{"ssid":"XXXXXX","bssid":"XX:XX:XX:XX:XX:XX","rssi":-71,"primary":11},"netif":{"localIp":"192.168.XX.XX","mask":"255.255.252.0","gw":"192.168.XX.XX"}},"exe_time":40}

Indeed, some of the channels may not be supported by your device. These can be taken out.

Can you try out in the command channel the following commands to see if they are supported

'get_prop ["power"]'
'get_prop ["temperature"]'
'get_prop ["tds_warn_thd"]'
'get_prop ["tds_out_avg"]'
'get_prop ["lightMode"]'
'get_prop ["maintenance_state"]'
'get_prop ["maintenance_interval"]'
'get_prop ["f4_totaltime"]'
'get_prop ["f4_usedflow"]'
'get_prop ["f4_usedtime"]'

(note: the outer single quotes are not needed if you enter the commands via the webUI, only if you send it from the console line they are needed)

Btw, is there some power switch in the mihome app visible, or not at all?
If the lightmode is supported property, you may try to alter it with the set_lightMode command

Btw, is there some power switch in the mihome app visible, or not at all?

no switch on mihome app

The command and the response

'get_prop ["power"]' ->  {"id":6059,"result":["error"],"exe_time":220}
'get_prop ["temperature"]' -> {"id":6064,"result":["error"],"exe_time":450}
'get_prop ["tds_warn_thd"]' -> {"id":6065,"result":[100],"exe_time":90}
'get_prop ["tds_out_avg"]' -> {"id":6071,"result":["error"],"exe_time":330}
'get_prop ["lightMode"]' -> {"id":6072,"result":[0],"exe_time":160}
'get_prop ["maintenance_state"]' -> {"id":6077,"result":[0],"exe_time":130}
'get_prop ["maintenance_interval"]' -> {"id":6078,"result":[196],"exe_time":330}
'get_prop ["f4_totaltime"]' -> {"id":6084,"result":[8640],"exe_time":330}
'get_prop ["f4_usedflow"]' -> {"id":6089,"result":[90],"exe_time":240}
'get_prop ["f4_usedtime"]' -> {"id":6090,"result":[264],"exe_time":280}
'set_lightMode ["0"]' -> {"id":7196,"result":["ok"],"exe_time":280}
'set_lightMode ["1"]' -> {"id":7206,"result":["ok"],"exe_time":390}
'set_lightMode ["2"]' -> {"id":7222,"result":["error"],"exe_time":420}

Let me know @marcel_verpaalen if you need anything else,
I also have some yeelight and roborock S6 if you want to do some other test :wink:

Can you try this db file, this removes the none working channels and add some new channels as per the test
yunmi.waterpurifier.lx8.json (4.6 KB)

hello @marcel_verpaalen,

The db file works fine on all channels :wink:
I modify the db file because the filter 4 total flow channel was missing

yunmi.waterpurifier.lx8.json (7.1 KB)

Okay, cool. I submitted it for incorporation in the build [miio] improve Mi Water Purifier 600G yunmi.waterpuri.lx8. by marcelrv · Pull Request #9752 · openhab/openhab-addons · GitHub

hi,i dont know if this is the right topic,i use 3 rgb yelights with mi binding and i want to know what custom commands i can send to yeelights using the “Execute Command” channel.I want to make them change colors one after another and then stop and return to their previous state…

You can check the spec for yeelights

I use this binging since quite a while very intensivly, e.g. for cleaning when away. I love this features - tanks!

One issue I have is the fact that the s5max updates the map regularly. This is in principle fine, nevertheless once a while it causes issues. My idea is now to save the map when knowing it is fine and restorning it every night.

One example: due to more presence (corona…) at home the sleeping door is closed more often and hence the robot does not find the sleeping room as the map is (correctly) updated with a closed door. With the idea above I could on purpose fix an ideal situation and rely on this by restoring.

@m0oba do you know what is the unit of the usetime & total time? Is it hours? Minutes or send seconds?

Likewise, can you see in the app what is the unit for the usedflow? Liter?

My installation with the S6 ran for many months without problems.
I have now switched to OH3 and have recreated all devices. This all worked without problems.

Unfortunately I have difficulties to bind the S6 again.
The I/O binding is installed, the device is recognized. That is all fine…
But how do I get the token now? Where can I enter my username and password. I am a bit lost in orientation. Does anyone have any ideas?

I am trying to get this binding to work with my Roborock E4. So far I’ve had no luck at all. I’m looking at the documentation and I tried various things.

The binding at first didn’t seem to connect to the cloud, but after changing the logging to TRACE I saw that it does indeed successfully connect to the cloud and pull information about my vacuum which it then proceeds to completely disregard and not even place in the inbox. Why isn’t it putting the device the cloud reports to it on the inbox?

I tried manually configuring the vacuum with the token, DID, and IP address but I get a communication_error with no response from the device.

As this is on a different subnet I checked the documentation and it says: “Your device is on a different subnet? This is in most cases not working. Firmware of the device don’t accept commands coming from other subnets. Set the communication in the thing configuration to ‘cloud’.

The documentation, however, fails to explain in any detail how I’m supposed to actually do that. I grepped in the config directory and found no .things file for what I set up in the paper UI. I looked in /var/lib/openhab2 and found the ID for the device there, but see no parameter in the JSON file about “communication” or anywhere I could set to ‘cloud.’ I really don’t want to have to figure out text configs to set up my vacuum if it’s not necessary.

Please help! At the very least I would expect to at least have this set up as an “unsupported device” but I can’t even get a connection to it, cloud (As MIIO Binding seems not to notice that it got device info.) or local.