Homey Community Forum

Xiaomi Mi Home App for Yeelights & Mi Home WiFi devices


Control Xiaomi Mi Home Wi-Fi devices and Yeelights

App Store Page: https://apps.athom.com/app/com.xiaomi-miio


Use Homey to control Xiaomi Mi Home devices (the Mi Home Ecosystem is also branded as MiJia). Currently Xiaomi does not officialy support controlling most of it’s devices from outside the Mi Home app with the exception of Yeelights. Yeelights can be added to Homey quite easy but for all other devices additional steps are needed that require technical skills setting up. These steps are described in the readme in the app store but Xiaomi can make changes to it’s eco system at any time resulting in devices that can not be added or controlled by Homey anymore.

This app uses an unofficial library called the miIO Device Library for communication with those devices whoch lack official support for controlling externally, credits go out to the author of this library. This Homey app also only adds support for the devices that can be controlled directly through Wi-Fi, there is a whole range of Mi Home sensors that can only be used together with the Xiaomi Smart Home Gateway (which uses ZigBee) but this is currently out the scope of this app.

Adding Yeelights

This Homey app supports direct control for Yeelights. Before being able to add your Yeelights as devices in Homey you will need to enable the “Developer Mode” or “LAN control” in the official Yeelight app. You can do this by using the official Yeelight app on your smartphone (not the Xiaomi Mi Home app but the actual Yeelight app). In this app go into the settings of your bulb and you will see a menu item called Developer Mode. This contains a toggle to enable the developer mode. After enabling this the Homey app will be able to autodiscover your bulb when adding it as new device.

Adding miIO devices

For Homey to be able to communicate with devices over the miIO protocol a unique device token needs to be obtained. Technical knowledge is needed for retrieving these tokens. If your are not to tech-savvy using this app for any other devices than the Yeelights might be challenging. See the instructions here on retrieving device tokens.



v2.13.1 - 2019-10-14

  • Small changes for Homey Energy Manager (firmware > 3.x)

v2.13.0 - 2019-10-06

  • NEW: add support for Xiaomi Mi Fan (ZhiMi and Dmaker models)

v2.12.2 - 2019-08-14

  • FIX: possible fixes on ocassional crashes related to network connectivity of Miio device and Yeelights
  • FIX: better checks for setting capabilities on Yeelights (make sure a Yeelights has that capability)

v2.12.1 - 2019-07-24

NEW: add support for new model Airpurifier 2H

v2.12.0 - 2019-07-14

  • NEW: re-added support for the Philips Eyecare lamp
  • FIX: added night mode to Yeelight Meteorite (use the custom color and brightness card to change the ambilight)

v2.11.11 - 2019-06-21

  • FIX: fix for support for Yeelight Meteorite

v2.11.10 - 2019-06-07

  • NEW: add support for the Xiaomi Robot Vacuum Cleaner S6

v2.11.9 - 2019-05-21

Fix action card for setting LED display brightness of Air Purifier and Humidifier2

v2.11.8 - 2019-05-10

  • NEW: add action card for setting LED display brightness of Air Purifier and Humidifier2
  • IMPROVEMENT: deprecated duplicate on / off action cards for Air Purifier and Humidifier 1 & 2

v2.11.7 - 2019-05-05

  • FIX: possible fix for app crashes related to connection problems with Yeelights
  • FIX: possible fix for app crashes related to connection problems with miio devices
  • FIX: fix for app crash when user not defines vacuum cleaner coordinates for zone cleaning correctly

2.11.6 - 2019-04-16

  • FIX: update night mode capability when ceiling light is controlled by external source

v2.11.5 - 2019-04-14

  • NEW: support for Yeelight Meteorite Pendant Light (YLDL01YL)
  • NEW: condition card for night mode for Yeelights that support this feature

v2.11.4 - 2019-03-03

  • FIX: fixed a bug in the pairing of Yeelights which was introduced in the previous release

v2.11.3 - 2019-02-28

  • FIX: fixed a bug in the pairing of Yeelights which was introduced in the previous release
  • NEW: added functionality for automatically updating a Yeelight IP address when a change has been detected (when using DHCP instead of statip IP for instance)

v2.11.2 - 2019-02-25

  • NEW: settings Yeelights to 0% dim will turn them off, also within the change dim over time card (except for the JIAOYUE ceilight which will toggle night mode when set to 0% twice in 5 seconds)
  • IMPROVEMENT: changed callbacks to promises for Yeelight driver
  • IMPROVEMENT: moved Yeelight settings from data to settings object to prevent issues when re-pairing without restarting the app

v2.11.1 - 2019-02-11

FIX: solve app crash related to philips light bulbs

v2.11.0 - 2019-02-07

  • FIX: improvements to pairing templates for firmware 2.x
  • FIX: code refactoring in drivers (replace callbacks with promises)

v2.10.0 - 2019-01-30

  • NEW: add waterlevel capability to Xiaomi Humidifier V2 including trigger card
  • FIX: fix setting speed for favorite mode on Air Purifiers

v2.9.5 - 2019-01-22

FIX: some more error handling to avoid app crashes

v2.9.4 - 2019-01-16

FIX: better error handling to avoid app crashes

