запустил кнопки в веб интерфейсе

This commit is contained in:
Dmitry Borisenko
2022-08-16 00:56:23 +02:00
parent dfd85d88cb
commit 85f8deb12a
4 changed files with 11 additions and 11 deletions

View File

@@ -84,14 +84,14 @@ void IoTItem::regEvent(String value, String consoleInfo = "") {
generateEvent(_id, value);
publishStatusMqtt(_id, value);
//отправка события другим устройствам в сети==============================
if (jsonReadBool(settingsFlashJson, "mqttin")) {
String json = "{}";
jsonWriteStr_(json, "id", _id);
jsonWriteStr_(json, "val", value);
jsonWriteInt_(json, "int", _interval + 5000); // 5 секунд про запас
publishEvent(_id, json);
SerialPrint("i", F("<=MQTT"), "Broadcast event: " + json);
}
// if (jsonReadBool(settingsFlashJson, "mqttin")) {
// String json = "{}";
// jsonWriteStr_(json, "id", _id);
// jsonWriteStr_(json, "val", value);
// jsonWriteInt_(json, "int", _interval + 5000); // 5 секунд про запас
// publishEvent(_id, json);
// SerialPrint("i", F("<=MQTT"), "Broadcast event: " + json);
//}
//========================================================================
publishStatusWs(_id, value); // Ilya, data: "1" (analog sensor, round set to 1, should be "1.0")
SerialPrint("i", "Sensor " + consoleInfo, "'" + _id + "' data: " + value + "'");