Yeelight LED Bulbs (RGB and White Bulbs)

I have 7 yeelights now and have had them running for about 6 months. After a recent discussion on the GIT chat I thought I would put together some information on these bulbs. I encourage others to contribute their information also as I am certainly not the expert.

Anyone reading the thread linked below might be turned off by the 300+ posts and give up trying to find some solid information. Hopefully this thread will provide some current information and some basic ‘how to’.

Home Assistant Support:

As of Home Assistant (HA) Version 0.38.0 the Yeelight component has been working for both my “white” and “RGB” bulbs. Per the component page models YLDP01YL, YLDP02YL and YLDP03YL have been tested.

These bulbs do not require a hub or other equipment to work with Home Assistant other than a Wifi router. They work off of Wifi. You will need a smartphone with the Yeelight app to setup the bulb and connect it to your homes Wifi. After initial connection and setup the app and an external connection is not needed.

I cannot find the documentation in the release notes but somewhere around 0.40.0 discovery was added for Yeelights so they will automatically appear as entities when you connect them to your Wifi network. When recently rebuilding my HA setup on first startup all 7 of my bulbs appeared so I can confirm this functionality is working well.

Bulb Models and Compatibility:

As mentioned above the following bulbs are supported:

YLDP01YL – White Bulb
YLDP02YL – RGB (Color) Bulb
YLDP03YL – Unknown (don’t have one of these)

Bulbs purchased from Gearbest will be marked 220V and 50Hz. This is fine for most of our friends outside the US, however, the US runs on a 110V 60Hz grid. I am in the US and can report that the YLDP01YL and YLDP02YL will work both in illumination and Wi-Fi connectivity on a 110V 60Hz power system.

My disclaimer to this statement is that I have only used the bulbs listed above and do not provide any sort of guarantee as to the functionality or safe operation of these bulbs on a power system other than what is marked on the bulb.

Indoor & Outdoor Use:
I have three of the YLDP01YL that I use as my porch lights. They are in fully enclosed fixtures but the fixtures are far from weather tight. The bulbs would not see any direct rain/snow but are exposed to the elements. Living in Chicago we had sub zero temperatures over the winter and were in the high 90s over the summer I believe. I haven’t had any longevity issues with my bulbs but they have only been in service for about 6 months.

All of my other bulbs are in lamps inside my house. They have good ventilation and are a climate controlled environment. The bulb base does get a bit warm with use.

Long Term Update (05/26/2020):

Both of my YLDP02YL – RGB (Color) Bulbs have now died. Both were in an indoor environment. Both seemed to get into a strobe effect and would randomly cycle through the colors (sign they have reset) but could not connect to wifi or HA. The Wifi network would appear but could not be connected to and would quickly disappear.

My YLDP01YL – White Bulb have been in outdoor service as my exterior house lights and are doing well. No issues to report.

11 Likes

Purchasing:

I have purchased all of my bulbs from Gearbest. This is a Chinese retailer that sells both the “white” and “RGB” models I have.

White:
http://www.gearbest.com/smart-light-bulb/pp_278478.html

RGB:
http://www.gearbest.com/smart-lighting/pp_361555.html

They are also available on Amazon (US) but are generally more costly.

White:
https://www.amazon.com/YEELIGHT-Equivalent-Smartphone-Controlled-Efficient/dp/B01LRTWQNG/ref=sr_1_2?ie=UTF8&qid=1490733597&sr=8-2&keywords=Xiaomi+Official+Store

RGB:
https://www.amazon.com/Xiaomi-Yeelight-Contral-Smartphone-Android/dp/B01GB5PJTO/ref=sr_1_3?ie=UTF8&qid=1490733597&sr=8-3&keywords=Xiaomi+Official+Store

I have not purchased bulbs from Amazon so I can’t speak to that. However, Gearbest was quick to send e-mails notifying you of your transaction and shipping is decent considering it was coming from China all the way to the US. Shipping speed varies based on the method you choose (and pay for) but shipping is reasonable in my opinion. Tracking can be purchased but if you are in the US it won’t tell you much until the bulb is through US customs and you have a USPS or DHL tracking number. If you don’t mind spending a few extra bucks and want them soon, both of the links above are fulfilled by Amazon so they are coming from an Amazon warehouse and Prime shipping is available.

Gearbest frequently runs promotions on the bulbs so be patient and wait for a sale. While writing this the “white” bulbs listed above are ~$12 and the “RGB” version was ~$17. They are a good deal when on sale, when at normal price other bulbs are pretty competitive.

4 Likes

Installation and Setup:

I hope you don’t need instruction on how to install a light bulb, screw it in and give it power, it should light up once it has power. Only power up one bulb at a time and follow the connection procedure. If you have multiple it can be hard to figure out which bulb hotspot you want to connect to.

