      
       aJsonObject *poIsTimerOn = aJson.getObjectItem(poPinVals, "is_timer_on");
       if (poIsTimerOn)
-        g_aPins[i].is_timer_on = poIsTimerOn->valuebool;  
+      {
+        g_aPins[i].is_timer_on = poIsTimerOn->valuebool; 
+        if(g_aPins[i].is_timer_on)
+          g_aPins[i].timer_start_time = millis();
+      } 
 
       aJsonObject *poTimerValue = aJson.getObjectItem(poPinVals, "timer_value");
       if (poTimerValue)

  {
    if( !g_aPins[i].is_input ) // Process output pins
    {
      if( g_aPins[i].is_analog ) // Process analog pins      
        analogWrite(i, getTotalPinValue(i)*ANALOG_OUT_MAX_VALUE );
      else // Process digital pins     
        digitalWrite(i, getTotalPinValue(i) );
    }
  }
}

  float value;
  int is_timer_on;
  float timer_value;
  unsigned long timer_start_time;
  int damping;
  int prev_damping;
  boolean connections[TOTAL_NUM_OF_PINS];
