Xiaomi Robot Vacuum Binding

Tags: #<Tag:0x00007f1826d3f938> #<Tag:0x00007f1826d3f7f8> #<Tag:0x00007f1826d3f5f0>

(Andrew Pawelski) #445

Can anyone confirm that the tokens are gone in the IOS App? I have another wifi plug coming shortly and hope to still get it into OH

(derhelge) #446

On Friday i get my token for my Airpurifier from my iphone via unencrypted Itunes Backup without any problem.

(Marco Geh.) #447

Hi Guys and especially Marcel,

i only want to say thank you for the great work. I’m a greenhorn / noob in OH and i successed installig and using the binding and with the sample text i could create my first sitmap. Great people & community!

Best, Marco

(frest) #448

Are there any news about the colors? I am using the binding with the vacuum, the air purifier and different yeelight. Everything works well, but I can’t change the color . All bulbs are blue now… :smile:

(Pedro Fiol) #449

Interesting. I thought I was the only one having that problem… We may have a bug here :slight_smile:

Any clue, anyone?

(Salexes) #450

Hello @Anthrax,

did you managed to get the JIAOYUE 650 added to the binding? I also order that lamp and it is arriving in like 1 week or so and I just wanted to check already on how to import it into openhab.

best regards,

(Anthrax) #451

Hi @salexes,

yes I did manage to add it. It’s just not working with some of the default channels the binding creates (mainly color related).

After having another look at the yeelight API document I found the culprit:

This sort of light has another set of functions which control the ambient ligth and color (bg = background in yeelight’s terms). And since @marcel_verpaalen’s original does’nt seem support these yet I used the fallback ExecuteCommand method from his binding to achieve my main goal…

This is my rules section (I control the lamp with an aqqara double switch):

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:ch1" triggered SHORT_PRESSED

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:ch2" triggered SHORT_PRESSED

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:dual_ch" triggered SHORT_PRESSED

@marcel_verpaalen: Did you ever tried dynamic Channel creation upon discovery? My suggestion would be to implement all these functions from the screenshot above generically and then pick just the supported ones (see bold line below) when the thing gets created? Might this be possible? I’d be more than willing to lend a hand…

HTTP/1.1 200 OK
Cache-Control: max-age=3600
Location: yeelight://
Server: POSIX UPnP/1.0 YGLC/1
id: 0x000000000015243f
model: color
fw_ver: 18
support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb
power: on
bright: 100
color_mode: 2
ct: 4000
rgb: 16711680
hue: 100
sat: 35
name: my_bulb

best regards

(Smhgit) #452

Is Xiaomi Vaccum Cleaner V2 is supported by Xiaomi Binding?



(Salexes) #453

thank you for your answer @Anthrax !

I am quite a newbie, could you maybe tell me where I need to modify files in order to get this device supported ? Or could you maybe send me the modified files ?

Best regards,

(marcel) #454

@smhgit yes, it appears so for basic functionality. Specific v2 functions are not supported (e.g. mobbing and area cleaning). The commands for those new functions are not clear yet

(marcel) #455

@Anthrax yes, basically all channels are already generated dynamically, but based on a ‘database’ entry.
Take a look at this file, maybe you can propose the additions you would like

(Anthrax) #456

Yeah, I’m already on it…
I have been digging deep yesterday but hit a road block with color conversation… On the weekend I might be able to make more progress. Pull request is coming up as soon as possible (full time job, double daddy).

What I meant by dynamically, was basically to create the database file from the discovery response automatically :wink:

(Anthrax) #457

No worries, the lamp will work out of the box with @marcel_verpaalen’s binding.
And as soon as I’ll put on the finishing touches ambience color and temperature should also be working.

Just hang in there :blush: I have it working on my setup. Just needs some refinement and code cleanup.

[UPDATE]: @marcel_verpaalen pull requested :wink:

(Udo) #458

Does it make sense that the Xiaomi IO Binding discovers the Xiaomi Smart Home Gateway?

I recently bought a Xiaomi Smart Home Gateway V3 to connect:

  • motion sensors
  • smoke sensors
  • water leak sensors …

I’ve installed the Xiaomi Smart Home Binding additionally to the Xiaomi IO Binding - which I’m using for the robot.

Now I’ve had some difficulties and confusion during auto discovery of the Xiaomi Smart Home Gateway V3.
Because the Xiaomi IO Binding discovered the gateway and the Xiaomi Smart Home Binding not.

Does it make sense that the Xiaomi IO Binding discovers the gateway?
Can I use the gateway with that binding?

(marcel) #459

@BigMountainSki indeed it may discover it, as I believe the gateway is using the same protocol.
However, I would be very surprised it you could control the devices. (you might be able to send raw commands to it)
For controlling devices the mi home binding is developed.

(marcel) #460

today new release


  • Improved yeelights color & Yeelight LED Ceiling Lamp v4 many thanks to @Anthrax & @DaAndy
  • Added humidifier
  • Hack for fixing corrupt json from some devices

(frest) #461

Thanks for the update, changing the color is now working! Saturation works as well, but if I change the Brightness, it turns blue again… (miio:generic:brightness works)

(Mark) #462

Hey @marcel_verpaalen

I was looking at a thread dump of my OH system (using the threads command in the Karaf console), and noticed that there were a large number of these threads blocked on a datagram socket receive. My system has been up for 67 days and there was somewhere around 1650 of these threads in BLOCKED state. That’s one thread per roughly 60 minutes of uptime. Any idea why that would be the case?

"Thread-302" Id=5722 in BLOCKED on lock=java.net.DatagramSocket@4d93ddf6
     owned by Thread-5909 Id=418006
    at java.net.DatagramSocket.receive(DatagramSocket.java:729)
    at org.openhab.binding.miio.internal.discovery.MiIoDiscovery$ReceiverThread.receiveData(MiIoDiscovery.java:268)
    at org.openhab.binding.miio.internal.discovery.MiIoDiscovery$ReceiverThread.run(MiIoDiscovery.java:255)

(Salexes) #463


I have one question. Currently I am using the Xiaomi Mi Smart Home Binding (binding-mihome - 2.2.0) to manage my Xiaomi devices.

When I install the Xiaomi Mi IO Binding now, will they interfere with eachother or will that be no problem ?

Kind regards,

(Udo) #464

@marcel_verpaalen thanks for the answer.
The me home binding had some difficulties to discover.
I thought maybe there is a concurrency between these two bindings.
But if nobody else has these minor problems it’s not worth dealing with.