public void ChangeKeyboard() { var colors = new ColorBuffer[] { Section1, Section2, Section3, Section4 }; KeyboardModel myKeyboardModel = new KeyboardModel { function = "SetEffectALL", mode = "Lighting", effect = "Single", light = Dim, speed = "0", direction = "None", nv_save = "NOT_SAVE", backgroundcolor = 1, alphabet = "", solution = 0, level = 0, powerstatus = 1, type = 0, color = new Color() { isCircular = true, ColorBlocks = colors.Count(), ColorBuffer = colors } }; mQTTDatsService.PublishTopic("Keyboard/Ctrl", myKeyboardModel); }