Explorar o código

Иницилизация проекта. Перенёс из теста.

Vladimir N. Shilov %!s(int64=9) %!d(string=hai) anos
achega
bc7849c4fe
Modificáronse 18 ficheiros con 1178 adicións e 0 borrados
  1. 151 0
      .cproject
  2. 4 0
      .gitignore
  3. 28 0
      .project
  4. 24 0
      Makefile
  5. 39 0
      Makefile-user.mk
  6. 26 0
      README.md
  7. 248 0
      app/application.cpp
  8. 71 0
      app/configuration.cpp
  9. 143 0
      app/webserver.cpp
  10. 1 0
      dump.bat
  11. 57 0
      include/configuration.h
  12. 45 0
      include/user_config.h
  13. 8 0
      include/webserver.h
  14. 73 0
      web/api.html
  15. BIN=BIN
      web/bootstrap.css.gz
  16. 142 0
      web/config.html
  17. 118 0
      web/index.html
  18. BIN=BIN
      web/jquery.js.gz

+ 151 - 0
.cproject

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147" moduleId="org.eclipse.cdt.core.settings" name="Sming">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147" name="Sming" parent="org.eclipse.cdt.build.core.emptycfg">
+					<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147.86962463" name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1164554300" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
+							<option id="cdt.managedbuild.option.gnu.cross.prefix.521205673" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
+							<option id="cdt.managedbuild.option.gnu.cross.path.393887888" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.712123812" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+							<builder id="cdt.managedbuild.builder.gnu.cross.2110485170" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1168221903" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+								<option id="gnu.c.compiler.option.include.paths.357494572" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/system/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/Libraries&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ESP_HOME}/sdk/include&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.313321806" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1999763015" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
+								<option id="gnu.cpp.compiler.option.include.paths.611746109" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/system/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/Libraries&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ESP_HOME}/sdk/include&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1330530366" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.65193859" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1795850540" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.364843833" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.archiver.525412186" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.assembler.587940548" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+								<option id="gnu.both.asm.option.include.paths.1067006329" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/system/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${SMING_HOME}/Libraries&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ESP_HOME}/sdk/include&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.651581712" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="MyProj-Test.null.1347473968" name="MyProj-Test"/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Sming">
+			<resource resourceType="PROJECT" workspacePath="/MyProj-Test"/>
+		</configuration>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+		<buildTargets>
+			<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>all</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>clean</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="flash" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>flash</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="flashonefile" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>flashonefile</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="flashinit" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>flashinit</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="flashboot" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>flashboot</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+			<target name="rebuild" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+				<buildCommand>make</buildCommand>
+				<buildArguments>-f ${ProjDirPath}/Makefile</buildArguments>
+				<buildTarget>rebuild</buildTarget>
+				<stopOnError>true</stopOnError>
+				<useDefaultCommand>true</useDefaultCommand>
+				<runAllBuilders>true</runAllBuilders>
+			</target>
+		</buildTargets>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147;cdt.managedbuild.toolchain.gnu.mingw.base.1135534147.86962463;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.2032390008;cdt.managedbuild.tool.gnu.c.compiler.input.1700912488">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147;cdt.managedbuild.toolchain.gnu.mingw.base.1135534147.86962463;cdt.managedbuild.tool.gnu.cross.c.compiler.1168221903;cdt.managedbuild.tool.gnu.c.compiler.input.313321806">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147;cdt.managedbuild.toolchain.gnu.mingw.base.1135534147.86962463;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1999763015;cdt.managedbuild.tool.gnu.cpp.compiler.input.1330530366">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1135534147;cdt.managedbuild.toolchain.gnu.mingw.base.1135534147.86962463;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.454898447;cdt.managedbuild.tool.gnu.cpp.compiler.input.501261625">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+</cproject>

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+out
+language.settings.xml
+.settings
+nbproject

+ 28 - 0
.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>MyProj-WallClock</name>
+	<comment></comment>
+	<projects>
+		<project>SmingFramework</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 24 - 0
Makefile

