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",
"timezone": 1,
"ntp": "pool.ntp.org",
"mqttServer": "wqtt.ru",
"mqttPort": 8021,
"mqttServer": "91.204.228.124",
"mqttPort": 1883,
"mqttPrefix": "/iotTest",
"mqttUser": "rise",
"mqttPass": "hostel3333",
"mqttPass": "23ri22se32",
"scen": "1",
"telegramApi": "1416711569:AAEI0j83GmXqwzb_gnK1B0Am0gDwZoJt5xo",
"telegonof": "0",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -12,5 +12,5 @@ void clockInit() {
timeNow->hasSync();
},
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;
if (prevMsg != msg) {
prevMsg = msg;
if (msg != "na") {
myBot->sendMessage(jsonReadInt(configSetupJson, "chatId"), msg);
}
SerialPrint("<-", "Telegram", "chat ID: " + String(jsonReadInt(configSetupJson, "chatId")) + ", msg: " + msg);
}
}

View File

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