mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
запустил кнопки в веб интерфейсе
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
|
||||
<title>IoT Manager 4.1.2</title>
|
||||
<title>IoT Manager 4.1.3</title>
|
||||
|
||||
<link rel='icon' type='image/png' href='/favicon.ico'>
|
||||
<link rel='stylesheet' href='/build/bundle.css'>
|
||||
|
||||
@@ -150,7 +150,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
||||
writeUint8tToString(payload, length, headerLenth, msg);
|
||||
String key = selectFromMarkerToMarker(msg, "/", 0);
|
||||
String value = selectFromMarkerToMarker(msg, "/", 1);
|
||||
//generateOrder(key, value);
|
||||
generateOrder(key, value);
|
||||
SerialPrint("i", F("=>WS"), "Msg from svelte web, WS No: " + String(num) + ", msg: " + msg);
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -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