Xiaomi Robot Vacuum Binding

I struggled to find the token in android. Follow this: https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token.md

If you install the official.version 5.4.54 the token will be written to the logfile on the phone.

1 Like

@marcel_verpaalen is there any chance of getting on off mapped to the color channel on the Yeelight Strips? When using the yeelight binding i was able to link the color channel to Amazon Alexa, control the color, brightness & on or off but now I am unable to due to them having to be on separate channels. Alexa gets a little confused with similar named items.

@menzy i.ll take a look of that is easy with the current binding setup.(the basic handler does not have much ‘logic’ in it… It takes the commands from a database and maps them to channels)

HI, i just installed openhab in a nas with a docker image. 2.2
Is there a way how i can install the MI IO binding? In the Binding i can only find the Xiaomi mi home binding which not contains for example the xiaomi philips bulb, and xiaomi cameras and so on. How can i install it?
Thx

@pallr is there a way you can go for a more recent docker image. In 2.2 the binding was not yet in as approved binding, hence you don’t see it.
I see the following solutions

  1. Upgrade to a more recent docker, preferably a 2.5 version.
  2. Download the the jar file from the repository and add it to the addons folder
    https://openhab.jfrog.io/openhab/webapp/#/artifacts/browse/tree/General/sandbox-snapshot/org/openhab/binding/org.openhab.binding.miio/2.5.0-SNAPSHOT

if the latest is not compatible with your OH version, you can try an older version, eg. get it here
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.max/

I bought the Xiaomi Air Quality Meter

The device is seen as:
Mi Device model cgllc.airmonitor.b1 identified as: Mi Air Quality Monitor 2gen (cgllc.airmonitor.b1). Matches thingtype miio:basic

The thing has a few items. None of them which seems to “work”. Is there anything I can do to get this device to work?

See also https://github.com/rytilahti/python-miio/issues/419
Looks like this model is rather different from the v1 and maybe does not allow to be controlled via local connection.

You could otherwise try to wireshark the communication to see if any info is send directly and than decode the traffic

Hi all, I’m looking for a command to end a task during a zone clean.
I’d like to stop a task if another task is asked

Hi,
Thanks for this info, just worked perfectly for me to get the token on IOS 12 and windows…

1 Like

Hey, having issues setting up my rockrobo.vacuum.v1

For over a year it has worked just fine, but is no longer working and my logs show the following::

2019-04-19 21:53:26.325 [hingStatusInfoChangedEvent] - 'miio:vacuum:xiaomi' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)

Any help would be very appreciated!

I have manually created a vacuum.things file with the following value::

Thing miio:vacuum:xiaomi "xiaomi" [ host="192.168.1.7", token="7859712315176f746f48763872114d35", deviceId="046DFG95", model="rockrobo.vacuum.v1", refreshInterval="60", timeout="45000" ]

** I did change the token value above as well as the deviceId for security reasons, but did most recently obtain the token using the MiToolkit.

Thanks!

@chaderick9 can you try with debug log settings… I don’t see anything obvious wrong with your settings.
Did you do a firmware update recently?

1 Like

I have done multiple firmware updates over the year. Does the firmware update to my device change the token every time and I have just been lucky with it working still?

– I got things working after enabling debug logging… ping to my device was always successful but it was clear the follow up commands in the queue were not.

– I retrieved a new token yesterday using the MiToolkit and that was the one that continued to fail… I decided after looking at the logs to repeat the steps to retrieve a new token just to make sure I didn’t copy/paste the thing wrong. I downloaded MiHome 5.0.19 fresh just now… went through the process, retrieved my token thinking it would be off by a single character – it was a completely new one! About the same length as the one I retrieved yesterday, I provided my new token in my vacuum.things file and boom. Logs showed successful right away and things are smooth.

– not sure what I changed the second go around? I will say that I am not 100% on the MiHome app version I download. I just googled for the app instead of clicking the link referenced at the top of this forum – so that could have been where I did things wrong.

General question can anyone tell me if the aqara sensors can be managed and controlled via the Mijia smart home gateway?

Get notified when your vacuum needs to be cleaned, or a consumable to be replaced.

Rule

rule "Stofzuiger schoonmaken / onderdeel vervangen"
when
    Member of gVacConsT changed
then
    if (triggeringItem.state <1) {
    var name = transform("MAP", "vacuum.map", triggeringItem.name)
    logInfo("notifications", "Sending notification via mail.")
    sendMail("YOUREMAIL", "Stofzuiger onderhoud nodig", "Het volgende onderdeel moet schoongemaakt of vervangen worden: \n\n" + name)
    }
