fix Discovery, DugTrace

This commit is contained in:
Mit4el
2024-09-21 11:28:46 +03:00
parent b9c07b809f
commit af0f782f07
17 changed files with 80 additions and 101 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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");

View File

@@ -1,6 +1,5 @@
#include "Global.h"
#include "classes/IoTDiscovery.h"
#include "IoTDiscovery.h"
IoTDiscovery::IoTDiscovery(const String &parameters) : IoTItem(parameters)
{

View File

@@ -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;
}

View File

@@ -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",

View File

@@ -219,7 +219,7 @@ public:
}
}
IoTDiscovery *getBenchmarkTask()
IoTDiscovery *getHADiscovery()
{
if (HA)
return this;

View File

@@ -1,5 +1,5 @@
{
"menuSection": "virtual",
"menuSection": "virtual_elments",
"configItem": [
{
"global": 0,

View File

@@ -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;

View File

@@ -1,5 +1,5 @@
{
"menuSection": "virtual",
"menuSection": "virtual_elments",
"configItem": [
{
"global": 0,