добавил посылку событий в сокеты

This commit is contained in:
Dmitry Borisenko
2022-02-02 21:40:45 +01:00
parent a2f5927172
commit bd1d25d79a
3 changed files with 5 additions and 2 deletions

View File

@@ -127,8 +127,8 @@ void publishStatusWs(const String& topic, const String& data) {
String path = mqttRootDevice + "/" + topic + "/status";
String json = "{}";
jsonWriteStr(json, "status", data);
// standWebSocket.sendTXT(num, json);
// mqtt.publish(path.c_str(), json.c_str(), false);
jsonWriteStr(json, "topic", path);
standWebSocket.broadcastTXT(json);
}
// void sendMark(const char* filename, const char* mark, uint8_t num) {