SmartThings Community

Mi Connector (Xiaomi and Yeelight)


(Vagelis F ) #331

I checked the log but didn’t find anything valuable and the reason why the sensors say open. On Mi Home they work great.

(Chals) #332

I have a no plan.

(Chals) #333

Password is correct on mariadb & mi connector?
And you need a port (30000) fowarding & ddns settings.

(Chals) #334

I want to see your log file.
Would you send me that file?
My email:

(Matt B) #335

In my case, I have the gen1 vacuum. When its normal schedule kicked off today, it finally came out of initializing. A whole bunch of stats aren’t appearing, but this was mainly a test run before I bought the BT adapter for my Synology NAS and the Flora monitors.

(Barbara Schiavinato) #336

I loved this SmartApp, unfortunately after the last firmware update it doesn’t work for me (air purifier). I’ve investigated and the issue looks coming from miio

(Chals) #337

I also use a zhimi.airpurifier.m1. It’s working well.

You did find a token from db? And register it to mi connector?

(Barbara Schiavinato) #338

Now I’ve followed your instructions and I can add the purifier, I can see al the parameters (temperature, pm2.5, humidity). But it doesn’t execute any command. On the Smartthings live log I can see all the commands, but nothing is executed.

(Chals) #339

Take a look at ip address on mi connector smartapp.

exam) (your raspberry pi local ip: port)

(Barbara Schiavinato) #340

I’ve reinstalled the Smartapp: now it works properly!!! Thanks!!!


I was finally able to resolve this issue and connect to the docker container. I had to add port info to the docker command like this:

docker run -d --restart=always --name=mi-connector -p 30000:30000/tcp fison67/mi-connector:test3


I have now added the IP and token of my vacuum, but nothing is showing up in SmartThings. The Mi Connector webpage also shows the vacuum listed under ‘Not Initialized Xiaomi Devices’.

edit: Seems I know why. Nothing seems to have the correct token.
Android log:
No token listed

miio discover looks like this
Device ID: 4525454354
Model info: Unknown
Address: 192.x.x.x
Toekn: ???
Support: Unknown

rockrobo.vacuum.v1 - Katie - - 192.x.x.x

(Erik Aslaksen) #343

I have followed the great guide and managed to hook up Desk Lamp by using version 5.0.19 of Mi-Home to get the Token. The lamp comes up as Xiaomi Light Mono and it has options to change colors in SmartThings app. Bu the lamp is only able to adjust Color Temp and if I adjust the Color in the app, nothing happens. In Home Assistant this worked as it should even without having a token. Anyone that have the skills to adjust the code to the Desk Lamp is porperly supported - PLEASE :slight_smile:

(Chals) #344

It looks like a wrong server address.
Take a look mi connector web log.
If you don’t see as below, it means dth has wrong address.
Requested to control by ST >> zhimi.airpurifier.m1[{“id”:"",“cmd”:“power”,“data”:“off”}]
Then just remove virtual device on ST & Restart the docker image.
And Server address is [ ip:port ].

(Chals) #345

miio can’t take a token from vacuum.


But it seems nothing works to get the token.

(Chals) #347

Try this.


See my post, I think I did all that.

Edit: I got it. I had to install that specific Android version, then I was able to see the log file and get the token.

(Matt B) #349

Has anyone setup a Bluetooth device with this that could share some wisdom on how they did it? I have the mi-connector docker running on my Synology with a BT adapter seemingly passed through to the Docker and have some Flora sensors en route but with the token and such, I’m a bit confused on how to do this. My best guess so far is to pair it with my phone to get it in the Mi Home app, get the token, set it up in the connector, then pair the sensors with the BT adapter in the docker. I did do a test run with my Xiaomi vacuum and it’s working so the BT part is the only questionable part for me.

(luke) #350

Hi Fision67,

I have been testing mi connector with a Yeelight colour and it seems great !.

I have some Xiaomi/philips zhirui downlights which are wifi. But once i have added them to Mi connector with the token it says this in the log

“This philips.light.downlight is not support now”

I see above it says supported ( Beta version Only ) . Any way of me getting this working ?

Thanks for such a great Product.

Btw when i installed Mi connector via docker on centos 7/VM i couldnt get the maraDB to work correctly so i installed it manually via Yum which worked great ! ( also installed phpmyadmin)

Just incase any one else is having problems with the database not starting/resetting all the time :wink: