Xiaomi Robot Vacuum Binding

Thank you, i updated to M4 and now it works perfect :slight_smile: .
One question, in the Original Mi App the device Shows the Temperature, is there a way to see the temperature with this binding?

you can try to enable the (advanced, use unhide in channel page) command channel. Also set logging to debug. see binding readme for more elaborative explaination

and try e.g. get_prop [ "temperature"] or get_prop [ "Temperature_Value"] see if it responds with the temperature you see in the app. Let me know the result and we can incorporate it maybe

@marcel_verpaalen

Hi, I have a problem with my roborock s50. I have the following item:
String Roborock_actionFan “Fan Command” (Roborock) {channel=“miio:vacuum:0F94761D:actions#fan” }

The value of this item is changing every few seconds to the date 1970-01-01 and I have no clue why it is doing that:



2021-05-04 22:20:29.246 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Roborock_actionFan' received command 104

2021-05-04 22:20:29.248 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Roborock_actionFan' predicted to become 104

2021-05-04 22:20:29.250 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 1970-01-01T00:01:44.000+0000 to 104

2021-05-04 22:20:34.746 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 104 to 1970-01-01T00:01:44.000+0000

2021-05-04 22:20:41.155 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Roborock_actionFan' received command 102

2021-05-04 22:20:41.156 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Roborock_actionFan' predicted to become 102

2021-05-04 22:20:41.158 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 1970-01-01T00:01:44.000+0000 to 102

2021-05-04 22:21:04.786 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 102 to 1970-01-01T00:01:44.000+0000

2021-05-04 22:21:09.150 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Roborock_actionFan' received command 101

2021-05-04 22:21:09.158 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Roborock_actionFan' predicted to become 101

2021-05-04 22:21:09.160 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 1970-01-01T00:01:44.000+0000 to 101

2021-05-04 22:21:34.809 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Roborock_actionFan' changed from 101 to 1970-01-01T00:01:44.000+0000

I am using binding version 3.1.0.M3

I also have the problem, that after a while my Thing is going offline and online again every minute:

2021-05-06 04:24:06.649 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:vacuum:0F94761D' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2021-05-06 04:26:37.329 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:vacuum:0F94761D' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE

When I reboot openhab it is working but then after a few hours or minutes it is going offline and online again and then it is not reacting on the commands

This sounds like a token issue (e.g. if you had your vacuum connected to different servers at time) or connectivity issue.

@marcel_verpaalen so I need to read out a new token? It is located 1 meter from the access point so I don’t think it is a connection issue

Yes, you need the right token. the configuration error / on-offline is indicating a token error.

but… as you indicated it works when you reboot for few hours… that is really strange (normally it works or it doesnt… not work for few hours). I can think of only 2 reasons that that can happen

  1. you have multiple things for the same device
  2. somehow you get the wrong token once in a while from the cloud… the latter may happen if you have defined your vacuum in the past for multiple countries… when you move to the new country server, the settings / token on the old server remains. It might be that while refreshing it picks up the token from the wrong server. (the binding does educated guess on which server your device is, but depending your settings that may go wrong, esp if the device is offline for few minutes)

But how do I get the right token?
I removed my Thing and readded it, but the token seems to be the same.
So 1. should not apply to my case.
I don’t think that I defined it for multiple countries. Maybe by mistake.
How can I check and fix that?

Hi. I added zhimi.heater.mc2 but I can only switch on/off it. I can’t set target temperature and can’t get environment temperature from heater (but I see it in MiHome app)

you can check in the userdata/miio folder. There are json files for each county server. Check if your device is listed in multiple files(countries)

This device was only added rather recent. Your OH version is prob too old. Update to the OH3.1 branch for this device to be inluded.

Hi Marcel, thank you very much for your tremendous work on the miio binding!

Could you suggest if there were any changes to how “auto-refresh after command” works?
I read your message dated “Aug 15th, 2017”, where you commented on new features:

Refresh after sending each command (issue from @elias_gabrielsson)

But this doesn’t work in my case. See the attached logs:
app_zoned_clean was sent at 12:20:37, but no status update until periodic update at 12:21:14.

openhab> bundle:list -s | grep miio
255 │ Active │  80 │ 3.0.1                   │ org.openhab.binding.miio
12:20:37.328 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":86,"method":"app_zoned_clean","params":[[23450,19550,25950,22150,1]]} -> 192.168.0.10 (Device: 13<cut>0B token: 6D<cut>138 Queue: 1).
12:20:37.470 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for vacuum type: START_ZONE, result: ["ok"], fullresponse: {"result":["ok"],"id":86}
12:21:14.097 [DEBUG] [io.internal.handler.MiIoVacuumHandler] - Periodic update for 'miio:vacuum:vacuum’ (miio:vacuum)

Yes, it works for all commands… except for custom commands it seems :confused:
Can you make a github issue for it, than I’ll fix that in the next update

Created a github issue: [miio] Vacuum status is not updated after sending a custom command · Issue #10719 · openhab/openhab-addons · GitHub.
Thank you in advance!

What is the best way to use Google Home to control the vacuum cleaner?
I have created 4 switches to clean the 4 “rooms” on the ground floor. When adding Google Assistent Metadata to the switch, it’s only working when adding 1 switch.
If I add 2 switches (using vacuum in the metadata) i can see 2 vacuum cleaners inside google home, but cannot control it with voice, it doesn’t know which device to use.

How do you use: Hey Google, Clean the kitchen?

i cant find the expert mode from Xiaomi Mi IO - Bindings | openHAB I know this is an openhab 2 image. Is it gone or?

@Mordor if you look at the 3.1.0 latest documentation it has updated screenshots.
You can see how to reach the binding settings (expert mode) in the OH3.x

1 Like

DEars,

sorry I´m new for robot.
Could you tell which version of binding I should use for last stable version of OH2.5.12?

Currently I suing the binding from paperui and I have follow message in my log:
2021-06-28 13:31:47.547 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype (pls report to author)
2021-06-28 13:31:47.551 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype (pls report to author)

I using an Roborock S7.

Thank you.

You are on a pretty old version of the binding. Since than the parsing of the blocks have been improved, hence most likely you won’t have the issue in the current version (e.g. the released OH3.1)

Suggest to ignore the message (you could supress it with set:log warn org.openhab.binding.miio.internal.robot.RRMapFileParser)

The jar files from oh3.0 / 3.1 can’t run in the 2.5 environment, so you either live with it or need to upgrade your Openhab.

Hi Marcel,

thank you for your help. Sorry I have read some bout this binding but have 2 other questions and I need help here:

  • Can I use in my OH2.5.12 version the current version of this binding (3.0/3.1) ?
  • How can I use the “is_locating” channel in my version?

Thank you for your help.

Cheers
Sascha