[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

oh, good news … I’ll try.
You could do the same for the lamps yeelight candel as well

I tried to connect the flora to the bluetooth of the raspberry, but continues to give timeout error, I can not connect it.

You trun on bluetooth of raspberry?
Enabled bluetooth on web page?


Let me know entire log

Run this command and then restart docker.
sudo systemctl start bluetooth

I removed the old docker and installed the test version, but even I can’t access the web page

Any SmartApp to automate air purifier? For instance when pm 2.5 rises above 80 start auto mode…

1 Like

Can some one guide me , how to go Mi-connector web menu setup, i need to change the password for db

ive just installed everything, was a bit of work but made it.
i only have some yeelights atm and it was some searching to extract the tokens.

The on/off works instant kudos for that and kudos for making this work(those where the only lights in my house what didnt work tru smartthings and had home assistant setup for those to control) @fison67

wil the hub v3 be supported?

is it possible to have this running om multiple raspberry’s for the range of the miflora’s?

Did you setup a port when you install a docker image?
–net=host

Not yet.
Maybe I’m gonna do it next month…

1 Like

You can not connect web?
ex) http://xx.xx.xx.xx:30000 in you local network

Bluetooth radius is limited.
If you have multiple raspberry pi, just install a mi-connector docker and mi-connector smartapp.

V3 hub is not supported yet.

do i have to adjust the port to another number or can it be 30000 on all the raspberry’s?

Hi @fison67 Got an issue with mi-connector :
when I turn on a device on mihome app, ST gets updated
but it does not work from ST to mihome or the device, it just shows “turning on” and then come back to “off”
thanks for your help

I don’t know what you’re saying exactly…

Web Server is using 30000 port.
54321 port is used for broadcasting.

I recommend that use ‘–net=host’ option when you install docker image.

Hi.
Let me know what device is(WiFi? Zigbee?)

‘turning on’ means that sended command to device.
If device status is not updated quickly from mi connector, it’s just keep previous status at ST app.

( Command : ST app -> Mi connector Docker -> Xiaomi Device. )
( Changed Status : Mi connector Docker request Xiaomi Device every polling time. if something is changed notify to Mi connector Smart app )

Check your polling time. It’s located setup page on mi connector web.
5000 means 5 seconds.

Thanks for your reply
All devices are wifi (LED strip, Yeelight Bulb & gateway)
All token OK & devices initialized
Polling time is 1000

I checked MiConector logs : no incoming command from ST …

It’s normal the reported battery is: -1% in all devices?

First time I installed it, all devices were playing correctly.I think I had also Mi air purifier playing(the one without the LCD screen for air quality)

Then something messed with docker image and db so I removed and re-created them.It connected to mariadb
but automatically didn’t find the gateway and child devices so I input IP and token of gateway v3 and then it found the child devices and imported them to Smartthings.

I have 4 door-window sensors[lumi.magnet.aq2], the gateway offcourse[lumi.gateway.v3],2 aqara buttons[lumi.switch.v2] I have also the new vibration sensor(i have installed the new smartthings device type) and I have also the cube.

So these 2 devices are: lumi.generic.68 & lumi.generic.56, I don’t know which corresponds to cube and vibration. But that isn’t my actual problem.

All 4 door sensors display “Open” and “-1%”.When I hit refresh on ST, they get a percentage like 45% etc
Buttons don’t trigger anything.On the other hand, Xiaomi gateway v3,changes light, shows lux and so on.

On the same time on MI home everything works flawlessly.So it’s like not having a sync?
The only thing I tried is to remove the new motion sensor from mi home and add it again.
When I go to Mi Connector>Manage Devices> [Add Device[ST]] and then I select a device and click “Register”, it pops up a dialog box with “undefined”.

Should I remove one by one the door-window sensors and the buttons from Mi home, so that they can
be synced correctly?@fison67 When you say to remove a device from Mi home, do you mean the child devices of gateway v3 or the gateway itself?

Any ideas?
Thank you.

Moreover there are some typos in the Mi connector,do you want me to send you corrections?

You put in right docker ip address?
Or if docker ip was other thing, just remove things on ST. Thing will be added again on ST.
It looks like that ST sends a command but destination ip is wrong.

I have put the ip of the machine , that is docker’s host.{without the port 30000}
I have portainer to manage docker containers but mi-connector doesn’t show internal ip.

Should I use the internal ip?
in local ip in the smart app, the format would be:
localIP:3000 or
localIP