From 633a45f964d0dbf4d29b7dbc418d5d2a4504f91f Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Wed, 10 Oct 2018 19:41:08 +0200
Subject: [PATCH] Revert "6.2.1.14 Webserver rewrite"
This reverts commit 077b8a79e15be9446c3a7f796e895a87628de0cc.
---
sonoff/_changelog.ino | 5 +-
sonoff/i18n.h | 1 +
sonoff/sonoff.h | 2 +-
sonoff/sonoff_version.h | 2 +-
sonoff/{xdrv_02_mqtt.ino => xdrv_01_mqtt.ino} | 103 +---
...01_webserver.ino => xdrv_02_webserver.ino} | 466 ++++++++++--------
sonoff/xdrv_07_domoticz.ino | 49 +-
sonoff/xdrv_09_timers.ino | 33 +-
sonoff/xdrv_11_knx.ino | 18 +-
sonoff/xplg_wemohue.ino | 14 -
10 files changed, 304 insertions(+), 389 deletions(-)
rename sonoff/{xdrv_02_mqtt.ino => xdrv_01_mqtt.ino} (86%)
rename sonoff/{xdrv_01_webserver.ino => xdrv_02_webserver.ino} (84%)
diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino
index def41834a..b2210c830 100644
--- a/sonoff/_changelog.ino
+++ b/sonoff/_changelog.ino
@@ -1,7 +1,4 @@
-/* 6.2.1.14 20181010
- * Rewrite Webserver page handler for easier extension (thx to Adrian Scillato)
- *
- * 6.2.1.13 20181008
+/* 6.2.1.13 20181008
* Change default Mqtt client library from PubSubClient to non-blocking ArduinoMqtt by Joel Gaehwiler
* Add command WebRefresh 1000..10000 to control web page refresh in milliseconds. Default is 2345
*
diff --git a/sonoff/i18n.h b/sonoff/i18n.h
index 62226f91f..ab1f0a1d2 100644
--- a/sonoff/i18n.h
+++ b/sonoff/i18n.h
@@ -539,6 +539,7 @@ const char S_CONFIGURATION[] PROGMEM = D_CONFIGURATION;
const char S_CONFIGURE_MODULE[] PROGMEM = D_CONFIGURE_MODULE;
const char S_CONFIGURE_WIFI[] PROGMEM = D_CONFIGURE_WIFI;
const char S_NO_NETWORKS_FOUND[] PROGMEM = D_NO_NETWORKS_FOUND;
+const char S_CONFIGURE_MQTT[] PROGMEM = D_CONFIGURE_MQTT;
const char S_CONFIGURE_LOGGING[] PROGMEM = D_CONFIGURE_LOGGING;
const char S_CONFIGURE_OTHER[] PROGMEM = D_CONFIGURE_OTHER;
const char S_SAVE_CONFIGURATION[] PROGMEM = D_SAVE_CONFIGURATION;
diff --git a/sonoff/sonoff.h b/sonoff/sonoff.h
index 5bc744157..5d41aa18d 100644
--- a/sonoff/sonoff.h
+++ b/sonoff/sonoff.h
@@ -214,7 +214,7 @@ enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MA
enum XsnsFunctions {FUNC_PRE_INIT, FUNC_INIT, FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND, FUNC_PREP_BEFORE_TELEPERIOD,
FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART, FUNC_COMMAND, FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA, FUNC_SET_POWER, FUNC_SHOW_SENSOR,
- FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM, FUNC_WEB_ADD_BUTTON, FUNC_WEB_ADD_HANDLER};
+ FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM};
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h
index 080c76fa4..eba7ddc21 100644
--- a/sonoff/sonoff_version.h
+++ b/sonoff/sonoff_version.h
@@ -20,7 +20,7 @@
#ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_
-#define VERSION 0x0602010E
+#define VERSION 0x0602010D
#define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends"
diff --git a/sonoff/xdrv_02_mqtt.ino b/sonoff/xdrv_01_mqtt.ino
similarity index 86%
rename from sonoff/xdrv_02_mqtt.ino
rename to sonoff/xdrv_01_mqtt.ino
index 1cd6d9aff..3cb76e86d 100644
--- a/sonoff/xdrv_02_mqtt.ino
+++ b/sonoff/xdrv_01_mqtt.ino
@@ -1,5 +1,5 @@
/*
- xdrv_02_mqtt.ino - mqtt support for Sonoff-Tasmota
+ xdrv_01_mqtt.ino - mqtt support for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends
@@ -782,115 +782,18 @@ bool MqttCommand()
return serviced;
}
-/*********************************************************************************************\
- * Presentation
-\*********************************************************************************************/
-
-#ifdef USE_WEBSERVER
-
-#define WEB_HANDLE_MQTT "mq"
-
-const char S_CONFIGURE_MQTT[] PROGMEM = D_CONFIGURE_MQTT;
-
-const char HTTP_BTN_MENU_MQTT[] PROGMEM =
- "