YeelightAPI - a simple Java library which helps you to work with your Xiaomi Yeelight devices via network.
public class Main
{
public static void main(String[] args)
{
YeelightBulb bulb = new YeelightBulb("192.168.0.100");
bulb.setRGBColor(255, 255, 255); //Set bulb white color
bulb.setBrightness(25); //Set brightness to 25%
}
}
For more info use Wiki page of API documentation.