new wifi mgmt
authorRuss Handorf <rhandorf@handorf.org>
Fri, 22 May 2020 23:48:43 +0000 (19:48 -0400)
committerRuss Handorf <rhandorf@handorf.org>
Fri, 22 May 2020 23:48:43 +0000 (19:48 -0400)
code/sketch_dec10a.ino

index ecdf47dbac4ad9d84d5c98148bf4f06a76742818..e980286700fdf1bbb9648dda03327a8c0a18209d 100644 (file)
@@ -7,6 +7,12 @@
 #include <Adafruit_NeoPixel.h>
 #include <TimeLib.h>
 
+#include <DNSServer.h>
+#include <ESP8266WebServer.h>
+#include <WiFiManager.h>
+
+#include <EEPROM.h>
+
 #define LED_PIN D6
 #define LED_COUNT 6
 
@@ -14,7 +20,7 @@ int utc=0;
 bool displaySwitch=true;
 unsigned int pause = 0;
 unsigned long timeout;
-unsigned long newNTPreq;
+//unsigned long newNTPreq;
 unsigned long secondTick;
 bool dst = false;
 int minTmp;
@@ -24,8 +30,8 @@ uint8_t saturation = 100; // 0-100
 uint8_t lightness = 50; // 0-100
 unsigned int PColor=0;
 
-const char *ssid     = "SSID";
-const char *password = "PASSWORD";
+const char *ssid     = "";
+const char *password = "";
 
 long utcOffsetInSeconds = 3600*utc;
 
