mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Merge branch 'ver4dev' of https://github.com/biveraxe/IoTManager into ver4dev
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
|||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||||
|
|
||||||
<title>IoT Manager 4.1.1</title>
|
<title>IoT Manager 4.1.2</title>
|
||||||
|
|
||||||
<link rel='icon' type='image/png' href='/favicon.ico'>
|
<link rel='icon' type='image/png' href='/favicon.ico'>
|
||||||
<link rel='stylesheet' href='/build/bundle.css'>
|
<link rel='stylesheet' href='/build/bundle.css'>
|
||||||
|
|||||||
@@ -16,5 +16,5 @@
|
|||||||
"mqttPass": "hostel3333",
|
"mqttPass": "hostel3333",
|
||||||
"serverip": "http://206.189.49.244:8081",
|
"serverip": "http://206.189.49.244:8081",
|
||||||
"log": 0,
|
"log": 0,
|
||||||
"mqttin": 1
|
"mqttin": 0
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ void globalVarsSync() {
|
|||||||
|
|
||||||
String getParamsJson() {
|
String getParamsJson() {
|
||||||
String json;
|
String json;
|
||||||
serializeJson(*getLocalItemsAsJSON(), json);
|
serializeJson(*getLocalItemsAsJSON(), json); // Ilya, data: "1.00" (analog sensor, round set to 1, should be "1.0")
|
||||||
jsonWriteStr_(json, "params", "");
|
jsonWriteStr_(json, "params", "");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void IoTItem::regEvent(String value, String consoleInfo = "") {
|
|||||||
SerialPrint("i", F("<=MQTT"), "Broadcast event: " + json);
|
SerialPrint("i", F("<=MQTT"), "Broadcast event: " + json);
|
||||||
}
|
}
|
||||||
//========================================================================
|
//========================================================================
|
||||||
publishStatusWs(_id, value);
|
publishStatusWs(_id, value); // Ilya, data: "1" (analog sensor, round set to 1, should be "1.0")
|
||||||
SerialPrint("i", "Sensor " + consoleInfo, "'" + _id + "' data: " + value + "'");
|
SerialPrint("i", "Sensor " + consoleInfo, "'" + _id + "' data: " + value + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ void IoTItem::regEvent(float regvalue, String consoleInfo = "") {
|
|||||||
if (_plus) regvalue = regvalue + _multiply;
|
if (_plus) regvalue = regvalue + _multiply;
|
||||||
if (_round >= 0 && _round < 6) {
|
if (_round >= 0 && _round < 6) {
|
||||||
int sot = _round ? pow(10, (int)_round) : 1;
|
int sot = _round ? pow(10, (int)_round) : 1;
|
||||||
regvalue = round(regvalue*sot)/sot;
|
regvalue = round(regvalue * sot) / sot;
|
||||||
}
|
}
|
||||||
if (_map1 != _map2) regvalue = map(regvalue, _map1, _map2, _map3, _map4);
|
if (_map1 != _map2) regvalue = map(regvalue, _map1, _map2, _map3, _map4);
|
||||||
|
|
||||||
@@ -134,8 +134,10 @@ IoTItem* findIoTItem(String name) { // поиск элемента модуля
|
|||||||
|
|
||||||
String getItemValue(String name) { // поиск плюс получение значения
|
String getItemValue(String name) { // поиск плюс получение значения
|
||||||
IoTItem* tmp = findIoTItem(name);
|
IoTItem* tmp = findIoTItem(name);
|
||||||
if (tmp) return tmp->getValue();
|
if (tmp)
|
||||||
else return "";
|
return tmp->getValue();
|
||||||
|
else
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticJsonDocument<JSON_BUFFER_SIZE> docForExport;
|
StaticJsonDocument<JSON_BUFFER_SIZE> docForExport;
|
||||||
|
|||||||
Reference in New Issue
Block a user