@@ -0,0 +1,24 @@
+#####################################################################
+#### Please don't change this file. Use Makefile-user.mk instead ####
+#####################################################################
+# Including user Makefile.
+# Should be used to set project-specific parameters
+include ./Makefile-user.mk
+
+# Important parameters check.
+# We need to make sure SMING_HOME and ESP_HOME variables are set.
+# You can use Makefile-user.mk in each project or use enviromental variables to set it globally.
+ 
+ifndef SMING_HOME
+$(error SMING_HOME is not set. Please configure it in Makefile-user.mk)
+endif
+ifndef ESP_HOME
+$(error ESP_HOME is not set. Please configure it in Makefile-user.mk)
+endif
+
+# Include main Sming Makefile
+ifeq ($(RBOOT_ENABLED), 1)
+include $(SMING_HOME)/Makefile-rboot.mk
+else
+include $(SMING_HOME)/Makefile-project.mk
+endif

+ 39 - 0
Makefile-user.mk

@@ -0,0 +1,39 @@
+## Local build configuration
+## Parameters configured here will override default and ENV values.
+## Uncomment and change examples:
+
+## Add your source directories here separated by space
+# MODULES = app
+# EXTRA_INCDIR = include
+
+## ESP_HOME sets the path where ESP tools and SDK are located.
+## Windows:
+# ESP_HOME = c:/Espressif
+
+## MacOS / Linux:
+# ESP_HOME = /opt/esp-open-sdk
+
+## SMING_HOME sets the path where Sming framework is located.
+## Windows:
+# SMING_HOME = c:/tools/sming/Sming 
+
+## MacOS / Linux
+# SMING_HOME = /opt/sming/Sming
+
+## COM port parameter is reqruied to flash firmware correctly.
+## Windows: 
+# COM_PORT = COM3
+
+## MacOS / Linux:
+# COM_PORT = /dev/tty.usbserial
+
+## Com port speed
+# COM_SPEED	= 115200
+
+## Configure flash parameters (for ESP12-E and other new boards):
+# SPI_MODE = dio
+
+## SPIFFS options
+# DISABLE_SPIFFS = 1
+SPIFF_FILES = web
+

+ 26 - 0
README.md

