 uint16_t transitionDelay = 1500;
 boolean ota_lock = false;
 boolean only_ap = false;
-int led_amount = 16;
-int buttonPin = 3; //needs pull-up
+uint8_t led_amount = 16;
+uint8_t buttonPin = 3; //needs pull-up
 boolean buttonEnabled = true;
 String notifier_ips[]{"10.10.1.128","10.10.1.129"};
 boolean notifyDirect = true, notifyButton = true, notifyForward = true;
 boolean receiveNotifications = true;
 uint8_t bri_n = 100;
+uint8_t nightlightDelayMins = 60;
+boolean nightlightFade = true;
+
+double transitionResolution = 0.05;
 
 //Internal vars
 byte col_old[]{0, 0, 0};
 byte col_t[]{0, 0, 0};
 long transitionStartTime;
+long nightlightStartTime;
+float tper_last;
 byte bri = 127;
 byte bri_old = 0;
 byte bri_t = 0;
 byte bri_last = 127;
 boolean transitionActive = false;
 boolean buttonPressedBefore = false;
-int notifier_ips_count = 2;
+int notifier_ips_count = 0;
+String notifier_ips_raw = "";
+boolean nightlightActive = false;
+
 
 NeoPixelBus<NeoGrbFeature, NeoEsp8266Uart800KbpsMethod> strip(led_amount, 1);
 

    int i = server.arg("TDLAY").toInt();
    if (i > 0) transitionDelay = i;
  }
  saveSettingsToEEPROM();
}


    server.on("/edit", HTTP_PUT, handleFileCreate);
    server.on("/edit", HTTP_DELETE, handleFileDelete);
    server.on("/edit", HTTP_POST, [](){ server.send(200, "text/plain", ""); }, handleFileUpload);
    server.on("/down", HTTP_GET, down);
    server.on("/cleareeprom", HTTP_GET, clearEEPROM);
    //init ota page
