   int packetSize = Udp.parsePacket();
   if (packetSize)
   {
-    //Serial.print(F("Received packet of size: "));
-    //Serial.println(packetSize);
+    Serial.print(F("Received packet of size: "));
+    Serial.println(packetSize);
 
     // read the packet into packetBufffer
     Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
-    //Serial.print(F("Data: "));
-    //Serial.println(packetBuffer);
-
-    JsonObject root = parser.parse(packetBuffer);
-    if (!root.success())
-    {
-      error();
-      resetPacketBuffer();
-      return;
-    }
-    char* command  = root["command"];
+//    Serial.println(F("Data: "));
+//    Serial.println((int)packetBuffer[0] & 0xFF);
+//    Serial.println((int)packetBuffer[1] & 0xFF);
+//    Serial.println((int)packetBuffer[2] & 0xFF);
+//    Serial.println((int)packetBuffer[3] & 0xFF);
+//    Serial.println((int)packetBuffer[4] & 0xFF);
+//    Serial.println((int)packetBuffer[5] & 0xFF);
+//    Serial.println((int)packetBuffer[6] & 0xFF);
+
+    int command  = (int)packetBuffer[0] & 0xFF;
     Serial.print(F("Got command: "));
     Serial.println(command);
-    if (String("0").equalsIgnoreCase(command)) {
-      processCommand(root["lightData"]);
-    } else if (String("1").equalsIgnoreCase(command)) {
-      processArrayOfCommands(root);
-    } else if (String("2").equalsIgnoreCase(command)) {
-      allOffFade(root["delay"]);
+    if (command==0) {
+      processSingleLightCommand(0);
+    } else if (command==1) {
+      processMultiLightCommand();
+    } else if (command==2) {
+      allOffFade(packetBuffer[1] & 0xFF);
     } else {
       Serial.print(F("Unknown Command: "));
       Serial.println(command);

  memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE);
}

void processCommand(ArduinoJson::Parser::JsonObject root) {
  //Serial.println(F("Sending Command"));
  long lightStringIndex  = root["s"];
  long bulbIndex         = root["l"];
  long colorSelect       = root["c"];
  long r                 = root["r"];
  long g                 = root["g"];
  long b                 = root["b"];
  long brightness        = root["i"];

  // Get the String
  setString(lightStringIndex);

G35String lights_12(G35_PIN_12, LIGHT_COUNT);
G35String lights_13(G35_PIN_13, LIGHT_COUNT_LARGE);

// Enter a MAC address and IP address for your controller below.
byte mac[] = {
  //0x90, 0xA2, 0xDA, 0x0E, 0xAF, 0x5D // Live system
  0x90, 0xA2, 0xDA, 0x0E, 0xAF, 0x5E // Test System
};

unsigned int localPort = 8888;      // local port to listen on