If at any time during install or the life of the bulb you need to ‘reset’ the bulb back to factory conditions simply power cycle the bulb 5 times. Afterwards the “white” bulbs should flash or pulse to show they have been reset. “RGB” bulbs will cycle through colors to show it has been reset.

Download the “Yeelight” app from your respective app store. There is also a Xaomi home app that may come up, somewhere in the 300 post thread I linked earlier someone had trouble with that app so I recommend the “Yeelight” app.

Before starting the App connect to your homes wifi that you want the Yeelight to use. This will allow the App to automatically select the Wifi to connect to and makes things a bit easier.

Initial Setup:
Follow any prompts to sign in or create an account (I am already logged in and don’t want to create another account so no screenshots, sorry)

I don’t recall if the app will automatically put you on the add device screen or if you have to navigate to it. If you aren’t automatically sent there click the circle in the upper right and select “Add Device”

On the following screen select your respective bulb to add. Either “White Bulb” or “Color bulb”. The other devices are not supported by HA.

On the following screen select “Power On” and then “Next”

The next screen should auto select your Wifi network if you are connected to it on your phone. Supply your password and click next. This is saving your Wifi information to the App which will then connect to the bulbs Wifi hotspot and then the phone can supply the connection information and set things up.

Next you will need to leave the app and go to your settings. Find your bulb in the available Wifi connections and connect to it.

All of my bulbs have had a yeelight or Xaomi related name with a bunch of random characters. It should be obvious what Wifi network is the bulb. After you phone shows it is connected to this new hotspot, return to the app and the app should automatically see it is connected to the bulb and start the connection process. This can take a couple of minutes so be patient. You should see the status bar moving after a minute or so.

Troubleshooting:
If you don’t get progress on the connection status indicator or don’t get a hotspot setup, here are a few things to try.

  1. Be patient, it can take a minute or two.

  2. Return to your wifi settings and double check that your phone is still connected to the Bulbs wifi network that it sets up. I have had my phone disconnect for some reason and reconnecting and returning to the Yeelight app allowed it to finish the setup.

  3. If you can no longer see the Yeelight wifi connection in your phones wifi settings try cycling your phones wifi power. If it still doesn’t show try restarting the Yeelight app. I have had a bulb connect without showing progress or finishing setup.

  4. If all the above fails, cycle the power five times and start the process over.

Assuming everything went well you should have a bulb on the “home screen” of the app. I recommend you change the name of the bulb to something you can reference later and you will also need to likely update the firmware and turn on developer mode. All of these steps can be done by clicking on your bulb name which brings you to the settings screen below.

Selecting a bulb will bring you to the following screen.

Click the three lines in the upper right hand corner which will bring you to the screen below:

Click “Name” to enter a new name.

Then click "Firmware to update the firmware an enable Developer Mode. (Most of my bulbs didn’t have the developer mode available until I updated the firmware.)

Click “Upgrade Now” and you should see it download and install the new firmware. This should take a minute or two max.

Return to the settings screen and select “Developer Mode”

Click the toggle to turn developer mode on.

That it. Your yeelight is ready to be added to HA.

Home Assistant Setup:

As noted above HA will automatically detect your bulbs using the discovery component. I prefer to have discovery off and add devices manually. I find it helpful to have devices listed in my config file and you can name them right there and avoid some clutter in the customize section/file of your config.

As HA will utilize the bulbs IP address to setup the interface I recommend you user your router to provide the bulb a fixed IP. I recommend this for any wifi device you have, it can make troubleshooting much easier and it is also handy when setting up firewall rules.

Follow the configuration instructions at the component page.

My configuration as an example:

lights:
  platform: yeelight
  devices:
      192.168.1.10:
        name: Front Porch Light
      192.168.1.11:
        name: Garage Light Right
      192.168.1.12:
        name: Garage Light Left
      192.168.1.18:
        name: Yeelight RGB1
      192.168.1.25:
        name: Yeelight RGB2
      192.168.1.26:
        name: Living Room Lamp 1
      192.168.1.28:
        name: Living Room Lamp 2

I don’t use the music mode option or save on change option. Also I don’t use the transition option so it defaults to 350 ms which gives a nice fade on/off for normal use. Even without music mode the changes happen instantly to me and I have never had an issue with it not responding after multiple quick changes.

Home Assistant Interface:

All bulbs get an on/off toggle switch on the HA front end. For reference the bulbs listed in the bedroom card are my RGB bulbs and the bulbs under “Exterior” are white bulbs. Turning them on will return the bulb to the last state it was in. If the bulb was red at 100% brightness the last time it was on, it will turn on to red with 100% brightness when the toggle is used.

