Thanks @cvirag . will try that out. However, I got the source code for the same. here is the 2 java methods that trigger the RGB functionality. Please check if you are able to figure out the MQTT message structure
public void sendRGB(String str, int i, boolean z) {
int i2;
int i3;
int i4 = 10000;
if (this.colors.containsKey(str)) {
MyColor myColor = (MyColor) this.colors.get(str);
i4 = myColor.f616r;
i2 = myColor.f615g;
i3 = myColor.f613b;
} else {
i3 = 10000;
i2 = 10000;
}
if (i < 1) {
i = 1;
}
final int i5 = i > 100 ? 100 : i;
final int i6 = (i4 * i5) / 100;
final int i7 = (i2 * i5) / 100;
final int i8 = (i3 * i5) / 100;
if (!this.colors.containsKey(str)) {
MyColor myColor2 = new MyColor();
myColor2.f614cw = 0;
myColor2.f617ww = 0;
myColor2.f616r = i4;
myColor2.f615g = i2;
myColor2.f613b = i3;
this.colors.put(str, myColor2);
}
final String str2 = str;
final boolean z2 = z;
C116212 r4 = new Runnable() {
public void run() {
byte[] bArr = {40, (byte) (i6 & 255), (byte) ((i6 >> 8) & 255), (byte) (i7 & 255), (byte) ((i7 >> 8) & 255), (byte) (i8 & 255), (byte) ((i8 >> 8) & 255), 0, 0, 0, 0, (byte) i5, 0, 15, 0, 41};
char c = 0;
for (int i = 1; i < 14; i++) {
c = (char) (c ^ bArr[i]);
}
bArr[14] = (byte) (c & 255);
if (!MultipleMQTT.this.isRead(str2)) {
return;
}
if (z2) {
MultipleMQTT.this.sendData(str2, bArr, 0);
} else {
MultipleMQTT.this.sendData(str2, bArr, 0);
}
}
};
new Thread(r4).start();
}
and also
public void sendRGB(String str, int i, int i2, int i3, int i4, boolean z) {
int i5 = 1;
int i6 = i4;
if (i6 >= 1) {
i5 = i6;
}
final int i7 = i5 > 100 ? 100 : i5;
final int i8 = (i * i7) / 100;
final int i9 = (i2 * i7) / 100;
final int i10 = (i3 * i7) / 100;
final String str2 = str;
final boolean z2 = z;
final int i11 = i;
final int i12 = i2;
final int i13 = i3;
C116313 r2 = new Runnable() {
public void run() {
byte[] bArr = {40, (byte) (i8 & 255), (byte) ((i8 >> 8) & 255), (byte) (i9 & 255), (byte) ((i9 >> 8) & 255), (byte) (i10 & 255), (byte) ((i10 >> 8) & 255), 0, 0, 0, 0, (byte) i7, 0, 15, 0, 41};
char c = 0;
for (int i = 1; i < 14; i++) {
c = (char) (c ^ bArr[i]);
}
bArr[14] = (byte) (c & 255);
if (MultipleMQTT.this.isRead(str2)) {
if (MultipleMQTT.this.wifiColors.containsKey(str2)) {
WifiColor wifiColor = (WifiColor) MultipleMQTT.this.wifiColors.get(str2);
if (wifiColor != null) {
if (wifiColor.firmwareytpe != 243 && wifiColor.firmwareytpe != 244 && wifiColor.firmwareytpe != 245) {
return;
}
if (z2) {
MultipleMQTT.this.sendData(str2, bArr, 0);
} else {
MultipleMQTT.this.sendData(str2, bArr, 0);
}
}
}
if (MultipleMQTT.this.colors.containsKey(str2)) {
MyColor myColor = (MyColor) MultipleMQTT.this.colors.get(str2);
myColor.f614cw = 0;
myColor.f617ww = 0;
myColor.f616r = i11;
myColor.f615g = i12;
myColor.f613b = i13;
MultipleMQTT.this.colors.put(str2, myColor);
} else {
MyColor myColor2 = new MyColor();
myColor2.f614cw = 0;
myColor2.f617ww = 0;
myColor2.f616r = i11;
myColor2.f615g = i12;
myColor2.f613b = i13;
MultipleMQTT.this.colors.put(str2, myColor2);
}
}
}
};
new Thread(r2).start();
}