Xiaomi Robot Vacuum Binding

binding
vacuum
xiaomi
Tags: #<Tag:0x00007f1829cf57b8> #<Tag:0x00007f1829cf5628> #<Tag:0x00007f1829cf54e8>

(Tom) #383

I don’t know about battery life - I would just assume that Xiaomi has put some thoughts into an intelligent charging algorithm, since yours is the most common usecase for nearly everyone using it.

Regarding moving forwards (and back): you can experiment with the rc mode as described here: https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/remote_control.md


(Stefan Rademacher) #384

Hi there,

don’t know, what I am missing…
I am seeing the Channels “main_brush_time”, “filter_time”, etc. (type Number), but no Channels “main_brush_work_time”, etc.

How do I reset these consumable channels?

Thanks!!
Stefan


(Andrew Pawelski) #385

After reaching a battery status of about 100% I would like to see the robot moving forward until connection to charging contacts are interrupted.
By reaching battery low limit (aprox. 30%) he has to go back for charging.

@madler if you can get this working like @_tom has said here

Regarding moving forwards (and back): you can experiment with the rc mode as described here: https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/remote_control.md2

Id love to know I had a go and couldnt work out for the life of me how to a) manage keeping track of the sequence number needed and b) how on earth to drive the thing forwards using omega - at once stage I got it mounting the dock!


(Brian M. Pedersen) #386

I think you would were down the battery very fast this way, as I know batteries only lasts for a certain amount of recharges. I see that my robot uses alot of battery in standby mode, so I would think it is a bad idear to do this.


(Oli M) #387

i finaly found a solution for switching my yeelight ceiling light to nightmode and back to normal mode:

yeelight.items:

String og_licht_kueche_tisch_cmd    {channel="miio:generic:04AXXXXE:actions#commands" }
Switch og_licht_kueche_tisch_night

yeelight.rules:

rule "OG Kueche Yeelight NIGHT"
when
    Item og_licht_kueche_tisch_night received update ON
then
  sendCommand(og_licht_kueche_tisch_cmd, 'set_power["on", "smooth", 500, 5]')
  logInfo("Info", "OG Kueche Yeelight NIGHT")
end

rule "OG Kueche Yeelight SUN"
when
    Item og_licht_kueche_tisch_night received update OFF
then
  sendCommand(og_licht_kueche_tisch_cmd, 'set_power["on", "smooth", 500, 1]')
  logInfo("Info", "OG Kueche Yeelight SUN")
end

(John Doe) #388

How could I use this with Alexa? E.g. “Alexa, start cleaning” or something like that?!


(Jordi) #389

Thank you so much OliM, I did my configuration based on yours.

Items

String  ledstrip_scene                          {channel="miio:basic:04XXXXXX:actions#commands"}
Switch  ledstrip_scene_tv "TV Scene" ["Lighting"]
Switch  ledstrip_scene_movie "Movie Scene" ["Lighting"]
Switch  ledstrip_power "TV Light" ["Lighting"]     {channel="miio:basic:04XXXXXX:power"}

Rules

rule "TV Scene ON"
        when
                Item ledstrip_scene_tv received update ON
        then
                postUpdate(ledstrip_scene_movie,OFF)
                postUpdate(ledstrip_power,ON)
                sendCommand(ledstrip_scene, 'set_power["on", "smooth", 500, 1]')
                sendCommand(ledstrip_scene, 'set_ct_abx[2505, "smooth", 500]')
                sendCommand(ledstrip_scene, 'set_bright[100, "smooth", 500]')
end

rule "Movie Scene ON"
        when
                Item ledstrip_scene_movie received update ON
        then
                postUpdate(ledstrip_scene_tv,OFF)
                postUpdate(ledstrip_power,ON)
                sendCommand(ledstrip_scene, 'set_power["on", "smooth", 500, 2]')
                sendCommand(ledstrip_scene, 'set_rgb(28671, "smooth", 500]')
                sendCommand(ledstrip_scene, 'set_bright[80, "smooth", 500]')
