Skip to content

Commit

Permalink
Update ZgatewayIR.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile committed Nov 7, 2023
1 parent 1481b96 commit 2b8e7f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main/ZgatewayIR.ino
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,12 @@ void MQTTtoIR(char* topicOri, JsonObject& IRdata) {
}
if (signalSent) { // we acknowledge the sending by publishing the value to an acknowledgement topic, for the moment even if it is a signal repetition we acknowledge also
Log.notice(F("MQTTtoIR OK" CR));
IRdata["origin"] = subjectGTWIRtoMQTT;
enqueueJsonObject(IRdata);
// copy IRdata to IRdataAck document
StaticJsonDocument<JSON_MSG_BUFFER> IRdataAckBuffer;
JsonObject IRdataAck = IRdataAckBuffer.to<JsonObject>();
IRdataAck = IRdata;
IRdataAck["origin"] = subjectGTWIRtoMQTT;
enqueueJsonObject(IRdataAck);
}
irrecv.enableIRIn(); // ReStart the IR receiver (if not restarted it is not able to receive data)
} else {
Expand Down

0 comments on commit 2b8e7f0

Please sign in to comment.