end

I did modify the .items a little bit, otherwise you get 2 notifications, 1 for the time and 1 for the percentage:

Group  gVacConsT     "Consumables Usage in Time"        <line-increase> (gVac)
Group  gVacConsP     "Consumables Usage in %"        <line-increase> (gVac)

Number consumableMainT    "Main Brush [%1.0fu]"    (gVacConsT) {channel="miio:vacuum:03DA5D4B:consumables#main_brush_time"}
Number consumableMainP    "Main Brush [%1.0f%%]"    (gVacConsP) {channel="miio:vacuum:03DA5D4B:consumables#main_brush_percent"}
Number consumableSideT    "Side Brush [%1.0fu]"    (gVacConsT) {channel="miio:vacuum:03DA5D4B:consumables#side_brush_time"}
Number consumableSideP    "Side Brush [%1.0f%%]"    (gVacConsP) {channel="miio:vacuum:03DA5D4B:consumables#side_brush_percent"}
Number consumableFilterT    "Filter Time[%1.0fu]"    (gVacConsT) {channel="miio:vacuum:03DA5D4B:consumables#filter_time" }
Number consumableFilterP    "Filter Time[%1.0f%%]"    (gVacConsP) {channel="miio:vacuum:03DA5D4B:consumables#filter_percent" }
Number consumableSensorT    "Sensor [%1.0fu]"        (gVacConsT) {channel="miio:vacuum:03DA5D4B:consumables#sensor_dirt_time"}
Number consumableSensorP    "Sensor [%1.0f%%]"    (gVacConsP) {channel="miio:vacuum:03DA5D4B:consumables#sensor_dirt_percent"}

Map:

consumableMainT=Main Brush
consumableMainP=Main Brush
consumableSideT=Side Brush
consumableSideP=Side Brush
consumableFilterT=Filter
consumableFilterP=Filter
consumableSensorT=Sensors
consumableSensorP=Sensors

Now I only need to find out how to reset the consumables, but I saw there is a separate channel for that. And then you don’t need the Mi Home app anymore.

3 Likes

To answer myself:

Sitemap

	Group  item=gVacCons {
        Frame label="" {
            Text item=consumableMainT
            Text item=consumableMainP
            Switch item=ConsumablesConsumableReset mappings=[main_brush_work_time="Hoofdborstel"]
        }
        Frame label="" {
            Text item=consumableSideT
            Text item=consumableSideP
            Switch item=ConsumablesConsumableReset mappings=[side_brush_work_time="Zijborstel"]
        }
        Frame label="" {
            Text item=consumableFilterT            
            Text item=consumableFilterP
            Switch item=ConsumablesConsumableReset mappings=[filter_work_time="Filter"]
        }
        Frame label="" {
            Text item=consumableSensorT
            Text item=consumableSensorP
            Switch item=ConsumablesConsumableReset mappings=[sensor_dirty_time="Sensor"]
        }
    }

Add to items:

String ConsumablesConsumableReset "Reset Consumable" {channel="miio:vacuum:03DA5D4B:consumables#consumable_reset"}
4 Likes

Does anyone know it the binding works with the new Xiaomi Mijia 1S ?

https://www.gearbest.com/blog/new-gear/xiaomi-mijia-1s-robot-vacuum-cleaner-vs-original-xiaomi-mi-robot-vacuum-cleaner-13-better-navigation-40-better-cleaning-and-voice-control-3905

I don’t know, but it looks like a nice upgrade to the original. I have the original one that has just started throwing LDS errors, so this one might be a good choice to replace the old one if the LDS errors continue and I can’t fix it.

Even if I can fix it, the original one could be relegated to the upstairs, and I could use this one downstairs. :smiley:

1 Like

Hi folks I am also interested in sending a resume command to my Roborock s50 2 after sending a pause?

1 Like

Hi all,

Would it be possible to configured zoned cleaning with provided coordinates?
Thanks!

I have Roborock S55 and the mappings for the fan mode are a bit different, so if change them in the sitemap, upon pressing the button that sets the fan power, if the value is different it goes into -1 Custom

The prespecified values are
Control Fan Level


38 Silent
60 Standard
77 Power
90 Full
-1 Custom

while the values i need to pass are

Switch item=actionFan mappings=[38=“Quiet”, 60=“Balanced”, 70=“Turbo”,100=“MAX”, 105=“Mop”]

The NOOB question is how do I change the behaviour of mapping to highlight the correct button and not go into the -1 .

thanks in advance

1 Like