end

rule "Scene OFF"
        when
                Item ledstrip_power received update OFF
        then
                postUpdate(ledstrip_scene_tv,OFF)
                postUpdate(ledstrip_scene_movie,OFF)
end

I have used this document to know which commands I could use. Doc Yeelight

It is important to write “2” at the end in order to the ledstrip turns on in RGB mode.
sendCommand(ledstrip_scene, ‘set_power[“on”, “smooth”, 500, 2]’)

If you use “1”, it turns on in warm and cool color mode (CT).
sendCommand(ledstrip_scene, ‘set_power[“on”, “smooth”, 500, 1]’)


(Andrew Pawelski) #391

Use the vacuum channel


(John Doe) #392

could you give me an example? I don´t understand how to state the command…

edit: does the vacuum have to be added to Alexa (smartphone App)? Because it doesn´t find it…


(John Doe) #393

Ok, I tried it this way, doesn´t work for me yet. What I´ve done so far:

  • Installed Alexa skill “openhab” on smartphone.
  • added your rule and your item (changed your SN to my SN)
  • When saying (german) “Alexa, starte Staubsauger” Alexa replies “don´t know Staubsauger”

Any steps I missed?


(Neil) #394

“alexa, discover devices” ?


(John Doe) #395

yes, that´s what I did, but Alexa doesn´t find the Mi Robot. (“no new devices found”)


(Neil) #396

Have you installed the hue emulation binding, and in PaperUI gone to configuration -> services -> hue emulation and set it to pairing enabled?

(i’m not using alexa for my vacuum, but I do use it for other devices).


(John Doe) #397

I have isntalled the Hue emulation, is it needed for the Openhab Xiaomi Robot Vacuum Binding?

Anyway, under configuration -> services there is no “hue emulation” listed.

edit: oh wait, I see it´s not connected, will check…


(Neil) #398

if the hue emulation binding is installed it should be listed there, in the ‘IO’ section.


(John Doe) #399

it´s connected now and online. But, no, it´s not listed in the IO section, just as Thing in the Things section, there is also the robot vacuum listed as online.

edit: Oh, I made a mistake. I have installed the Hue Binding, not the Hue emulation Binding. Is it mandatory for the Xiaomi Robot Vacuum Binding?


(Andrew Pawelski) #400

Its not that hard… just add [ “Switchable” ] to the Vacuum channel - on ON it starts vacuuming on OFF it returns to the dock


(John Doe) #401

I added this line to my home.items:

Switch FF_Cleaner "Staubsauger" [ "Switchable" ] {channel="miio:generic:XXXXXXX:actions#control" }

doesn´t work unfortunately, Alexa says “no Vacuum found”…

edit: I´m getting closer, my openhab.org connection was broken… now I was able to add the vacuum to Alexa!
edit2: Ok, finally managed it, just had to delete a second appearnce of the device in the Things section, now it works.

Thanks @ all


(Nathan Crocker) #402

Hi there !,
Nice work on this Binding (Thank you!)

I have managed to get it working for my Xiaomi Smart Plugs however can be a large delay when using it with Alexa and it seems to be only with this binding setup.

I have a few Bindings that are working with Alexa perfectly with no delays with them. One is the Original Xiaomi Binding which is currently being used for the Gateway, Temp/Humidity sensors and door sensors, I have Alexa turn on the Gateway light and things are instant. I also have an OpenSprinkler (Different Binding) this is also near instant with Alexa. However this binding most times probably (7 out of 10) has a delay of up to 30 seconds (sometimes it is instant but pretty rare) all devices are networked the same (all Wifi connection and the one SSID).

Note: This issue does not present itself when manually triggering the switches…

Any thoughts?


(Andrew Pawelski) #403

There was a cloud connector issue a few days ago that has now been resolved is it still happening?

I have a few wifi plugs and it is near instant