mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
запустил кнопки в веб интерфейсе
This commit is contained in:
@@ -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 + "'");
|
||||
|
||||
Reference in New Issue
Block a user