websocket & function

This commit is contained in:
avaksru
2021-12-13 16:26:43 +03:00
parent e46a6247f9
commit d083fbf9cf
28 changed files with 602 additions and 103 deletions

View File

@@ -19,6 +19,12 @@ void Output::execute(String value) {
eventGen2(_key, value);
jsonWriteStr(configLiveJson, _key, value);
publishStatus(_key, value);
String path = mqttRootDevice + "/" + _key + "/status";
String json = "{}";
jsonWriteStr(json, "status", value);
String MyJson = json;
jsonWriteStr(MyJson, "topic", path);
ws.textAll(MyJson);
//publishLastUpdateTime(_key, timeNow->getTime());
}