mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 22:52:19 +03:00
websocket & function
This commit is contained in:
@@ -25,6 +25,12 @@ void PwmOut::execute(String state) {
|
||||
jsonWriteInt(configStoreJson, _key, state.toInt());
|
||||
saveStore();
|
||||
publishStatus(_key, state);
|
||||
String path = mqttRootDevice + "/" + _key + "/status";
|
||||
String json = "{}";
|
||||
jsonWriteStr(json, "status", state);
|
||||
String MyJson = json;
|
||||
jsonWriteStr(MyJson, "topic", path);
|
||||
ws.textAll(MyJson);
|
||||
}
|
||||
|
||||
MyPwmOutVector* myPwmOut = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user