Both “White” and “RGB” bulbs only have a brightness slider available if the bulb is off. To get to the additional controls click the bulbs name and another card will be presented. Increasing the slider will turn the bulb on to the selected brightness.

If you have two bulbs in close proximity to one another that you want at the same brightness (it looks odd to me to have two lamps at different brightness) add both bulbs to a group and control the brightness via the group. This will sync the settings as both bulbs are controlled via a single selection.

RGB bulbs have additional functionality appear after the bulb is turned on. In addition to the brightness slider a “color temp” slider is provided and a color selector is also available.

Sliding the color temperature slider will move the color temp of the bulb. The extremes are a very warm color that looks almost orange to a very bright color that will appear very blue next to a “soft white” bulb. The selection you see above is the setting I use to match the “soft white” LED bulbs I have in our ceiling fixture that I got at Home Depot.

Clicking anywhere in the color map provided changes the bulb to the color selected. This will override the color temperature selected and use the color selected. You can adjust the brightness before/after using the color picker or color temperature slider. To return the bulb back to a “white” color, just give the color temperature slider a selection.

3 Likes

Notes on Usage:

Color Temperature:
The “White” bulbs are cited as having a 4000K brightness specification. This may appear a bit blue to some, especially when compared to a typical “soft white” bulb. With the RGB bulbs I have been able to match to any other temperature of bulb that I have in the house using the color temperature slider.

Power Consumption:
Power consumption of the white bulb is listed as 8W on the Gearbest site and the RGB comes in a 9W. Pretty common power consumption for a modern LED bulb. I haven’t tested the RGB bulbs but two of the white bulbs plugged into one of my smart outlets measured at 16-17 watts. I assume there is a very small power draw when the bulbs are powered off to keep the Wi-Fi connection up.

Noise Emission:
I use two of the RGB bulbs on the bedside tables in my bedroom. At full power there is a bit of noise from the bulbs. It’s a faint hum or buzz. I don’t generally keep the bulbs at 100% so its not an issue for me. At the 30%ish setting they are normally at I don’t hear anything. My wife has never mentioned anything about the sound, I think I am particularly sensitive to these sounds though.

Yeelight App Notes:

The left image shows how the app looks when my firewall is blocking all the yeelights traffic. Note it says the bulbs are offline and there are no links below the name. In the right image the firewall rule is off and you can see the app reporting the state both graphically and with a “on” and the link is displayed. There is also a power button that you can use to toggle the bulb on/off. If changes are made in the app, HA will sync the setting rather quickly once the app is closed. In my experience you cannot have the app and HA reporting status at the same time.

If you are having connection problems in HA you can check the app to see if the state is reported. I have rarely had issues with the HA component but it is a helpful check to see where the problem lies. You can also check your routers DHCP leases (connections) to see if the light is connected. This is a time when static IP addresses comes in handy as remembering an IP address is much easier than a MAC address.

Brightness:
Output of the White and RGB bulbs is listed at 600 lumens on the Gearbest site. This is a bit lower than many LED bulbs you will find at Home Depot or other big box stores. When putting these bulbs into two lamps my wife noted that they weren’t as bright and asked if they could be turned up more. They are at max brightness but do put out less than what I would consider a “standard” bulb.

“Phoning Home”
These bulbs do “phone home” alot to the Chinese or Korean server that they are connected to. If you want to have the app functionality you need to have this connection active. However, if you don’t want to use the app (after initial setup) you can block the bulbs traffic (both inbound and outbound) and the bulbs will still 100% function with HA.

Loss of Power:
The bulbs will always return to their last state when power is returned. They save all the information (wifi connection and last state) in a power loss. Cycling the power will turn the bulb on. One downside to the bulbs being on a switch is they can be powered off and will show as “Unavailable” in the HA front end. If switched off via a external power switch there is no way for HA to power them on. Once powered back on and connected to Wifi HA will automatically pick up the state and report it.

Lost Connections:
I have had a few of my bulbs that are outside lose connection at one time or another and need a quick power cycle. These bulbs are the furthest devices from my wireless access point. In the 6 months I have had the bulbs outside, I can think of 2 times it has happened.

8 Likes

Automations/Scripts/Scenes:

I am lacking a bit with content for this section. All I really do with my bulbs is turn them on/off through automations/scripts. I would appreciate input from anyone who uses more “advanced” automations/scripts/scenes to post up an example and I will include it here with credit to you. In the mean time I plan to look into a few scripts to set color temp and some notifications with a flashing light for certain items.

