         if(atoi(p.id) == atoi(deviceId)) {
           statePending = true;
           ledStateInterval = blinkFast;
+          eighty_twenty = false;
           // digitalWrite(ledStatePin, HIGH);  
         } else {
           ledStateInterval = blinkSlow;
           statePending = true;
+          eighty_twenty = true;
         }
         
         

char XBeeInString[50];

unsigned int ledStateInterval = 500;
unsigned int blinkFast = 500;
unsigned int blinkSlow = 1500;
unsigned long randomDelay = 0;
unsigned long start_time;
unsigned long end_time;
unsigned long toggle_time;
unsigned long signal_time;
unsigned long pendingThreshold = 10000;

#define statusOff 0
#define statusPending 1
#define statusOn 2

    end_time = millis();

    if(end_time - toggle_time > ledStateInterval) {
      if (eighty_twenty) {
        if (digitalRead(ledStatePin)) {
          digitalWrite(ledStatePin, 0);
          bucket = 0;
        }
        else if (bucket == 20)
          digitalWrite(ledStatePin, 1);
        else
          bucket++;
      }
      else {
        digitalToggle(ledStatePin);
      }
      toggle_time = millis();
    }
  } 
