   lcd.begin();
   lcd.backlight();
   
-  // Set data rate for communication with espXXX
-  com.begin(9600);
-  
-  while (!Serial) ; // wait until Arduino Serial Monitor opens
   setSyncProvider(RTC.get);   // the function to get the time from the RTC
   
   // Set control time
   last_fill_start = millis();
   
-  Serial.begin(9600);
-  Serial.println(FILLTIME_MILLIS);
+  //Serial.begin(9600);
   
   Alarm.timerRepeat(0, CHECK_INTERVAL_MINUTES, 0, CheckWaterOn);            // timer for every fill time    
-  //Alarm.timerRepeat(FILL_INTERVAL, FillTimer);  //For testing with higher frequencey
+  //Alarm.timerRepeat(FILL_INTERVAL, WaterOn);  //For testing with higher frequencey
 
   // Water alarms
-  Alarm.alarmRepeat(0,00,1, FillTimer);  
-  Alarm.alarmRepeat(6,00,0, FillTimer);
-  Alarm.alarmRepeat(12,00,0, FillTimer);
-  Alarm.alarmRepeat(18,00,0, FillTimer);
+  Alarm.alarmRepeat(0,00,1, WaterOn);  
+  Alarm.alarmRepeat(6,00,0, WaterOn);
+  Alarm.alarmRepeat(12,00,0, WaterOn);
+  Alarm.alarmRepeat(18,00,0, WaterOn);
   
   // Light alarms
   Alarm.alarmRepeat(light_time_on[0], light_time_on[1], light_time_on[2], LightOn);
   Alarm.alarmRepeat(light_time_off[0], light_time_off[1], light_time_off[2], LightOff);
 
-  // Com startup
+  // Set data rate for communication with espXXX
+  com.begin(9600);
   com.print("\r\n\r\n\r\nrequire('main').main();\r\n\r\n\r\n");
   
   // Make sure light is on/off as planned by the hour


void sendData(String value)
{
  static long last_transmit = millis();
  if ((millis() - last_transmit) >= 1000)
   { 
    com.print("set-property " + value + "\r\n");
    last_transmit = millis();
   }
}

void checkLight()

  CheckWaterOn();
  CheckButtons();
  digitalClockDisplay();
  Alarm.delay(0); // o == check all the time
}

// Light On
void LightOn(){
  //Serial.println("Light on, Good morning!");
  Nexa.Device_On(0);
  sendData("id=light value=on");
}

// Light timer
void LightOff(){
  //Serial.println("Light Off, Good nights!");
  Nexa.Device_Off(0);
  sendData("id=light value=off");
}

void ForcedTimer(){
  //Serial.println("ForcedTimer: - turn water on");    
  WaterOn();
}