#########################################################
#                                                       #
#         TURN ON LIVING ROOM LAMPS AT SUNSET           #
#                                                       #
#########################################################

  - alias: 'Turn On Living Room Lamps'
    trigger:
      platform: sun
      event: sunset
    action:
      service: homeassistant.turn_on
      entity_id: group.living_room_lamps

Note: Out of habit I use “HomeAssistant.Turn_On” when calling a service in automations. When calling a service for the yeelights, “Light.Turn_On” is also acceptable.

3 Likes

This is an example of self shutdown with Yeelight Lamps… useful if you forget to power off your lamps.

alias: Lights Self Shutdown
  trigger:
    - platform: state
      entity_id:
        - light.kitchen__white
        - light.room__nico__rgb
      state: 'on'
      for: '00:20:00'
    - platform: state
      entity_id:
        - light.lounge__door__rgb
        - light.lounge__sofa__rgb
        - light.lounge__window__white
      state: 'on'
      for: '01:00:00'
  action:
    - service: light.turn_off
      data_template:
entity_id: " {{ trigger.entity_id }} "
3 Likes

Thanks for that write up - that was SUPER informative and helpful - well done!! :sunglasses:

Can you speak to some of the reviews on Amazon? Specifically around needing a 220v adapter?

1 Like

I haven’t read the amazon reviews. However I use 220v bulbs on a 110v circuit as noted in the first post of the thread. I’m not an electrician or an Electrical engineer so do your own research.

When I got my bulbs I noticed the 220v rating. I only ordered two at the time and figured might as well test it as I would spend most of the purchase price on shipping if I was to attempt a return.

I put the bulb in an all metal fixture on my concrete floor and gave it a test. After everything seemed to work and nothing exploded I gave them some run time and kept an eye on them. After no issues after extended run time I put them into service.

I would not attempt this with a 110v bulb into a 220v socket.

1 Like

@silvrr - thanks for the heads up and the info! The reason I asked was I ‘think’ I’ve seen something before about needing 220v to be able to power them enough to setup the wifi/bulb initially but afterwards you only need 110v to run them. Here’s one of the reviews form the RGB bulbs…not saying anyone here in this post is right/wrong - just trying to get clarification in case I decide to order one and knowing what I might be up against.

“These MIGHT work for you if you are in the US, JP, CA, TW. While it’s true you need 220V+ to set them up, you’ll also likely need ~150V to them constantly in order for them to even work. Your mileage may vary!”

Well I guess I am one data point that says they work for both setup and running on 110V. I know a lot of people on the forum use these lights so I would ask around or see if anyone else chimes in here.

1 Like

@silvrr - thanks - we’ll see if anyone else chimes in - appreciate your input and data :wink:

anyone have teste the transition configuration on this lamps? for me don’t work

I tested and it’s works ok. I have 2 white bulbs. I try with brightness but I have and error.

#light
light:

  • platform: yeelight
    devices:
    192.168.1.78:
    name: Yee2
    transition: 3000
    192.168.1.79:
    name: Yee1
    transition: 2000

Can you select color and brightness in the configuration/automation?
thanks

In the front end you get a brightness slider (all bulbs) and color picker (RGB bulbs) See below for an example.

In automations/scripts/scenes I know it is possible to choose brightness and color but haven’t implemented that yet so I don’t have any examples.

1 Like

In the front end work nicely but I would like to make some automation like if I activate the motion sensor than the light should turn on white and at 50% (just an example…)… any ideas on how to write that?
Thanks a lot

To turn on the light:

- service: light.turn_on
  entity_id: light.yeelight_color_bulb_salon
  data:
    brightness: 60
    rgb_color: [255,0,255]
    color_temp: 240
    transition: 5

To turn off the light:

- service: light.turn_off
  entity_id: light.yeelight_color_bulb_salon
  data:
    transition: 5

If you have some lights in group to turn on/off group use service: homeassistant.turn_on or service: homeassistant.turn_off.

2 Likes

Hi

I got som problems regarding change the rgb value of my yeelight in automation. the light turns on, but the rgb state is not correct, and it throws an error.

2017-05-10 20:40:00 ERROR (Thread-8) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_default at 0x7f53800c9048>: {'code': -5000, 'message': 'general error'}

Turn on light:

   - service: light.turn_on
   entity_id: light.living_room
   data:
     brightness: 20
     rgb_color: [2, 0, 238]
     color_temp: 154
     transition: 5

State returned:

brightness: 17.85
rgb_color: 255,67.92041905680745,0
color_temp: 154.01201293700908
friendly_name:
Living room
min_mireds: 154
max_mireds: 500
supported_features: 59

Try dropping the color _temp line. If the rgb_color: is the color you want then there is no need for the color temp to also be specified. In addition, the two may be conflicting.

Is there a way to transition from 0 brightness to 255 when bulb gets power?