@@ -0,0 +1,26 @@
+Wall Segment Clock
+
+После двух дней ебли с nodemcu решил для своего проектика остановится на Sming.
+за основу взял проект "MeteoControl", выкинул I2C LCD Display, добавил 
+обновление сайта из "HttpClient_ThingSpeak", добавил обработку DHT22 из 
+"Humidity_DHT22", хотел добавить FTP сервер -- но оно не влезло.
+В качестве датчика освещённости можно будет использовать "Light_BH1750", или 
+останется фоторезистор.
+
+"ThingSpeak" планирую заменить на что-то своё, на своём сервере, что ещё 
+предстоит придумать и реализовать. Возиожно это будет не HTTP а что-то на 
+основе UDP (клиент/сервер).
+
+Осталось добавить поддержку для MAX7221 и сделать вывод на индикаторы...
+Возможно, по ходу дела придётся что-то выкидывать, чтобы влезло нужное.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+out/firmware/spiff_rom.bin---------->0x4C000
+
+FTP не влезло на 1594 байта :-(
+
+не забыть выкинуть скачивание файлов.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+WebTime занимает слегка меьше места чем NTPclient.

+ 248 - 0
app/application.cpp

@@ -0,0 +1,248 @@
+#include <user_config.h>
+#include <SmingCore/SmingCore.h>
+#include <Libraries/DHT/DHT.h>
+
+///////////////////////////////////////////////////////////////////
+// Set your SSID & Pass for initial configuration
+#include "../include/configuration.h" // application configuration
+///////////////////////////////////////////////////////////////////
+
+#include "webserver.h"
+
+DHT dht(DHT_PIN, DHT22);
+
+Timer procTimer;
+Timer displayTimer;
+bool state = false;
+// Sensors string values
+String StrT, StrRH, StrHI, StrCR, StrCF, StrTime;
+String StrVDD, StrADC;
+
+Timer httpcTimer;
+HttpClient thingSpeak;
+
+/* FTPServer ftp; */
+
+void process();
+void showValues();
+void connectOk();
+void connectFail();
+void onDataSent(HttpClient& client, bool successful);
+void sendData();
+void onNtpReceive(NtpClient& client, time_t timestamp);
+
+NtpClient ntpClient ("ntps1-0.cs.tu-berlin.de", 60, onNtpReceive);
+
+
+void init()
+{
+	spiffs_mount(); // Mount file system, in order to work with files
+
+	Serial.begin(SERIAL_BAUD_RATE); // 115200 by default
+	Serial.systemDebugOutput(false); // Debug output to serial
+	Serial.println("Wall Segment Clock");
+
+	ActiveConfig = loadConfig();
+
+	// Select control line
+	pinMode(CONTROL_PIN, OUTPUT);
+	digitalWrite(CONTROL_PIN, LOW);
+
+	// Restart main screen output
+	procTimer.restart();
+	displayTimer.stop();
+
+	//wait for sensor startup
+	delay(1000);
+	// DHT sensor start
+	dht.begin();
+
+	// set timezone hourly difference to UTC
+	SystemClock.setTimeZone(ActiveConfig.AddTZ);
+
+	WifiStation.config(ActiveConfig.NetworkSSID, ActiveConfig.NetworkPassword);
+	WifiStation.enable(true);
+	WifiAccessPoint.enable(false);
+
+	WifiStation.waitConnection(connectOk, 20, connectFail); // We recommend 20+ seconds for connection timeout at start
+
+	// ðàç â ìèíóòó?
+	procTimer.initializeMs(60000, process).start();
+	process();
+}
+
+void showValues()
+{
+	Serial.print("Date & Time: ");
+	Serial.println(SystemClock.getSystemTimeString());
+
+	Serial.print("Temperature: ");
+	Serial.print(StrT);
+	Serial.println("*C");
+
+	Serial.print("Humidity: ");
+	Serial.print(StrRH);
+	Serial.println("%");
+
+	Serial.print("Heatindex: ");
+	Serial.print(StrHI);
+	Serial.println("*C");
+
+	Serial.print("Comfort: ");
+	Serial.print(StrCR);
+	Serial.print("% - ");
+	Serial.println(StrCF);
+
+	Serial.print("ADC value: ");
+	Serial.println(StrADC);
+
+	Serial.print("VDD value: ");
+	Serial.println(StrVDD);
+
+	Serial.println("");
+}
+
+void process()
+{
+	StrTime = SystemClock.getSystemTimeString();
+
+	float t = dht.readTemperature() + ActiveConfig.AddT;
+	float h = dht.readHumidity() + ActiveConfig.AddRH;
+	float hi = dht.getHeatIndex();
+	ComfortState cf;
+	float cr = dht.getComfortRatio(cf);
+
+	if (ActiveConfig.Trigger == eTT_Temperature)
+		state = t < ActiveConfig.RangeMin || t > ActiveConfig.RangeMax;
+	else if (ActiveConfig.Trigger == eTT_Humidity)
+		state = h < ActiveConfig.RangeMin || h > ActiveConfig.RangeMax;
+
+	digitalWrite(CONTROL_PIN, state);
+	StrT = String(t, 1);
+	StrRH = String(h, 1);
+	StrHI = String(hi, 1);
+	StrCR = String(cr, 0);
+	switch(cf)
+	{
+	case Comfort_OK:
+		StrCF = "OK";
+		break;
+	case Comfort_TooHot:
+		StrCF = "Too Hot";
+		break;
+	case Comfort_TooCold:
+		StrCF = "Too Cold";
+		break;
+	case Comfort_TooDry:
+		StrCF = "Too Dry";
+		break;
+	case Comfort_TooHumid:
+		StrCF = "Too Humid";
+		break;
+	case Comfort_HotAndHumid:
+		StrCF = "Hot And Humid";
+		break;
+	case Comfort_HotAndDry:
+		StrCF = "Hot And Dry";
+		break;
+	case Comfort_ColdAndHumid:
+		StrCF = "Cold And Humid";
+		break;
+	case Comfort_ColdAndDry:
+		StrCF = "Cold And Dry";
+		break;
+	default:
+		StrCF = "Unknown:";
+		break;
+	}
+
+	StrADC = String(system_adc_read());
+	StrVDD = String(system_get_vdd33());
+
+	if (!displayTimer.isStarted())
+		displayTimer.initializeMs(20000, showValues).start();
+	// îáíîâëåíèå âûâîäà -- ðàç â 20 ñåê. îáíîâëåíèå äàííûõ -- ðàç â ìèíóòó.
+}
+/*
+void startFTP()
+{
+	if (!fileExist("index.html"))
+		fileSetContent("index.html", "<h3>Please connect to FTP and upload files from folder 'web/build' (details in code)</h3>");
+
+	// Start FTP server
+	ftp.listen(21);
+	ftp.addUser("user", "resu"); // FTP account
+	// You can also use special FTP comand: "fsformat" for clearing file system (for example from TotalCMD)
+}
+*/
+void connectOk()
+{
+//	debugf("connected");
+	WifiAccessPoint.enable(false);
+	Serial.print("I'm connecteed. IP: ");
+	Serial.println(WifiStation.getIP().toString());
+
+	// Start send data loop
+	httpcTimer.initializeMs(60 * 1000, sendData).start(); // every 60 seconds
+
+	startWebServer();
+
+/*	startFTP(); */
+}
+
+/*
+ * â ñëó÷àå íåóäà÷è ïîäêëþ÷åíèÿ ïîäíèìàåì òî÷êó äîñòóïà áåç àâòîðèçàöèè
+ */
+void connectFail()
+{
+//	debugf("connection FAILED");
+	WifiAccessPoint.config("MeteoConfig", "", AUTH_OPEN);
+	WifiAccessPoint.enable(true);
+	// Stop main screen output
+	procTimer.stop();
+	displayTimer.stop();
+
+	Serial.println("WiFi MeteoConfig");
+	Serial.println(WifiAccessPoint.getIP());
+
+	startWebServer();
+	WifiStation.waitConnection(connectOk); // Wait connection
+}
+
+/*
+ * Îòïðàâêà äàííûõ íà âíåøíèé ñåðâåð
+ */
+void onDataSent(HttpClient& client, bool successful)
+{
+	if (successful)
+		Serial.println("Success sent");
+	else
+		Serial.println("Failed");
+
+	String response = client.getResponseString();
+	Serial.println("Server response: '" + response + "'");
+	if (response.length() > 0)
+	{
+		int intVal = response.toInt();
+
+		if (intVal == 0)
+			Serial.println("Sensor value wasn't accepted. May be we need to wait a little?");
+	}
+}
+
+void sendData()
+{
+	if (thingSpeak.isProcessing()) return; // We need to wait while request processing was completed
+
+	thingSpeak.downloadString("http://api.thingspeak.com/update?key=26WYU9LJCBC3AE1X&field1=" + StrT + "&field2=" + StrRH + "&field3=" + StrHI, onDataSent);
+}
+
+/*
+ * NTP
+ */
+void onNtpReceive(NtpClient& client, time_t timestamp) {
+	SystemClock.setTime(timestamp, eTZ_UTC);
+
+	Serial.println("*** Time synchronized! ***");
+//	Serial.println(SystemClock.getSystemTimeString());
+}

+ 71 - 0
app/configuration.cpp

@@ -0,0 +1,71 @@
+#include "../include/configuration.h"
+
+#include <SmingCore/SmingCore.h>
+
+MeteoConfig ActiveConfig;
+
+MeteoConfig loadConfig()
+{
+	DynamicJsonBuffer jsonBuffer;
+	MeteoConfig cfg;
+	if (fileExist(METEO_CONFIG_FILE))
+	{
+		int size = fileGetSize(METEO_CONFIG_FILE);
+		char* jsonString = new char[size + 1];
+		fileGetContent(METEO_CONFIG_FILE, jsonString, size + 1);
+		JsonObject& root = jsonBuffer.parseObject(jsonString);
+
+		JsonObject& network = root["network"];
+		cfg.NetworkSSID = String((const char*)network["ssid"]);
+		cfg.NetworkPassword = String((const char*)network["password"]);
+
+		JsonObject& correction = root["correction"];
+		cfg.AddT = correction["T"];
+		cfg.AddRH = correction["RH"];
+		cfg.AddTZ = correction["TZ"];
+
+		JsonObject& trigger = root["trigger"];
+		cfg.Trigger = (TriggerType)(int)trigger["type"];
+		cfg.RangeMin = trigger["min"];
+		cfg.RangeMax = trigger["max"];
+
+		delete[] jsonString;
+	}
+	else
+	{
+		cfg.NetworkSSID = WIFI_SSID;
+		cfg.NetworkPassword = WIFI_PWD;
+	}
+	return cfg;
+}
+
+void saveConfig(MeteoConfig& cfg)
+{
+	ActiveConfig = cfg;
+
+	DynamicJsonBuffer jsonBuffer;
+	JsonObject& root = jsonBuffer.createObject();
+
+	JsonObject& network = jsonBuffer.createObject();
+	root["network"] = network;
+	network["ssid"] = cfg.NetworkSSID.c_str();
+	network["password"] = cfg.NetworkPassword.c_str();
+
+	JsonObject& correction = jsonBuffer.createObject();
+	root["correction"] = correction;
+	correction["T"] = cfg.AddT;
+	correction["RH"] = cfg.AddRH;
+	correction["TZ"] = cfg.AddTZ;
+
+	JsonObject& trigger = jsonBuffer.createObject();
+	root["trigger"] = trigger;
+	trigger["type"] = (int)cfg.Trigger;
+	trigger["min"] = cfg.RangeMin;
+	trigger["max"] = cfg.RangeMax;
+
+	char buf[3048];
+	root.prettyPrintTo(buf, sizeof(buf));
+	fileSetContent(METEO_CONFIG_FILE, buf);
+}
+
+

+ 143 - 0
app/webserver.cpp

@@ -0,0 +1,143 @@
+#include <user_config.h>
+#include <SmingCore/SmingCore.h>
+
+#include "../include/configuration.h"
+#include "webserver.h"
+
+bool serverStarted = false;
+HttpServer server;
+extern String StrT, StrRH, StrHI, StrCR, StrCF; // Sensors string values
+
+void onIndex(HttpRequest &request, HttpResponse &response)
+{
+	TemplateFileStream *tmpl = new TemplateFileStream("index.html");
+	auto &vars = tmpl->variables();
+	vars["T"] = StrT;
+	vars["RH"] = StrRH;
+	vars["HI"] = StrHI;
+	vars["CR"] = StrCR;
+	vars["CF"] = StrCF;
+	vars["ADC"] = String(system_adc_read());
+	vars["VDD"] = String(system_get_vdd33());
+	vars["TIME"] = SystemClock.getSystemTimeString();
+	response.sendTemplate(tmpl);
+}
+
+void onConfiguration(HttpRequest &request, HttpResponse &response)
+{
+	MeteoConfig cfg = loadConfig();
+	if (request.getRequestMethod() == RequestMethod::POST)
+	{
+//		debugf("Update config");
+		// Update config
+		if (request.getPostParameter("SSID").length() > 0) // Network
+		{
+			cfg.NetworkSSID = request.getPostParameter("SSID");
+			cfg.NetworkPassword = request.getPostParameter("Password");
+		}
+		if (request.getPostParameter("TZ").length() > 0) // Correction
+		{
+			cfg.AddT = request.getPostParameter("T").toFloat();
+			cfg.AddRH = request.getPostParameter("RH").toFloat();
+			cfg.AddTZ = request.getPostParameter("TZ").toFloat();
+		}
+		if (request.getPostParameter("Trigger").length() > 0) // Trigger
+		{
+			cfg.Trigger = (TriggerType)request.getPostParameter("Trigger").toInt();
+			cfg.RangeMin = request.getPostParameter("RMin").toFloat();
+			cfg.RangeMax = request.getPostParameter("RMax").toFloat();
+		}
+		saveConfig(cfg);
+		SystemClock.setTimeZone(cfg.AddTZ);
+		response.redirect();
+	}
+
+//	debugf("Send template");
+	TemplateFileStream *tmpl = new TemplateFileStream("config.html");
+	auto &vars = tmpl->variables();
+	vars["SSID"] = cfg.NetworkSSID;
+	vars["T"] = String(cfg.AddT, 2);
+	vars["RH"] = String(cfg.AddRH, 2);
+	vars["TZ"] = String(cfg.AddTZ, 2);
+	vars["Trigger"] = String((int)cfg.Trigger);
+	vars["RMin"] = String(cfg.RangeMin, 2);
+	vars["RMax"] = String(cfg.RangeMax, 2);
+	response.sendTemplate(tmpl);
+}
+
+void onFile(HttpRequest &request, HttpResponse &response)
+{
+	String file = request.getPath();
+	if (file[0] == '/')
+		file = file.substring(1);
+
+	if (file[0] == '.')
+		response.forbidden();
+	else
+	{
+		response.setCache(86400, true); // It's important to use cache for better performance.
+		response.sendFile(file);
+	}
+}
+
+/// API ///
+
+void onApiDoc(HttpRequest &request, HttpResponse &response)
+{
+	TemplateFileStream *tmpl = new TemplateFileStream("api.html");
+	auto &vars = tmpl->variables();
+	vars["IP"] = (WifiStation.isConnected() ? WifiStation.getIP() : WifiAccessPoint.getIP()).toString();
+	response.sendTemplate(tmpl);
+}
+
+void onApiSensors(HttpRequest &request, HttpResponse &response)
+{
+	JsonObjectStream* stream = new JsonObjectStream();
+	JsonObject& json = stream->getRoot();
+	json["status"] = (bool)true;
+	JsonObject& sensors = json.createNestedObject("sensors");
+	sensors["temperature"] = StrT.c_str();
+	sensors["humidity"] = StrRH.c_str();
+	sensors["heatindex"] = StrHI.c_str();
+	sensors["comfortp"] = StrCR.c_str();
+	sensors["comforts"] = StrCF.c_str();
+	sensors["adcvalue"] = String(system_adc_read());
+	sensors["vddvalue"] = String(system_get_vdd33());
+	sensors["datetime"] = SystemClock.getSystemTimeString();
+	response.sendJsonObject(stream);
+}
+
+void onApiOutput(HttpRequest &request, HttpResponse &response)
+{
+	int val = request.getQueryParameter("control", "-1").toInt();
+	if (val == 0 || val == 1)
+		digitalWrite(CONTROL_PIN, val == 1);
+	else
+		val = -1;
+
+	JsonObjectStream* stream = new JsonObjectStream();
+	JsonObject& json = stream->getRoot();
+	json["status"] = val != -1;
+	if (val == -1) json["error"] = "Wrong control parameter value, please use: ?control=0|1";
+	response.sendJsonObject(stream);
+}
+
+void startWebServer()
+{
+	if (serverStarted) return;
+
+	server.listen(80);
+	server.addPath("/", onIndex);
+	server.addPath("/api", onApiDoc);
+	server.addPath("/api/sensors", onApiSensors);
+	server.addPath("/api/output", onApiOutput);
+	server.addPath("/config", onConfiguration);
+	server.setDefaultHandler(onFile);
+	serverStarted = true;
+/*
+	if (WifiStation.isEnabled())
+		debugf("STA: %s", WifiStation.getIP().toString().c_str());
+	if (WifiAccessPoint.isEnabled())
+		debugf("AP: %s", WifiAccessPoint.getIP().toString().c_str());
+*/
+}

+ 1 - 0
dump.bat

@@ -0,0 +1 @@
+C:\Espressif\xtensa-lx106-elf\bin\xtensa-lx106-elf-objdump -S .\out\build\app.out > .\out\app.asm

+ 57 - 0
include/configuration.h

@@ -0,0 +1,57 @@
+#ifndef INCLUDE_CONFIGURATION_H_
+#define INCLUDE_CONFIGURATION_H_
+
+#include <user_config.h>
+#include <SmingCore/SmingCore.h>
+
+// If you want, you can define WiFi settings globally in Eclipse Environment Variables
+#ifndef WIFI_SSID
+	#define WIFI_SSID "Heaven-WiFi" // Put you SSID and Password here
+	#define WIFI_PWD "Heaven-32847"
+#endif
+
+// Pin for communication with DHT sensor
+#define DHT_PIN 2
+
+// Pin for trigger control output
+#define CONTROL_PIN 16
+
+#define METEO_CONFIG_FILE ".meteo.conf" // leading point for security reasons :)
+
+enum TriggerType
+{
+	eTT_None = 0,
+	eTT_Temperature,
+	eTT_Humidity
+};
+
+struct MeteoConfig
+{
+	MeteoConfig()
+	{
+		AddT = 0;
+		AddRH = 0;
+		AddTZ = 2;
+		Trigger = eTT_Humidity;
+		RangeMin = 30;
+		RangeMax = 50;
+	}
+
+	String NetworkSSID;
+	String NetworkPassword;
+
+	float AddT; // Temperature adjustment
+	float AddRH; // Humidity adjustment
+	float AddTZ; // TimeZone - local time offset
+
+	TriggerType Trigger; // Sensor trigger type
+	float RangeMin;
+	float RangeMax;
+};
+
+MeteoConfig loadConfig();
+void saveConfig(MeteoConfig& cfg);
+
+extern MeteoConfig ActiveConfig;
+
+#endif /* INCLUDE_CONFIGURATION_H_ */

+ 45 - 0
include/user_config.h

@@ -0,0 +1,45 @@
+#ifndef __USER_CONFIG_H__
+#define __USER_CONFIG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	// UART config
+	#define SERIAL_BAUD_RATE 115200
+
+	// ESP SDK config
+	#define LWIP_OPEN_SRC
+	#define USE_US_TIMER
+
+	// Default types
+	#define __CORRECT_ISO_CPP_STDLIB_H_PROTO
+	#include <limits.h>
+	#include <stdint.h>
+
+	// Override c_types.h include and remove buggy espconn
+	#define _C_TYPES_H_
+	#define _NO_ESPCON_
+
+	// Updated, compatible version of c_types.h
+	// Just removed types declared in <stdint.h>
+	#include <espinc/c_types_compatible.h>
+
+	// System API declarations
+	#include <esp_systemapi.h>
+
+	// C++ Support
+	#include <esp_cplusplus.h>
+	// Extended string conversion for compatibility
+	#include <stringconversion.h>
+	// Network base API
+	#include <espinc/lwip_includes.h>
+
+	// Beta boards
+	#define BOARD_ESP01
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 8 - 0
include/webserver.h

@@ -0,0 +1,8 @@
+#ifndef INCLUDE_WEBSERVER_H_
+#define INCLUDE_WEBSERVER_H_
+
+
+void startWebServer();
+void downloadContentFiles();
+
+#endif /* INCLUDE_WEBSERVER_H_ */

+ 73 - 0
web/api.html

@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <title>MeteoControl WiFi Station</title>
+
+    <!-- Bootstrap core -->
+    <link href="/bootstrap.css" rel="stylesheet">
+	<script src="/jquery.js"></script>
+	<style>
+		.main { font-size: 63px; }
+	</style>
+	
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+  </head>
+
+  <body>
+
+    <div class="container">
+      <div class="header">
+        <nav>
+          <ul class="nav nav-pills pull-right">
+            <li role="presentation"><a href="/">Home</a></li>
+            <li role="presentation"><a href="/config">Configuration</a></li>
+						<li role="presentation" class="active"><a href="/api">API</a></li>
+          </ul>
+        </nav>
+        <h3 class="text-muted">MeteoControl</h3>
+      </div>
+	  
+	  <div class="row">
+		<h2>&nbsp;</h2>
+		<div class="col-xs-offset-2">
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+					<div class="panel-heading">
+						<h3 class="panel-title">Read value</h3>
+					</div>
+					<div class="panel-body">
+						<h4>http://{IP}/api/sensors</h4>
+						<p>Will return all sensors values</p>
+					</div>
+			  </div>
+			</div>
+			
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+					<div class="panel-heading">
+						<h3 class="panel-title">Control output</h3>
+					</div>
+					<div class="panel-body">
+						<h4>http://{IP}/api/output?control=1</h4>
+						<p>Switch control output to HIGH state</p>
+						
+						<h4>http://{IP}/api/output?control=0</h4>
+						<p>Switch control output to LOW state</p>
+					</div>
+			  </div>
+			</div>
+			</div><!-- /col -->
+		</div>
+      </div>
+
+    </div> <!-- /container -->
+  </body>
+</html>

BIN=BIN
web/bootstrap.css.gz


+ 142 - 0
web/config.html

@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <title>MeteoControl WiFi Station</title>
+
+    <!-- Bootstrap core -->
+    <link href="bootstrap.css" rel="stylesheet">
+	<script src="jquery.js"></script>
+	<style>
+		.main { font-size: 63px; }
+	</style>
+	
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+  </head>
+
+  <body>
+
+    <div class="container">
+      <div class="header">
+        <nav>
+          <ul class="nav nav-pills pull-right">
+            <li role="presentation"><a href="/">Home</a></li>
+            <li role="presentation" class="active"><a href="/config">Configuration</a></li>
+						<li role="presentation"><a href="/api">API</a></li>
+          </ul>
+        </nav>
+        <h3 class="text-muted">MeteoControl</h3>
+      </div>
+	  
+	  <div class="row">
+		<h2>&nbsp;</h2>
+		<div class="col-xs-offset-2 col-xs-8">
+			<!-- Network config -->
+			<div>
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Network</h3>
+				</div>
+				<div class="panel-body">
+				  <form method="POST">
+					  <div class="form-group">
+						<label>Name</label>
+						<input type="text" name="SSID" class="form-control" placeholder="Enter SSID" value="{SSID}">
+					  </div>
+					  <div class="form-group">
+						<label for="exampleInputPassword1">Password</label>
+						<input type="password" name="Password" class="form-control" placeholder="Password">
+					  </div>
+					  <button type="submit" class="btn btn-success">Save network</button>
+					  <button type="cancel" class="btn btn-link">Cancel</button>
+					</form>
+				</div>
+			  </div>
+			</div>
+			
+			<!-- Sensor adjustment config -->
+			<div>
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Adjustments and sensor corrections</h3>
+				</div>
+				<div class="panel-body">
+				  <form method="POST">
+					  <div class="form-group">
+						<label for="exampleInputEmail1">Temperature adjustment, &#x00B1; &deg;C</label>
+						<input type="text" name="T" class="form-control" value="{T}">
+					  </div>
+					  <div class="form-group">
+						<label for="exampleInputPassword1">Humidity adjustment, &#x00B1; %</label>
+						<input type="text" name="RH" class="form-control" value="{RH}">
+					  </div>
+					  <div class="form-group">
+						<label for="exampleInputPassword1">Local time, &#x00B1; hours from GMT</label>
+						<input type="text" name="TZ" class="form-control" value="{TZ}">
+					  </div>
+					  <button type="submit" class="btn btn-success">Save correction</button>
+					  <button type="cancel" class="btn btn-link">Cancel</button>
+					</form>
+				</div>
+			  </div>
+			</div>
+			
+			<!-- Trigger config -->
+			<div>
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Sensor automatic trigger</h3>
+				</div>
+				<div class="panel-body">
+				  <form method="POST">
+						<div class="form-group">
+							<div class="radio">
+								<label><input type="radio" name="Trigger" value="0">Disabled</label>
+							</div>
+							<div class="radio">
+								<label><input type="radio" name="Trigger" value="1">By Temperature</label>
+							</div>
+							<div class="radio">
+								<label><input type="radio" name="Trigger" value="2">By Humidity</label>
+							</div>
+							<script>$( document ).ready( ($("input:radio[name=Trigger]"))[ {Trigger} ].click() )</script>
+						</div>
+						
+						<fieldset>
+							<legend>Value range</legend>
+							<div class='row'>
+								<div class='col-sm-4'>
+										<div class='form-group'>
+												<label>Minimum</label>
+												<input type="text" name="RMin" class="form-control" value="{RMin}">
+										</div>
+								</div>
+								<div class='col-sm-4'>
+										<div class='form-group'>
+												<label>Maximum</label>
+												<input type="text" name="RMax" class="form-control" value="{RMax}">
+										</div>
+								</div>
+							</div>
+							<span id="helpBlock" class="help-block">* The trigger will fire when the value is less than the minimum or greater than the maximum</span>
+						</fieldset>
+					  <button type="submit" class="btn btn-success">Save trigger</button>
+					  <button type="cancel" class="btn btn-link">Cancel</button>
+					</form>
+				</div>
+			  </div>
+			</div>
+			
+		</div>
+      </div>
+
+    </div> <!-- /container -->
+  </body>
+</html>

+ 118 - 0
web/index.html

@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <title>MeteoControl WiFi Station</title>
+
+    <!-- Bootstrap core -->
+    <link href="bootstrap.css" rel="stylesheet">
+	<script src="jquery.js"></script>
+	<style>
+		.main { font-size: 63px; }
+	</style>
+	
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+  </head>
+
+  <body>
+
+    <div class="container">
+      <div class="header">
+        <nav>
+          <ul class="nav nav-pills pull-right">
+            <li role="presentation" class="active"><a href="/">Home</a></li>
+            <li role="presentation"><a href="/config">Configuration</a></li>
+						<li role="presentation"><a href="/api">API</a></li>
+          </ul>
+        </nav>
+        <h3 class="text-muted">Wifi Meteo Wall Segment Clock</h3>
+      </div>
+	  
+	  <div class="row">
+		<h2>&nbsp;</h2>
+		<div class="col-xs-offset-2">
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Temperature</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{T} &deg;C</h1>
+				</div>
+			  </div>
+			</div>
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Humidity</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{RH} %</h1>
+				</div>
+			  </div>
+			</div>
+
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Heatindex</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{HI} &deg;C</h1>
+				</div>
+			  </div>
+			</div>
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">Comfort</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{CR} % &mdash; {CF}</h1>
+				</div>
+			  </div>
+			</div>
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">ADC Value</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{ADC}</h1>
+				</div>
+			  </div>
+			</div>
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">VDD33</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{VDD}</h1>
+				</div>
+			  </div>
+			</div>
+			<div class="col-xs-10 col-md-5">
+			  <div class="panel panel-default">
+				<div class="panel-heading">
+				  <h3 class="panel-title">SystemTime</h3>
+				</div>
+				<div class="panel-body">
+				  <h1 class="text-center main">{TIME}</h1>
+				</div>
+			  </div>
+			</div>
+		<!-- /col -->
+		</div>
+      </div>
+
+    </div> <!-- /container -->
+  </body>
+</html>

BIN=BIN
web/jquery.js.gz