v2.9.3 - 2018-11-28

  • FIX: fix for Xiaomi Philips Zhirui Downlights

v2.9.2 - 2018-11-28

  • NEW: added support for Xiaomi Philips Zhirui Candle Lights (PR from rdvanbuuren)

v2.9.1 - 2018-11-17

  • NEW: added meter_power capability for Mi Power Strip (PR by fantomnotabene)
  • UPDATE: support for the latest model AirPurifier 2S
  • POSSIBLE FIX: possible fix for Yeelight discovery on different subnets
  • FIX: code refactoring (PR by fantomnotabene)

v2.9.0 - 2018-10-06

  • NEW: add homealarm state capability for Xiaomi Gateway (state does not get synced when changing it through the Mi Home app yet)
  • FIX: keep custom capability night_mode for specific Yeelights in sync when changed through Yeelight / Mi Home app

v2.8.3 - 2018-09-09

  • FIX: fixed a bug with powered on|off condition cards for the air purifier and humidifier
  • FIX: better error handling when miio device can not connect

v2.8.2 - 2018-09-05

  • FIX: fixed bug with return to dock action card for Vacuum Cleaner
  • FIX: fixed where the Vacuum Cleaner always shows as charging even thought the battery is full
  • IMPROVEMENT: better error catching in polling mechanism for miio devices
  • UPDATE: removed support for Philips Eyecare since there is a bug in the miio library for this device (see https://github.com/aholstenson/miio/issues/145)

v2.8.1 - 2018-08-22

UPDATE: updated app manifest to include id of new forum support topic

v2.8.0 - 2018-07-24

  • NEW: support for Yeelight White Tunable (V2) and Yeelight Color V2
  • NEW: add action card for Xiaomi Mi Robot to send the robot to a specific target (see instructions)
  • NEW: add action card for Xiaomi Mi Robot to do a zone(s) cleanup (see instructions)
  • FIX: fix temperature range for Yeelight color bulbs

Thanks for the heads up of the new forum - might have missed it if not for your post @Phuturist!

Concerning Roborock S50 (version 2)

I have an issue where homey looses contact to the vacuum. Each time you’ve published an update, the vacuum has started to report status changes etc again for a few days, then it suddenly stops and I cannot neither retrieve status changes nor control it. I will from now on try to restart homey / xiaomi mi home app to see if it solves the problem or not.

Is this an issue others are familiar with?

Well, there is an issiue with the miio library that causes time outs when sending commands. This might be related. When you think it has lost connection, have you tried sending the same command like 8 - 10 times in a row to see if one of them eventually gets through.

The issue is registered here: https://github.com/jghaanstra/com.xiaomi-miio/issues/27

Since I’m in love with my Yeelights I bought an Homey to connect them.
Unfortunately the Ceiling light is not working properly. It’s missing some fine tuning.
When I try to set Night mode in a flow the lowest setting is way higher then the lowest setting in the Yeelight app. For example in the Yeelight app the light can be set like real moonlight, bright enough not to bounce your head on a door and dark enough to fall asleep easily.
My light is the Yeelight LED Ceiling Light, modell number YLXD01YL.
I would be grateful if you could help me/us with this issue.

Hello Geurti, I have looked at the code but did not find anything that could cause this. I did not write the code for the night mode myself though. I’ll ask the author of the code if he is able to explain this and will let you know.

1 Like


Thanks for awesome work with the app! I have a problem sending the ”go to dock” command from homey to my Roborock.

The roborock either doesn’t react or just stops mid-room without a word. Is this a known problem?

There is an issue with the miio library which causes send commands to time out. See https://github.com/jghaanstra/com.xiaomi-miio/issues/27.

The vacuum cleaner not returning to the dock when requested but stopping instead is not a know problem. Which version of the vacuum cleaner are you using?

S50 (the white roborock)

I can get the ”on” command to work even if I have to send it more then once. But dock just won’t work.

To avoid disappointment when buying a desk light, in the App description is written that the Eyecare Lamp 2 is supported, but untested. I own one and it is not supported by the App.

Thanx, I need to update that. It’s related to a bug in the miio library which has been reported here: https://github.com/aholstenson/miio/issues/145

Hopefully that bug will get squashed!

Before ordering a non supported light, could someone please tell me which Yeelight Ceiling light is supported. There seem to be a lot of different versions.


They are all suported. Yeelights have an open API, I have written support for this myself and dont depend on a 3rd library like miio.

Thanks for the conformation Jelger!


Can someone tell me wich version(s) of the xiaomi gateways are supported, and what I can do with it using this app? There are 3 versions of it currently…

Probably all gateways are supported but only the led ring. From the app description:

  • Xiaomi Gateway Light - alarm not supported yet and subdevices are supported directly with the Xiaomi ZigBee app (tested)

Aaaah now I get it. Its only the light that is working… Thanks!


Nu vraagt de Homey voor het koppelen het ip adres een token en een polling.
Ip adres check
Token die weet ik niet.
Polling die weet ik ook niet.

Wie kan mij helpen? Heb wel wat gelezen over de token. Maar wordt daar niet echt wijzer van. Graag in jip en Janneke taal.

Alvast bedankt

1 Like