This commit is contained in:
Dmitry Borisenko
2020-12-15 22:10:40 +01:00
parent 9fd88ffae1
commit 9934690d0a
9 changed files with 19 additions and 11 deletions

View File

@@ -7,11 +7,11 @@
"routerpass": "hostel3333", "routerpass": "hostel3333",
"timezone": 1, "timezone": 1,
"ntp": "pool.ntp.org", "ntp": "pool.ntp.org",
"mqttServer": "wqtt.ru", "mqttServer": "91.204.228.124",
"mqttPort": 8021, "mqttPort": 1883,
"mqttPrefix": "/iotTest", "mqttPrefix": "/iotTest",
"mqttUser": "rise", "mqttUser": "rise",
"mqttPass": "hostel3333", "mqttPass": "23ri22se32",
"scen": "1", "scen": "1",
"telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo", "telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo",
"telegonof": "0", "telegonof": "0",

View File

@@ -15,7 +15,10 @@
#define FIRMWARE_NAME "esp32" #define FIRMWARE_NAME "esp32"
#endif #endif
//===========FSystem============================================================================================================================================== //===========FileSystem==============================================================================================================================================
#define littlefs_on
//==================================================================================================================================================================
#define NUM_BUTTONS 6 #define NUM_BUTTONS 6
#define LED_PIN 2 #define LED_PIN 2

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <ESPAsyncWebServer.h> #include <ESPAsyncWebServer.h>
#include <FS.h> //#include <FS.h>
#ifdef ESP8266 #ifdef ESP8266
#include <LittleFS.h> #include <LittleFS.h>

View File

@@ -2,7 +2,7 @@
#include <Arduino.h> #include <Arduino.h>
#include "FS.h" //#include "FS.h"
#ifdef ESP32 #ifdef ESP32
#include "LITTLEFS.h" #include "LITTLEFS.h"

View File

@@ -4,7 +4,7 @@
#include "Consts.h" #include "Consts.h"
#include "FS.h" //#include "FS.h"
#ifdef ESP32 #ifdef ESP32
#include "LITTLEFS.h" #include "LITTLEFS.h"

View File

@@ -47,10 +47,12 @@ lib_deps =
ESPAsyncUDP ESPAsyncUDP
EspSoftwareSerial EspSoftwareSerial
CTBot CTBot
SPIFFS
monitor_filters = esp8266_exception_decoder monitor_filters = esp8266_exception_decoder
upload_speed = 921600 upload_speed = 921600
monitor_speed = 115200 monitor_speed = 115200
board_build.filesystem = littlefs ;board_build.filesystem = littlefs
board_build.filesystem = SPIFFS
;============================================================================================================================================= ;=============================================================================================================================================
[env:esp8266] [env:esp8266]
framework = arduino framework = arduino

View File

@@ -12,5 +12,5 @@ void clockInit() {
timeNow->hasSync(); timeNow->hasSync();
}, },
nullptr, true); nullptr, true);
SerialPrint("I", F("Time"), F("Clock Init")); SerialPrint("I", F("NTP"), F("Clock Init"));
} }

View File

@@ -76,7 +76,9 @@ void sendTelegramMsg() {
static String prevMsg; static String prevMsg;
if (prevMsg != msg) { if (prevMsg != msg) {
prevMsg = msg; prevMsg = msg;
myBot->sendMessage(jsonReadInt(configSetupJson, "chatId"), msg); if (msg != "na") {
myBot->sendMessage(jsonReadInt(configSetupJson, "chatId"), msg);
}
SerialPrint("<-", "Telegram", "chat ID: " + String(jsonReadInt(configSetupJson, "chatId")) + ", msg: " + msg); SerialPrint("<-", "Telegram", "chat ID: " + String(jsonReadInt(configSetupJson, "chatId")) + ", msg: " + msg);
} }
} }

View File

@@ -228,8 +228,9 @@ void timeInit() {
prevTime = timenow; prevTime = timenow;
jsonWriteStr(configLiveJson, "timenow", timenow); jsonWriteStr(configLiveJson, "timenow", timenow);
eventGen2("timenow", timenow); eventGen2("timenow", timenow);
SerialPrint("I", F("NTP"), timenow);
} }
}, },
nullptr, true); nullptr, true);
SerialPrint("I", F("Time"), F("Handle time init")); SerialPrint("I", F("NTP"), F("Handle time init"));
} }