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