@@ -38,6 +44,8 @@ const char data_footer_html[] PROGMEM = {0x3c,0x2f,0x63,0x65,0x6e,0x74,0x65,0x72
 // /body.html
 const char data_body_html[] PROGMEM = {0X3C,0X66,0X6F,0X72,0X6D,0X20,0X61,0X63,0X74,0X69,0X6F,0X6E,0X3D,0X2F,0X20,0X6D,0X65,0X74,0X68,0X6F,0X64,0X3D,0X50,0X4F,0X53,0X54,0X3E,0XA,0X53,0X65,0X6C,0X65,0X63,0X74,0X20,0X79,0X6F,0X75,0X72,0X20,0X74,0X69,0X6D,0X65,0X7A,0X6F,0X6E,0X65,0X3A,0XA,0X3C,0X73,0X65,0X6C,0X65,0X63,0X74,0X20,0X6E,0X61,0X6D,0X65,0X3D,0X75,0X74,0X63,0X20,0X69,0X64,0X3D,0X75,0X74,0X63,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X49,0X6E,0X74,0X65,0X72,0X6E,0X61,0X74,0X69,0X6F,0X6E,0X61,0X6C,0X20,0X44,0X61,0X74,0X65,0X20,0X4C,0X69,0X6E,0X65,0X20,0X57,0X65,0X73,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X31,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X64,0X77,0X61,0X79,0X20,0X49,0X73,0X6C,0X61,0X6E,0X64,0X2C,0X20,0X53,0X61,0X6D,0X6F,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X48,0X61,0X77,0X61,0X69,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X41,0X6C,0X61,0X73,0X6B,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X50,0X61,0X63,0X69,0X66,0X69,0X63,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X54,0X69,0X6A,0X75,0X61,0X6E,0X61,0X2C,0X20,0X42,0X61,0X6A,0X61,0X20,0X43,0X61,0X6C,0X69,0X66,0X6F,0X72,0X6E,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X41,0X72,0X69,0X7A,0X6F,0X6E,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X43,0X68,0X69,0X68,0X75,0X61,0X68,0X75,0X61,0X2C,0X20,0X4C,0X61,0X20,0X50,0X61,0X7A,0X2C,0X20,0X4D,0X61,0X7A,0X61,0X74,0X6C,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X75,0X6E,0X74,0X61,0X69,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X41,0X6D,0X65,0X72,0X69,0X63,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X47,0X75,0X61,0X64,0X61,0X6C,0X61,0X6A,0X61,0X72,0X61,0X2C,0X20,0X4D,0X65,0X78,0X69,0X63,0X6F,0X20,0X43,0X69,0X74,0X79,0X2C,0X20,0X4D,0X6F,0X6E,0X74,0X65,0X72,0X72,0X65,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X73,0X6B,0X61,0X74,0X63,0X68,0X65,0X77,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X42,0X6F,0X67,0X6F,0X74,0X61,0X2C,0X20,0X4C,0X69,0X6D,0X61,0X2C,0X20,0X51,0X75,0X69,0X74,0X6F,0X2C,0X20,0X52,0X69,0X6F,0X20,0X42,0X72,0X61,0X6E,0X63,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X45,0X61,0X73,0X74,0X65,0X72,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X55,0X53,0X20,0X26,0X20,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X49,0X6E,0X64,0X69,0X61,0X6E,0X61,0X20,0X28,0X45,0X61,0X73,0X74,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X41,0X74,0X6C,0X61,0X6E,0X74,0X69,0X63,0X20,0X54,0X69,0X6D,0X65,0X20,0X28,0X43,0X61,0X6E,0X61,0X64,0X61,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X72,0X61,0X63,0X61,0X73,0X2C,0X20,0X4C,0X61,0X20,0X50,0X61,0X7A,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X4D,0X61,0X6E,0X61,0X75,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X6E,0X74,0X69,0X61,0X67,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X33,0X30,0X29,0X20,0X4E,0X65,0X77,0X66,0X6F,0X75,0X6E,0X64,0X6C,0X61,0X6E,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X61,0X73,0X69,0X6C,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X42,0X75,0X65,0X6E,0X6F,0X73,0X20,0X41,0X69,0X72,0X65,0X73,0X2C,0X20,0X47,0X65,0X6F,0X72,0X67,0X65,0X74,0X6F,0X77,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X47,0X72,0X65,0X65,0X6E,0X6C,0X61,0X6E,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X6E,0X74,0X65,0X76,0X69,0X64,0X65,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X64,0X2D,0X41,0X74,0X6C,0X61,0X6E,0X74,0X69,0X63,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X70,0X65,0X20,0X56,0X65,0X72,0X64,0X65,0X20,0X49,0X73,0X2E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X2D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2D,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X41,0X7A,0X6F,0X72,0X65,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X30,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X73,0X61,0X62,0X6C,0X61,0X6E,0X63,0X61,0X2C,0X20,0X4D,0X6F,0X6E,0X72,0X6F,0X76,0X69,0X61,0X2C,0X20,0X52,0X65,0X79,0X6B,0X6A,0X61,0X76,0X69,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X30,0X3A,0X30,0X30,0X29,0X20,0X47,0X72,0X65,0X65,0X6E,0X77,0X69,0X63,0X68,0X20,0X4D,0X65,0X61,0X6E,0X20,0X54,0X69,0X6D,0X65,0X20,0X3A,0X20,0X44,0X75,0X62,0X6C,0X69,0X6E,0X2C,0X20,0X45,0X64,0X69,0X6E,0X62,0X75,0X72,0X67,0X68,0X2C,0X20,0X4C,0X69,0X73,0X62,0X6F,0X6E,0X2C,0X20,0X4C,0X6F,0X6E,0X64,0X6F,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X41,0X6D,0X73,0X74,0X65,0X72,0X64,0X61,0X6D,0X2C,0X20,0X42,0X65,0X72,0X6C,0X69,0X6E,0X2C,0X20,0X42,0X65,0X72,0X6E,0X2C,0X20,0X52,0X6F,0X6D,0X65,0X2C,0X20,0X53,0X74,0X6F,0X63,0X6B,0X68,0X6F,0X6C,0X6D,0X2C,0X20,0X56,0X69,0X65,0X6E,0X6E,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X6C,0X67,0X72,0X61,0X64,0X65,0X2C,0X20,0X42,0X72,0X61,0X74,0X69,0X73,0X6C,0X61,0X76,0X61,0X2C,0X20,0X42,0X75,0X64,0X61,0X70,0X65,0X73,0X74,0X2C,0X20,0X4C,0X6A,0X75,0X62,0X6C,0X6A,0X61,0X6E,0X61,0X2C,0X20,0X50,0X72,0X61,0X67,0X75,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X75,0X73,0X73,0X65,0X6C,0X73,0X2C,0X20,0X43,0X6F,0X70,0X65,0X6E,0X68,0X61,0X67,0X65,0X6E,0X2C,0X20,0X4D,0X61,0X64,0X72,0X69,0X64,0X2C,0X20,0X50,0X61,0X72,0X69,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X53,0X61,0X72,0X61,0X6A,0X65,0X76,0X6F,0X2C,0X20,0X53,0X6B,0X6F,0X70,0X6A,0X65,0X2C,0X20,0X57,0X61,0X72,0X73,0X61,0X77,0X2C,0X20,0X5A,0X61,0X67,0X72,0X65,0X62,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X31,0X3A,0X30,0X30,0X29,0X20,0X57,0X65,0X73,0X74,0X20,0X43,0X65,0X6E,0X74,0X72,0X61,0X6C,0X20,0X41,0X66,0X72,0X69,0X63,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X6D,0X6D,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X74,0X68,0X65,0X6E,0X73,0X2C,0X20,0X42,0X75,0X63,0X68,0X61,0X72,0X65,0X73,0X74,0X2C,0X20,0X49,0X73,0X74,0X61,0X6E,0X62,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X69,0X72,0X75,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X69,0X72,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X48,0X61,0X72,0X61,0X72,0X65,0X2C,0X20,0X50,0X72,0X65,0X74,0X6F,0X72,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X48,0X65,0X6C,0X73,0X69,0X6E,0X6B,0X69,0X2C,0X20,0X4B,0X79,0X69,0X76,0X2C,0X20,0X52,0X69,0X67,0X61,0X2C,0X20,0X53,0X6F,0X66,0X69,0X61,0X2C,0X20,0X54,0X61,0X6C,0X6C,0X69,0X6E,0X6E,0X2C,0X20,0X56,0X69,0X6C,0X6E,0X69,0X75,0X73,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4A,0X65,0X72,0X75,0X73,0X61,0X6C,0X65,0X6D,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X4D,0X69,0X6E,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X32,0X3A,0X30,0X30,0X29,0X20,0X57,0X69,0X6E,0X64,0X68,0X6F,0X65,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4B,0X75,0X77,0X61,0X69,0X74,0X2C,0X20,0X52,0X69,0X79,0X61,0X64,0X68,0X2C,0X20,0X42,0X61,0X67,0X68,0X64,0X61,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4D,0X6F,0X73,0X63,0X6F,0X77,0X2C,0X20,0X53,0X74,0X2E,0X20,0X50,0X65,0X74,0X65,0X72,0X73,0X62,0X75,0X72,0X67,0X2C,0X20,0X56,0X6F,0X6C,0X67,0X6F,0X67,0X72,0X61,0X64,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X4E,0X61,0X69,0X72,0X6F,0X62,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X30,0X30,0X29,0X20,0X54,0X62,0X69,0X6C,0X69,0X73,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X33,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X33,0X3A,0X33,0X30,0X29,0X20,0X54,0X65,0X68,0X72,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X41,0X62,0X75,0X20,0X44,0X68,0X61,0X62,0X69,0X2C,0X20,0X4D,0X75,0X73,0X63,0X61,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X42,0X61,0X6B,0X75,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X30,0X30,0X29,0X20,0X59,0X65,0X72,0X65,0X76,0X61,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X34,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X34,0X3A,0X33,0X30,0X29,0X20,0X4B,0X61,0X62,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X59,0X65,0X6B,0X61,0X74,0X65,0X72,0X69,0X6E,0X62,0X75,0X72,0X67,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X30,0X30,0X29,0X20,0X49,0X73,0X6C,0X61,0X6D,0X61,0X62,0X61,0X64,0X2C,0X20,0X4B,0X61,0X72,0X61,0X63,0X68,0X69,0X2C,0X20,0X54,0X61,0X73,0X68,0X6B,0X65,0X6E,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X33,0X30,0X29,0X20,0X53,0X72,0X69,0X20,0X4A,0X61,0X79,0X61,0X77,0X61,0X72,0X64,0X65,0X6E,0X61,0X70,0X75,0X72,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X33,0X30,0X29,0X20,0X43,0X68,0X65,0X6E,0X6E,0X61,0X69,0X2C,0X20,0X4B,0X6F,0X6C,0X6B,0X61,0X74,0X61,0X2C,0X20,0X4D,0X75,0X6D,0X62,0X61,0X69,0X2C,0X20,0X4E,0X65,0X77,0X20,0X44,0X65,0X6C,0X68,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X35,0X2E,0X37,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X35,0X3A,0X34,0X35,0X29,0X20,0X4B,0X61,0X74,0X68,0X6D,0X61,0X6E,0X64,0X75,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X41,0X6C,0X6D,0X61,0X74,0X79,0X2C,0X20,0X4E,0X6F,0X76,0X6F,0X73,0X69,0X62,0X69,0X72,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X30,0X30,0X29,0X20,0X41,0X73,0X74,0X61,0X6E,0X61,0X2C,0X20,0X44,0X68,0X61,0X6B,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X36,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X36,0X3A,0X33,0X30,0X29,0X20,0X59,0X61,0X6E,0X67,0X6F,0X6E,0X20,0X28,0X52,0X61,0X6E,0X67,0X6F,0X6F,0X6E,0X29,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X42,0X61,0X6E,0X67,0X6B,0X6F,0X6B,0X2C,0X20,0X48,0X61,0X6E,0X6F,0X69,0X2C,0X20,0X4A,0X61,0X6B,0X61,0X72,0X74,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X37,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X37,0X3A,0X30,0X30,0X29,0X20,0X4B,0X72,0X61,0X73,0X6E,0X6F,0X79,0X61,0X72,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X42,0X65,0X69,0X6A,0X69,0X6E,0X67,0X2C,0X20,0X43,0X68,0X6F,0X6E,0X67,0X71,0X69,0X6E,0X67,0X2C,0X20,0X48,0X6F,0X6E,0X67,0X20,0X4B,0X6F,0X6E,0X67,0X2C,0X20,0X55,0X72,0X75,0X6D,0X71,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X4B,0X75,0X61,0X6C,0X61,0X20,0X4C,0X75,0X6D,0X70,0X75,0X72,0X2C,0X20,0X53,0X69,0X6E,0X67,0X61,0X70,0X6F,0X72,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X49,0X72,0X6B,0X75,0X74,0X73,0X6B,0X2C,0X20,0X55,0X6C,0X61,0X61,0X6E,0X20,0X42,0X61,0X74,0X61,0X61,0X72,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X50,0X65,0X72,0X74,0X68,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X38,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X38,0X3A,0X30,0X30,0X29,0X20,0X54,0X61,0X69,0X70,0X65,0X69,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X4F,0X73,0X61,0X6B,0X61,0X2C,0X20,0X53,0X61,0X70,0X70,0X6F,0X72,0X6F,0X2C,0X20,0X54,0X6F,0X6B,0X79,0X6F,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X53,0X65,0X6F,0X75,0X6C,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X30,0X30,0X29,0X20,0X59,0X61,0X6B,0X75,0X74,0X73,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X33,0X30,0X29,0X20,0X41,0X64,0X65,0X6C,0X61,0X69,0X64,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X39,0X2E,0X35,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X30,0X39,0X3A,0X33,0X30,0X29,0X20,0X44,0X61,0X72,0X77,0X69,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X42,0X72,0X69,0X73,0X62,0X61,0X6E,0X65,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X43,0X61,0X6E,0X62,0X65,0X72,0X72,0X61,0X2C,0X20,0X4D,0X65,0X6C,0X62,0X6F,0X75,0X72,0X6E,0X65,0X2C,0X20,0X53,0X79,0X64,0X6E,0X65,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X48,0X6F,0X62,0X61,0X72,0X74,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X47,0X75,0X61,0X6D,0X2C,0X20,0X50,0X6F,0X72,0X74,0X20,0X4D,0X6F,0X72,0X65,0X73,0X62,0X79,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X30,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X30,0X3A,0X30,0X30,0X29,0X20,0X56,0X6C,0X61,0X64,0X69,0X76,0X6F,0X73,0X74,0X6F,0X6B,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X31,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X31,0X3A,0X30,0X30,0X29,0X20,0X4D,0X61,0X67,0X61,0X64,0X61,0X6E,0X2C,0X20,0X53,0X6F,0X6C,0X6F,0X6D,0X6F,0X6E,0X20,0X49,0X73,0X2E,0X2C,0X20,0X4E,0X65,0X77,0X20,0X43,0X61,0X6C,0X65,0X64,0X6F,0X6E,0X69,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X41,0X75,0X63,0X6B,0X6C,0X61,0X6E,0X64,0X2C,0X20,0X57,0X65,0X6C,0X6C,0X69,0X6E,0X67,0X74,0X6F,0X6E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X32,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X32,0X3A,0X30,0X30,0X29,0X20,0X46,0X69,0X6A,0X69,0X2C,0X20,0X4B,0X61,0X6D,0X63,0X68,0X61,0X74,0X6B,0X61,0X2C,0X20,0X4D,0X61,0X72,0X73,0X68,0X61,0X6C,0X6C,0X20,0X49,0X73,0X2E,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X31,0X33,0X3E,0X28,0X47,0X4D,0X54,0X2B,0X31,0X33,0X3A,0X30,0X30,0X29,0X20,0X4E,0X75,0X6B,0X75,0X27,0X61,0X6C,0X6F,0X66,0X61,0X3C,0X2F,0X6F,0X70,0X74,0X69,0X6F,0X6E,0X3E,0XA,0X3C,0X2F,0X73,0X65,0X6C,0X65,0X63,0X74,0X3E,0XA,0X3C,0X62,0X72,0X3E,0X3C,0X69,0X6E,0X70,0X75,0X74,0X20,0X74,0X79,0X70,0X65,0X3D,0X73,0X75,0X62,0X6D,0X69,0X74,0X20,0X76,0X61,0X6C,0X75,0X65,0X3D,0X53,0X75,0X62,0X6D,0X69,0X74,0X3E,0XA,0X3C,0X2F,0X66,0X6F,0X72,0X6D,0X3E,0XA,0x00};
 
+WiFiManager wifiManager;
+
 WiFiServer server(80);
 WiFiUDP ntpUDP;
 NTPClient timeClient(ntpUDP, "pool.ntp.org");
@@ -67,48 +75,106 @@ byte digits[10] {
 
 void setup() {
   Serial.begin(115200);
+  EEPROM.begin(512);
+  //utc = int(EEPROM.read(0));
+  EEPROM.get(0,utc);
+  EEPROM.end();
+  
   pinMode(dataPin, OUTPUT);
   pinMode(loadPin, OUTPUT);
   pinMode(clockPin, OUTPUT);  
   digitalWrite(loadPin, 0);
   shiftOut(dataPin, clockPin, LSBFIRST, 0b0000000000000000);
   digitalWrite(loadPin, 1);
+  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
+  strip.show();            // Turn OFF all pixels ASAP
+  strip.setBrightness(25); // Set BRIGHTNESS to about 1/5 (max = 255)
+  for (int b=0; b<6; b++) {
+    strip.setPixelColor(b,255,0,0);
+  }
+  strip.show();
 
-  WiFi.begin(ssid, password);
+  WiFi.hostname("VFD-Clock");
+  wifiManager.setHostname("VFD-Clock");
   int i=0;
-  int b=0;
-  while ( WiFi.status() != WL_CONNECTED ) {
-    delay ( 500 );
-    digitalWrite(loadPin, 0);
-    shiftOut(dataPin, clockPin, LSBFIRST, digits[i]); //right
-    shiftOut(dataPin, clockPin, LSBFIRST, digits[b]); //left
-    digitalWrite(loadPin, 1);
-    i++;
-    if (i==10) {
-      i=0;
-      b++;
+  wifiManager.autoConnect("VFD WiFi Manager");
+  /*
+  if ( WiFi.status() != WL_CONNECTED) {
+    wifiManager.autoConnect("VFD WiFi Manager");
+    while (i<10) {
+      i++;
+      delay(500); 
     }
-    if (b==9 && i==9) {
-      digitalWrite(loadPin, 0);
-      shiftOut(dataPin, clockPin, LSBFIRST, 0b00001010); //right
-      shiftOut(dataPin, clockPin, LSBFIRST, 0b10011111); //left
-      digitalWrite(loadPin, 1);
-      delay(10000);
-      i=0;
-      b=0;
+    if ( WiFi.status() != WL_CONNECTED) {
+      wifiManager.resetSettings();
+      wifiManager.setTimeout(120);
+      if (!wifiManager.startConfigPortal("VFD WiFi Manager")) {
+        Serial.println("failed to connect and hit timeout");
+        delay(3000);
+        //reset and try again, or maybe put it to deep sleep
+        ESP.reset();
+        delay(5000);
+      }
     }
   }
-  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
-  strip.show();            // Turn OFF all pixels ASAP
-  strip.setBrightness(25); // Set BRIGHTNESS to about 1/5 (max = 255)
+  */
+  //WiFi.begin(ssid, password);
+  //int i=0;
+  //int b=0;
+  //while ( WiFi.status() != WL_CONNECTED ) {
+  //  delay ( 500 );
+  //  digitalWrite(loadPin, 0);
+  //  shiftOut(dataPin, clockPin, LSBFIRST, digits[i]); //right
+  //  shiftOut(dataPin, clockPin, LSBFIRST, digits[b]); //left
+  //  digitalWrite(loadPin, 1);
+  //  i++;
+  //  if (i==10) {
+  //    i=0;
+  //    b++;
+  //  }
+  //  if (b==9 && i==9) {
+  //    digitalWrite(loadPin, 0);
+  //    shiftOut(dataPin, clockPin, LSBFIRST, 0b00001010); //right
+  //    shiftOut(dataPin, clockPin, LSBFIRST, 0b10011111); //left
+  //    digitalWrite(loadPin, 1);
+  //    delay(10000);
+  //    i=0;
+  //    b=0;
+  //  }
+  //}
+  
   timeClient.begin();
   server.begin();
   timeClient.update();
-  unsigned long pctime;
-  pctime = timeClient.getEpochTime(); 
+  timeClient.setUpdateInterval(86400000);
+
+  utcOffsetInSeconds = 3600*utc;
+  timeClient.setTimeOffset(utcOffsetInSeconds);
+  setTime(timeClient.getEpochTime());
+
+  //US DST CALC
+  if(month() == 11 && day() < 8 && day() < weekday()) {
+    dst=true;
+  }
+  if(month() == 11 && day() < 8 && weekday() == 1 && hour() < 1) {
+    dst=true;
+  }
+
+  if(month() < 11 && month() > 3) dst = true;
+
+  if(month() == 3 && day() > 7 && day() >= (weekday() + 7)) {
+    if(!(weekday() == 1 && hour() < 2)) dst = true;
+  }
+  if(dst) utcOffsetInSeconds += 3600UL;
+
+
+  //unsigned long pctime;
+  //pctime = timeClient.getEpochTime(); 
+  timeClient.setTimeOffset(utcOffsetInSeconds);
   setTime(timeClient.getEpochTime());
   timeout=millis()+5000;
-  newNTPreq=millis()+86400000;
+  //newNTPreq=millis()+86400000;
   secondTick=millis()+1000;
 }
 
@@ -244,7 +310,14 @@ void loop() {
       if(dst) utcOffsetInSeconds += 3600UL;
       
       timeClient.update();
-      setTime(timeClient.getEpochTime()+utcOffsetInSeconds);
+      timeClient.setTimeOffset(utcOffsetInSeconds);
+      setTime(timeClient.getEpochTime());
+      EEPROM.begin(512);
+      EEPROM.put(0, utc);
+      //EEPROM.update(0, utc);
+      //EEPROM.commit();
+      EEPROM.end();
+      //setTime(timeClient.getEpochTime()+utcOffsetInSeconds);
     } else {
       client.println();
       client.print(data_header_html);  
@@ -258,11 +331,11 @@ void loop() {
       client.stop();
     }    
   } else {
-    if (millis()>=newNTPreq) {
-      newNTPreq=newNTPreq+86400000;
-      timeClient.update();
-      setTime(timeClient.getEpochTime()+utcOffsetInSeconds);
-    }
+    //if (millis()>=newNTPreq) {
+    //  newNTPreq=newNTPreq+86400000;
+    //  timeClient.update();
+    //  setTime(timeClient.getEpochTime()+utcOffsetInSeconds);
+    //}
     if (millis()>=secondTick) {
       secondTick=millis()+1000;
       for (b=0; b<6; b++) {