This is a lightweight class for communicating with the MiLight/LimitlessLED/AppLamp WiFi box.
Usage
const MiBoxConnection = ; //create the connectionconst ip = "192.168.1.5";const port = 5987; //optionallet miConnection = ip port; let group = 1;let lightType = "rgbww"; //can be "rgbww", "rgbw", or anything else for the defaultmiConnection;miConnection; //brightness can be between 0-100miConnection; //hue can be between 0-255miConnection; //saturation can be between 0-100miConnection; //for rgbww lights, kelvin can be between 0-100miConnection; //the group and lightType arguments are optional//you can also change the default group and lightType like thismiConnectiondefaultLightType = "rgbw"; //default is "rgbww"miConnectiondefaultGroup = 1; //default is 0miConnection;miConnection; //or additionally you can set the rgb of a light,//this will automatically be converted to the right commands using hsvmiConnection;