Yeelight led ceiling light compatible with HA


It can transfer BLE only devices’ data into Xiaomi Cloud, then you can gain data through Wifi network. Kind of like MQTT broker. Now HA’s approach for BLE devices is catching local BLE communication like what miflora does. But if HA based system is far away from BLE devices since signal is weak, it is hard to get data from device itself. If we can use this built-in function then signal would not be a problem.

There are only few devices with this function supported, such as Yeelight Ceiling Light, Philips Ceiling Light, 2nd Bedside Lamp, Xiaomi Smart Camera and Yeelight AI Speaker.


I found some feedback which states the bluetooth gateway isn’t part of the API right now:


Love it how the Yeelight staff just says “NO”. End of discussion :slight_smile:


Please correct me if I’m wrong, but I don’t think Yeelight desk lamp is officially supported?

Product link

It does work when configured manually, but I don’t think it works through discovery.

Perhaps we can support it officially and make it a bit easier for guys who have it (and update the documentation on Yeelight component, which seems a bit out of date, now that ceiling lights is about to be added to the officially supported ones as well).


Could you provide the mDNS name of the device? I could implement the auto discovery if the value is known.


Hmm if you can show me how I’ll do it of course :slight_smile:
I know the devices IP & Mac but I’ve never searched for mDNS value?
btw. I’m on windows, and HA Raspberry is on


Does your gateway/router provide a list of devices at your local network? Does it provide a hostname next to the IP adress? What’s the hostname? (examples: yeelink-light-ceiling1_[...], yeelink-light-bslamp1_[...])


OK this is what I get: yeelink-light-lamp1_miio61653901


Are you sure the discovery doesn’t work out of the box? You should find the warning “Unknown miio device found” in your log but the light should be discovered nevertheless. I made a pull request to get rid of the warning:


Pretty sure, since I currently have 3 ceiling lamps and 3 “Unknown miio device found” warnings. It should be 4 if there is one for desk lamp.

That said, I just checked the log and I can see this “Failed to connect to bulb, Office Desk Lamp: Bulb closed the connection.”

Although the lamp works just fine, I just tested it.


Uh, now I’m confused. Could you test this “mDNS browser” (or another one):

I want to make sure your device is mDNS discoverable and has this name: yeelink-light-lamp1_miio61653901._miio._udp.local.


Ah, that dropbox link doesn’t work unfortunately :frowning:
Any alternatives for windows? Or even from my Raspberry, but I suppose that’s more complex…


Do you already know how to enter your homeassistant docker container via SSH and docker exec? Do you own miio device and use the xiaomi_miio component? In this case the home assistant system has a console tool installed called “mirobo”. If you execute mirobo discover it will output the desired informations:

$ mirobo discover
INFO:miio.discovery:Discovering devices with mDNS, press any key to quit...
/srv/homeassistant/lib/python3.5/site-packages/miio/ UserWarning: Please consider using python-yeelight for more complete support.
  dev = device_cls(ip=addr)
INFO:miio.discovery:Found a supported 'Yeelight' at - token: 
INFO:miio.discovery:Found a supported 'Yeelight' at - token: 
INFO:miio.discovery:Found a supported 'Yeelight' at - token: 
INFO:miio.discovery:Found a supported 'AirPurifier' at - token: 
INFO:miio.discovery:lumi-gateway-v3_miio52244965._miio._udp.local. @, check token: 
(homeassistant) [email protected]:~ $ 


Yes I can SSH into [email protected] container and/or core-ssh.
I do believe I have miio component installed, my devices work (robot, bulbs etc.)
But if I type “mirobo” it’s just “command not found”. Sorry, total linux noobcake here :frowning:

On the windows side of things, I installed that “Bonjour” and “Mono” as suggested, I’m still reading on how to make it work, can’t make sense of it yet.


OK found a tool for windows for mDNS discovery…this is what it has found (desk lamp doesn’t seem to be amongst them):


Thanks! In this case the desk lamp cannot be auto discovered at the moment. As far as the lamp shows up (after a firmware update) in your bonjour browser please contact me! :slight_smile:


Sure will :slight_smile:
Thanks a lot!


I’ve added the desk lamp to the list of supported devices and left a note:



In the meantime I got official response from the Yeelight staff as well:

First. thanks for choosing our products :slight_smile:
However, mDNS is not integrated into Desk Lamp and likely will not be in the future - due to resource issue. There are not many free bytes of ram left on the device and we are avoiding to stuff in any heavy feature so as not to make the whole system unstable.


Hi syssi,

just reporting back about the moon mode. I used it now for some days and did not encounter any problems. Everything works, no errors - great work!
Thank you very much.

Cheers and hagd!