Xiaomi Yeelight IPL Color LED WiFi Bulb

Hello, all

I recently purchased Xiaomi Yeelight IPL Color LED WiFi Bulbs. They are very cheap but they don’t have any integration beyond the official app. However, they offer complete local LAN control with good documentation and example code. They should be easy to control via ST Hub. I think someone with programming experience could write up the required “service manager app” and “device type” for this “LAN connected device” in less than a day.

Unfortunately, I don’t have such experience. So I can only offer links to the relevant resources and hope that a generous soul finds the time to do it.

Main website (for info/specs): http://www.yeelight.com/en_US
Developer resources: http://www.yeelight.com/en_US/developer

I tried to sneak my way by coping code from similar devices, but I don’t actually know how to code, and I immediately ran out of depth when I found out that this bulb uses UPnP port 1982 instead of the standard port 1900 to which the ST Hub is listening for device discovery.

Looking forward to hearing from this great community.

Have you seen this?

Of course, I shared the link in my post!
The main problem for me (with little coding skills) is that Yeelight uses port 1982 instead of the standard 1900 for device discovery through ssdp. ST Hub has pre-set command for sending UPnP discovery message in which you only change device type (in this example: wifi_bulb) but I couldn’t find a way to include a custom port, and I don’t have enough skill to override the default ST method or write a custom code for device discovery.

I have my 2 bulbs getting delivered these days. I am going to use them with homebridge and raspberry.
I hope I can find a way to create some sort of link that will give me the chance to add them on Smarttiles. I will let you know how it goes

I contacted Yeelight support and exchanged half a dozen of emails. They say they will consider changing the default UPnP port to 1900, but they didn’t promise anything. They said their priority now is to release IFTTT and openHAB integration, which may help a bit with SmartThings too.

I installed them today with homebridge/raspberry. Lovely to be able to control them with Siri.
Hope there will be a chance to have them under smartthings

@mssaleh can provide the link or tell me where you got the code for similar devices and I’ll try and have a got at it. Would for my Yeelight to work with ST

I tried to search for HubAction or physicalgraph.device.HubAction reference but I couldn’t find any.

There are some good pieces of code in the second half of these pages (from the official documentation):
http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html
http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-device-type.html

I also found a lot of useful examples of LAN-connected devices. Please find them below:
https://github.com/zzarbi/smartthings/blob/master/wd/wd-player-connect.groovy

I also looked into manual IP entry (without any discovery) based on this example:

1 Like

Any movement on this? Im currently using a virtual switch and IFTTT to trigger these lights and its slow to say the least.

Do you use IFTTT with the bulb directly or have you had to buy a hub?

No hub. Just IFTTT

1 Like

Just post an update from their forum… Looks like they’re working on a device handler and have submitted it for approval…

1 Like

This would be fantastic as I’m currently using IFTTT and it’d a little slow. However, reading over the post you linked to, it doesn’t look very promising…

@finalbillybong can you please let me know how you use it with IFTTT. I am planning to buy a couple of these bulbs but unsure how to integrate with smartthings atleast indirectly. Also what do you mean by slow? 5sec? 10sec?

Id say most of the time it is 5 seconds or under.

There is a yeelight channel and a Smartthings channel.

I created a simulated switch in Smartthings for the Yeelight bulb I want to control and in IFFFT:

If (Simulated switch is pressed) Then (Toggle Yeelight bulb)

Thanks very much for the information. Is it possible to set colour temperatures instead of just toggles? I have the below core piston currently controlling my Lifx and hue bulbs. I set the @colourTemp variable 3 times a day to change from 6500 -> 3500 -> 2700 and depending on the time of day, the lights are set to a certain colour temp when turned on.
Would it be possible with the yeelight to set the colour temperature on IFTTT? is there a way to pass this value to IFTTT?

1 Like

I found ifttt should be able to set the color of Yeelight the problem is using a virtual switch in smartthings it cannot be identified as dimmable or color chabgeable, I was thinking to use it with alarms with lights

I believe you can use CoRE to send the commands to IFTTT, but I’m not a CoRE or IFTTT Maker Channel pro (yet).

Oh I tried to use ifttt and a st sensor, when it detects an open status set to a particular color in Yeelight not too bad even if it takes a few seconds

I’ve just read the thred on the Yeelight forums. Please please please Smartthings, just allow the intergration… The devices are fantastic and a fraction of the cost of Hue and LIFX.

I cant afford those bulbs all the time :frowning:

2 Likes