2 Commits

Author SHA1 Message Date
Dmitry Borisenko
60e2ada31a some fix 2020-03-04 15:22:15 +03:00
Dmitry Borisenko
0064e557f1 air firmware upgrade 2020-03-04 01:56:24 +03:00
7 changed files with 21 additions and 9 deletions

View File

@@ -5,11 +5,12 @@ void initUpgrade() {
new_version = getURL("http://91.204.228.124:1100/update/esp32/version.txt"); new_version = getURL("http://91.204.228.124:1100/update/esp32/version.txt");
#endif #endif
#ifdef ESP8266 #ifdef ESP8266
new_version = getURL("http://91.204.228.124:1100/update/esp8266/version.txt"); //new_version = getURL("http://91.204.228.124:1100/update/esp8266/version.txt");
#endif #endif
Serial.println(new_version); Serial.println("[i] Last firmware version: ");
Serial.print(new_version);
String tmp = "{}"; String tmp = "{}";
if (new_version != "error") { if (new_version != "error") {
@@ -81,7 +82,7 @@ void upgrade_firmware() {
void handle_upgrade() { void handle_upgrade() {
if (upgrade_flag) { if (upgrade_flag) {
upgrade_flag = false; upgrade_flag = false;
upgrade_firmware(); upgrade_firmware();
} }
} }

View File

@@ -1 +0,0 @@
{"SSDP":"MODULES","chipID":"905542-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"your_ssid","password":"your_pass","timezone":3,"mqttServer":"","mqttPort":0,"mqttUser":"","mqttPass":"","scenario":"1","timers":"0","pushingbox_id":"","web_login":"admin","web_pass":"admin"}

1
data/config-my.json Normal file
View File

@@ -0,0 +1 @@
{"SSDP":"MODULES","chipID":"905542-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"rise","password":"hostel3333","timezone":3,"mqttServer":"m12.cloudmqtt.com","mqttPort":14053,"mqttUser":"lbscvzuj","mqttPass":"bLxlveOgaF8F","scenario":"1","timers":"0","pushingbox_id":"v7C133E426B0C69E","web_login":"admin","web_pass":"admin"}

View File

@@ -1 +1 @@
{"SSDP":"MODULES","chipID":"905542-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"rise","password":"hostel3333","timezone":3,"mqttServer":"m12.cloudmqtt.com","mqttPort":14053,"mqttUser":"lbscvzuj","mqttPass":"bLxlveOgaF8F","scenario":"1","timers":"0","pushingbox_id":"v7C133E426B0C69E","web_login":"admin","web_pass":"admin"} {"SSDP":"MODULES","chipID":"905542-1458415","ssidAP":"WiFi","passwordAP":"","ssid":"your_ssid","password":"your_pass","timezone":3,"mqttServer":"","mqttPort":0,"mqttUser":"","mqttPass":"","scenario":"1","timers":"0","pushingbox_id":"","web_login":"admin","web_pass":"admin"}

View File

@@ -29,7 +29,7 @@
}, },
{ {
"type": "h4", "type": "h4",
"title": "SPIFFS version: 2.2" "title": "SPIFFS version: 2.3"
}, },
{ {
"type": "link", "type": "link",

View File

@@ -60,7 +60,17 @@ void setup() {
getMemoryLoad("[i] After loading"); getMemoryLoad("[i] After loading");
ts.add(TEST, 14400, [&](void*) { #ifdef ESP8266
new_version = getURL("http://91.204.228.124:1100/update/esp8266/version.txt");
#endif
#ifdef ESP32
new_version = getURL("http://91.204.228.124:1100/update/esp32/version.txt");
#endif
Serial.print("[i] Last firmware version: ");
Serial.println(new_version);
ts.add(TEST, statistics_update, [&](void*) {
statistics(); statistics();

3
set.h
View File

@@ -1,4 +1,4 @@
String firmware_version = "2.2"; String firmware_version = "2.3";
String new_version; String new_version;
@@ -24,6 +24,7 @@ String new_version;
#define dhtT_update_int 10000 #define dhtT_update_int 10000
#define dhtH_update_int 10000 #define dhtH_update_int 10000
#define dht_calculation_update_int 10000 #define dht_calculation_update_int 10000
#define statistics_update 1000 * 60 * 60 * 12
//----------------------------------------------------------------- //-----------------------------------------------------------------