Yeelight 3P Plugin - Beta

This is a basic plugin to control the Xiaomi Yeelight brand of WiFi light bulbs, they currently have a number of bulbs, strips and lamps available with the majority supporting control of WiFi. The plugin has few options and few dependencies, the bulbs support discovery by an SSDP like protocol and as such the plugin can discover the bulbs available on the network using multicast messages.

The plugin will;


The plugin currently is not in the HomeSeer updater however is simple to install, it has a single EXE (HSPI_YEELIGHT3P.exe) and configuration file so can be dropped into the HS folder and it should then appear in your HS plugin interfaces page. Enabling it from here should start the plugin and start the discovery and inclusion process.


A set of devices will be created depending on the device type the plugin discovers, if no devices are created please check the HS log to determine whether or not the plugin has been able to locate devices on your network. If it does not create any devices and you are confident it should then please see the end of this document. When created the devices should appear as following;

You will see that the devices are relatively self explanatory, in summary;

  1. Root Device - Will display ‘Communications Issue’ if there is an issue sending data to the unit, I would suggest looking into the log to see if any errors are explained there, if not see the end of this document.
  2. Control Device - This is fairly easy to understand however there are some slightly subtle matters, ‘On Last Level’ will send the simple power on command to the LED. Depending on the state it was left in depends on what dim value you have set and colours etc. If you have controlled it from outside HS then the devices in HS may be out of date, you will need to wait for the periodic refresh for it to refresh the values. ‘On’ will turn the device on to 100% brightness, ‘Off’ will turn it off. The transition and fade duration devices are relevant here, if fade duration is set (as in this example) to two seconds then it will smoothly turn the device off. If the transition device is set to sudden then it will do it instantly.
  3. CT Colour - This is the colour temperature in degrees Kelvin for the bulb to set itself to, even the colour bulbs will accept a colour temperature so you can set this independently of the RGB device value.
  4. Fade Duration / Transition State - As detailed above, the fade duration will accept a decimal value if you wish to set sub second values (0.5 = 500 milliseconds)
  5. RGB Colour - This is the colour picker device to set the bulb to an RGB colour, if the device is off it will make an attempt to turn the device on first. This is fairly self explanatory.

Colour Flows

The plugin supports some ability to set colour flows to your Yeelight device, the flows can be complex to understand and the HS3 events page (without extensive programming) is not best suited to programming these flows. The flows are a string of values that represent frames of the light states, in the Zip file I have included the Yeelight API documentation. If you look on page 14 of this document you will see the data structure. The HS events page has the ability to send a colour flow in the same format of the documentation, the event action looks like this;

The flow message box will accept data in the same format that the device is expecting in the parameters as detailed in the documentation. This is the example flow (on page 14) copied into the box - please remove any spaces/line breaks first if copying from a document. When you send this it should then send the flow to the bulb. The event action to stop the flow does exactly what it says. More options (such as loading from a text file) may be added in the future.

Known Issues/Problems