

void LoadEepromValues (){
  EEPROM.get( 200, UserColor.red);
  if (UserColor.red > 255){UserColor.red = 255; EEPROM.put(200, UserColor.red);}
  EEPROM.get( 208, UserColor.green);
  if (UserColor.green > 255){UserColor.green = 255; EEPROM.put(208, UserColor.green);}
  EEPROM.get( 216, UserColor.blue);
  if (UserColor.blue > 255){UserColor.blue = 255; EEPROM.put(216, UserColor.blue);}
  EEPROM.get( 224, NightLightColor.red);
  if (NightLightColor.red > 255){NightLightColor.red = 255; EEPROM.put(224, NightLightColor.red);}
  EEPROM.get( 232, NightLightColor.green);
  if (NightLightColor.green > 255){NightLightColor.green = 0; EEPROM.put(232, NightLightColor.green);}
  EEPROM.get( 240, NightLightColor.blue);
  if (NightLightColor.blue > 255){NightLightColor.blue = 0; EEPROM.put(240, NightLightColor.blue);}
  EEPROM.get( 248,AlarmColor.red);
  if (AlarmColor.red > 255){AlarmColor.red = 0; EEPROM.put(248, AlarmColor.red);}
  EEPROM.get( 256,AlarmColor.green);
  if (AlarmColor.green > 255){AlarmColor.green = 255; EEPROM.put(256, AlarmColor.green);}
  EEPROM.get( 264,AlarmColor.blue);
  if (AlarmColor.blue > 255){AlarmColor.blue = 255; EEPROM.put(264, AlarmColor.blue);}
  
  // Leave some space for future color defs if needed
  EEPROM.get(272, DayTime_SOD);
  if (DayTime_SOD > (unsigned long)86400){DayTime_SOD = (unsigned long)25200; EEPROM.put(272, DayTime_SOD);}
  
  EEPROM.get(280, NightTime_SOD);
  if (NightTime_SOD > (unsigned long)86400){NightTime_SOD = (unsigned long)68400; EEPROM.put(280, NightTime_SOD);}
  
  EEPROM.get(88, MaxDayUserOnTime_SOD);
  if (MaxDayUserOnTime_SOD > 3600*3){MaxDayUserOnTime_SOD = 3600; EEPROM.put(288, MaxDayUserOnTime_SOD);}
  
  EEPROM.get(96, MaxNightUserOnTime_SOD);
  if (MaxNightUserOnTime_SOD > 3600*8){MaxNightUserOnTime_SOD = 1800; EEPROM.put(296, MaxNightUserOnTime_SOD);}
  
  EEPROM.get(104, UserFadeUp_s);
  if (UserFadeUp_s > 60){UserFadeUp_s = 5; EEPROM.put(104, UserFadeUp_s);}
  
  EEPROM.get(112, AutoFadeDown_s);
  if (AutoFadeDown_s > 1800){AutoFadeDown_s = 120; EEPROM.put(112, AutoFadeDown_s);}
  
  EEPROM.get(120, WeekdayAlarm_SOD);
  if (WeekdayAlarm_SOD > 3600*12){WeekdayAlarm_SOD = 6*3600 + 1800; EEPROM.put(120, WeekdayAlarm_SOD);}
  
  EEPROM.get(128, WeekendAlarm_SOD);
  if (WeekendAlarm_SOD > 3600*12){WeekendAlarm_SOD = 9*3600; EEPROM.put(124, WeekendAlarm_SOD);}
  
  EEPROM.get(136, AlarmFadeUpTime_s); 
  if (AlarmFadeUpTime_s > 3600*1){AlarmFadeUpTime_s = 600; EEPROM.put(132, AlarmFadeUpTime_s);}
  
  EEPROM.get(144, AlarmAutoOffTime_s);
  if (AlarmAutoOffTime_s > 2*3600){AlarmAutoOffTime_s = 1800; EEPROM.put(140, AlarmAutoOffTime_s);}
   
  EEPROM.get(152, DayModeMaxBrightness_Percent);
  if (DayModeMaxBrightness_Percent > 100 || DayModeMaxBrightness_Percent < 0){DayModeMaxBrightness_Percent = 70; EEPROM.put(148, DayModeMaxBrightness_Percent);}
  
  EEPROM.get(160, NightModeMaxBrightness_Percent);
  if (NightModeMaxBrightness_Percent > 100 || NightModeMaxBrightness_Percent < 0){NightModeMaxBrightness_Percent = 40; EEPROM.put(156, NightModeMaxBrightness_Percent);}
  
  EEPROM.get(168, NightModeMinBrightness_Percent);
  if (NightModeMinBrightness_Percent > 100 || NightModeMinBrightness_Percent < 0){NightModeMinBrightness_Percent = 10; EEPROM.put(164, NightModeMinBrightness_Percent);}
  
  EEPROM.get(176, IsAlarm1On);
  if (IsAlarm1On > 1 || IsAlarm1On < 0){IsAlarm1On = 1; EEPROM.put(172, IsAlarm1On);}
  
  EEPROM.get(184, IsAlarm2On);
  if (IsAlarm2On > 1 || IsAlarm2On < 0){IsAlarm2On = 1; EEPROM.put(180, IsAlarm2On);}
  
  EEPROM.get(192, ProgramDiagnostics);
  if (ProgramDiagnostics > 0 || ProgramDiagnostics < 0)
  {
    ProgramDiagnostics --;
  }
  EEPROM.put(192, ProgramDiagnostics);
  
}

