Mi Connector (Xiaomi and Yeelight)



I have docker set up and working and I can detect my xiaomi yeelight bedside lamp as not initialised:

When I try and add it its shown in red and no token is being pulled back. I have managed to get the token using PacketSender, but I dont see how I can add the lamp to the database even with this:

Anyone any ideas?

(Chals) #188

Maybe you got the wrong token.
Here is how to get token.

Take that 96 digit key and paste into the following:

Paste in the key as Text / HEX
Function: AES
Mode: ECB
Key: Enter in 32 0’s
Key: 00000000000000000000000000000000
Change output to HEX
Click Decrpyt.

Maybe result is like this.

3 3 6 f 6 1 7 3 5 0 4 2 4 2 4 2
5 5 5 1 4 a 6 f 3 9 6 a 7 1 4 1

(Bogdan Alexe) #189

Is Xiaomi air purifier 2S (zhimi.airpurifier.mc1) supported?


Thanks, I’ll try this once I get home. Once I have the token, how do I use that to get add the lamp to mi connector?

(Chals) #191

Manage Device -> Device List -> Add Button

(Chals) #192

Not yet.
‘zhimi.airpurifier.mc1’ is exact name?
When I add that model in mi connector, I will let you know.


Quick question, does it need to have xiaomi gateway for the mi connector to work? Or gateway is optional?
Thanks for the good work

(Chals) #194

WiFi devices no needs xiaomi gateway.
Zigbee devices needs gateway.

(Bogdan Alexe) #195

Can you offer more info about the API application? I’m trying to rewrite a bit the Vacuum DTH in order to make it more compatible with V2 (differences around fanSpeed) and other smartthings smart apps (like webcore)

(Chals) #196

I don’t know Vacuum V2 has what speed.

It cannot be set variable speed value. It’s just fixed value.

Let me know the log when you set speed on mihome app, ST IDE log show the speed.
ex) balanced(15), power(100)…

(Chals) #197

Install a fison67/mi-connector:test or fison67/mi-connector-arm:test version.
And Update a smatapp.

I added a zhimi.airpurifier.mc1.

(Bogdan Alexe) #198

V2 fan speeds are the following:
101 - Quiet
102 - Balanced
103 - Turbo
104 - Full speed
105 - Mop

(Chals) #199

I added a vacuums2 DTH & updated a smartapp.

Remove vacuums thing first.
Restart Docker.
And if it’s not working, let me know docker log when you set fanSpeed.

(Chals) #200

I uploaded hubitat DTH at github.
You can use the same docker as smartthings.

(roelofk85@gmail.com) #201

Hello Again Fison,

I’m using your connector now for a few month’s and i’m very satisfied!
There is only one thing where i’m strugling with.
I can’t get the IR Remote to work properly.
See attachment.

If i click on “Learn” i see the blue light on the IR remote blinking.
If i’m pointing my original IR remote on the Xiaomi Remote there is nothing happening.
Am i doing something wrong?


(Chals) #202

It is a IR type remote controller?
If it’s a bluetooth or rf, it’s not working with mi remote.

you push a learn button, ir code is just showed up.

Here is sample video.

(roelofk85@gmail.com) #203

It’s an ir remote controller, used it before succesfull with the mi home app.

Press learn and then on the button drom the desired remote.
Nothing happens…

EDIT: It works, had to open the MI Home app, open the Mi Universal remote and it’s working!! :slight_smile:

(Chals) #204

It must be worked without opening mi home app.
Anyway it’s good.

(roelofk85@gmail.com) #205

Another problem, when i try to create a custom device i got a “fail”.

Added the button with succes, but when i click at “Make a custom” this error happens.

(Chals) #206

Do you add a DTH on ST IDE?