запустил dashboard

This commit is contained in:
Dmitry Borisenko
2022-02-03 21:37:32 +01:00
parent 0540ea5b04
commit c51286ffc0
3 changed files with 13 additions and 11 deletions

View File

@@ -41,6 +41,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
sendFileToWs5("/items.json", num, 1024);
sendFileToWs5("/widgets.json", num, 1024);
sendFileToWs5("/config.json", num, 1024);
sendFileToWs5("/settings.json", num, 1024);
}
if (headerStr == "/gifnoc") {
writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256);
@@ -129,7 +130,7 @@ void sendFileToWs5(const char* filename, uint8_t num, size_t frameSize) {
}
void publishStatusWs(const String& topic, const String& data) {
String path = mqttRootDevice + "/" + topic + "/status";
String path = mqttRootDevice + "/" + topic; //+ "/status";
String json = "{}";
jsonWriteStr(json, "status", data);
jsonWriteStr(json, "topic", path);