diff --git a/src/MqttClient.cpp b/src/MqttClient.cpp index 28d37249..e86131ce 100644 --- a/src/MqttClient.cpp +++ b/src/MqttClient.cpp @@ -159,7 +159,6 @@ void mqttCallback(char* topic, uint8_t* payload, size_t length) { //здесь мы получаем события с других устройств, которые потом проверяются в сценариях этого устройства else if (topicStr.indexOf("event") != -1) { - //пока не работает сетевой обмен этот код будет закомментирован if (!jsonReadBool(settingsFlashJson, "mqttin")) { return; } @@ -167,7 +166,7 @@ void mqttCallback(char* topic, uint8_t* payload, size_t length) { String devId = selectFromMarkerToMarker(topicStr, "/", 2); String id = selectFromMarkerToMarker(topicStr, "/", 3); analyzeMsgFromNet(payloadStr, id); - //SerialPrint("i", F("=>MQTT"), "Received event from other device: '" + devId + "' " + id + " " + valAsStr); + // SerialPrint("i", F("=>MQTT"), "Received event from other device: '" + devId + "' " + id + " " + valAsStr); } } diff --git a/src/utils/SerialPrint.cpp b/src/utils/SerialPrint.cpp index d057beb3..a1e8fde2 100644 --- a/src/utils/SerialPrint.cpp +++ b/src/utils/SerialPrint.cpp @@ -17,13 +17,13 @@ void SerialPrint(const String& errorLevel, const String& module, const String& m } } - // if (errorLevel == "E") { - // cleanString(tosend); - // // создаем событие об ошибке для возможной реакции в сценарии - // if (itemId != "") { - // createItemFromNet(itemId + "_onError", tosend, -4); - // } else { - // createItemFromNet("onError", tosend, -4); - // } - // } + if (errorLevel == "E") { + cleanString(tosend); + // создаем событие об ошибке для возможной реакции в сценарии + if (itemId != "") { + createItemFromNet(itemId + "_onError", tosend, -4); + } else { + // createItemFromNet("onError", tosend, -4); + } + } } \ No newline at end of file