mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-31 04:19:15 +03:00
добавление кнопок в элемент
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,12 +4,12 @@
|
|||||||
<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.4.3</title>
|
<title>IoT Manager 4.4.4</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?443" />
|
<link rel="stylesheet" href="/build/bundle.css?444" />
|
||||||
|
|
||||||
<script defer src="/build/bundle.js?443"></script>
|
<script defer src="/build/bundle.js?444"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|||||||
@@ -62,7 +62,9 @@
|
|||||||
"logid": "t",
|
"logid": "t",
|
||||||
"points": 365,
|
"points": 365,
|
||||||
"telegram": 0,
|
"telegram": 0,
|
||||||
"test": 0
|
"test": 0,
|
||||||
|
"btn-defvalue": 0,
|
||||||
|
"btn-reset": "nil"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"global": 0,
|
"global": 0,
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class IoTItem {
|
|||||||
virtual void onRegEvent(IoTItem* item);
|
virtual void onRegEvent(IoTItem* item);
|
||||||
virtual void onMqttRecive(String& topic, String& msg);
|
virtual void onMqttRecive(String& topic, String& msg);
|
||||||
virtual void onMqttWsAppConnectEvent();
|
virtual void onMqttWsAppConnectEvent();
|
||||||
|
virtual void onModuleOrder(String& key, String& value);
|
||||||
|
|
||||||
// делаем доступным модулям отправку сообщений в телеграм
|
// делаем доступным модулям отправку сообщений в телеграм
|
||||||
virtual void sendTelegramMsg(bool often, String msg);
|
virtual void sendTelegramMsg(bool often, String msg);
|
||||||
|
|||||||
@@ -227,6 +227,24 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
|||||||
standWebSocket.sendTXT(num, "/tstr|");
|
standWebSocket.sendTXT(num, "/tstr|");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// получаем команду посланную из модуля
|
||||||
|
if (headerStr == "/order|") {
|
||||||
|
SerialPrint("i", F("=>WS"), "Msg from module");
|
||||||
|
String json;
|
||||||
|
writeUint8tToString(payload, length, headerLenth, json);
|
||||||
|
|
||||||
|
String id, key, value;
|
||||||
|
jsonRead(json, "id", id);
|
||||||
|
jsonRead(json, "key", key);
|
||||||
|
jsonRead(json, "value", value);
|
||||||
|
|
||||||
|
for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) {
|
||||||
|
if ((*it)->getID() == id) {
|
||||||
|
(*it)->onModuleOrder(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case WStype_BIN: {
|
case WStype_BIN: {
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ void IoTItem::checkIntFromNet() {
|
|||||||
void IoTItem::onRegEvent(IoTItem* item) {}
|
void IoTItem::onRegEvent(IoTItem* item) {}
|
||||||
void IoTItem::onMqttRecive(String& topic, String& msg) {}
|
void IoTItem::onMqttRecive(String& topic, String& msg) {}
|
||||||
void IoTItem::onMqttWsAppConnectEvent() {}
|
void IoTItem::onMqttWsAppConnectEvent() {}
|
||||||
|
void IoTItem::onModuleOrder(String& key, String& value) {}
|
||||||
|
|
||||||
// делаем доступным модулям отправку сообщений в телеграм
|
// делаем доступным модулям отправку сообщений в телеграм
|
||||||
void IoTItem::sendTelegramMsg(bool often, String msg) {}
|
void IoTItem::sendTelegramMsg(bool often, String msg) {}
|
||||||
|
|||||||
@@ -240,6 +240,13 @@ class LogingDaily : public IoTItem {
|
|||||||
int calculateMaxCount() {
|
int calculateMaxCount() {
|
||||||
return 86400;
|
return 86400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onModuleOrder(String &key, String &value) {
|
||||||
|
if (key == "defvalue") {
|
||||||
|
} else if (key == "reset") {
|
||||||
|
}
|
||||||
|
SerialPrint("i", F("LogingDaily"), "key " + key + ", value " + value);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void *getAPI_LogingDaily(String subtype, String param) {
|
void *getAPI_LogingDaily(String subtype, String param) {
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
"logid": "t",
|
"logid": "t",
|
||||||
"points": 365,
|
"points": 365,
|
||||||
"telegram": 0,
|
"telegram": 0,
|
||||||
"test": 0
|
"test": 0,
|
||||||
|
"btn-defvalue": 0,
|
||||||
|
"btn-reset": "nil"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"about": {
|
"about": {
|
||||||
|
|||||||
Reference in New Issue
Block a user