mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
fix Discovery, DugTrace
This commit is contained in:
@@ -9,6 +9,7 @@ __NOINIT_ATTR static re_restart_debug_t _debug_info;
|
||||
#include "esp_err.h"
|
||||
#include "soc/soc_memory_layout.h"
|
||||
#include "soc/cpu.h"
|
||||
#include "esp_ota_ops.h"
|
||||
|
||||
// RU: Размер буфера для конвертации даты и времeни в строку
|
||||
#define CONFIG_FORMAT_STRFTIME_BUFFER_SIZE 32
|
||||
|
||||
@@ -49,13 +49,13 @@ void resetSettingsFlashByPanic()
|
||||
writeFile(F("/scenario_bak.txt"), update.scenarioTxt);
|
||||
writeFile(F("/layout_bak.json"), update.layoutJson);
|
||||
*/
|
||||
update.configJson = "[]";
|
||||
update.scenarioTxt = "";
|
||||
update.layoutJson = "[]";
|
||||
writeFile(F("/config.json"), update.configJson);
|
||||
writeFile(F("/scenario.txt"), update.scenarioTxt);
|
||||
writeFile(F("/layout.json"), update.layoutJson);
|
||||
ESP.reset();
|
||||
//update.configJson = "[]";
|
||||
//update.scenarioTxt = "";
|
||||
//update.layoutJson = "[]";
|
||||
writeFile(F("/config.json"), "[]");
|
||||
writeFile(F("/scenario.txt"), "");
|
||||
writeFile(F("/layout.json"), "[]");
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
void syncValuesFlashJson()
|
||||
|
||||
@@ -158,7 +158,10 @@ void setup() {
|
||||
bootloop_panic_count = -1;
|
||||
}
|
||||
if (bootloop_panic_count == -1)
|
||||
{
|
||||
SerialPrint("E", "CORE", F("CONFIG and SCENARIO reset !!!"));
|
||||
bootloop_panic_count = 0;
|
||||
}
|
||||
|
||||
// настраиваем микроконтроллер
|
||||
configure("/config.json");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "Global.h"
|
||||
#include "classes/IoTDiscovery.h"
|
||||
#include "IoTDiscovery.h"
|
||||
|
||||
IoTDiscovery::IoTDiscovery(const String ¶meters) : IoTItem(parameters)
|
||||
{
|
||||
|
||||
@@ -258,11 +258,11 @@ IoTBench *IoTItem::getBenchmarkLoad()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
IoTBench *IoTItem::getHOMEdDiscovery()
|
||||
IoTDiscovery *IoTItem::getHOMEdDiscovery()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
IoTBench *IoTItem::getHADiscovery()
|
||||
IoTDiscovery *IoTItem::getHADiscovery()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "sensors",
|
||||
"menuSection": "executive_devices",
|
||||
"configItem": [
|
||||
{
|
||||
"global": 0,
|
||||
@@ -37,7 +37,7 @@
|
||||
"title": "EctoControlAdapter",
|
||||
"moduleDesc": "Управление отопительным котлом через адаптер EctoControl по протоколам OpenTherm, eBUS, Navien. Посредством Modbus RTU. Разъем 4P4C: 1-Желтый(красный)+12V; 2-Белый-GND; 3-Зелёный-A; 4-Коричневый(Синий)-B",
|
||||
"propInfo": {
|
||||
"addr": "Адрес slav",
|
||||
"addr": "Адрес slave",
|
||||
"int": "Количество секунд между опросами датчика.",
|
||||
"RX": "Пин RX",
|
||||
"TX": "Пин TX",
|
||||
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
IoTDiscovery *getBenchmarkTask()
|
||||
IoTDiscovery *getHADiscovery()
|
||||
{
|
||||
if (HA)
|
||||
return this;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "virtual",
|
||||
"menuSection": "virtual_elments",
|
||||
"configItem": [
|
||||
{
|
||||
"global": 0,
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
if (!HOMEd)
|
||||
return;
|
||||
|
||||
if (msg.indexOf("HELLO") == -1)
|
||||
if (payloadStr.indexOf("HELLO") == -1)
|
||||
{
|
||||
/* String dev = selectToMarkerLast(topic, "/");
|
||||
dev.toUpperCase();
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
IoTBench *getBenchmarkTask()
|
||||
IoTDiscovery *getHOMEdDiscovery()
|
||||
{
|
||||
if (HOMEd)
|
||||
return this;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"menuSection": "virtual",
|
||||
"menuSection": "virtual_elments",
|
||||
"configItem": [
|
||||
{
|
||||
"global": 0,
|
||||
|
||||
Reference in New Issue
Block a user