gateway: execute array but echo each executed command #2

Merged
nicu merged 4 commits from gateway into master 2022-10-25 14:02:50 +02:00
Showing only changes of commit dd058edb50 - Show all commits

View File

@ -33,8 +33,8 @@ void setup() {
}
void loop() {
StaticJsonDocument<200> jsonDoc;
readCommand();
StaticJsonDocument<200> jsonDoc;
readRcSwitch(jsonDoc);
Dht::read(jsonDoc);
if (!jsonDoc.isNull()) {
@ -116,13 +116,10 @@ void runRcSwitchCommand(JsonVariant jsonDoc) {
} else {
mySwitch.setProtocol(protocol);
mySwitch.send(rcSwitch["value"]);
// Serial.println((const char*)rcSwitch["value"]);
}
char output[256];
serializeJson(jsonDoc, output);
Serial.println(output);
serializeJson(jsonDoc, Serial);
Serial.println();
// blink();
// delay(1000);
}
void runJsonCommands(String cmd) {