From 8aad413ce30d9bdbc1d22469f325e590d106da7b Mon Sep 17 00:00:00 2001 From: 1technophile Date: Sat, 27 Apr 2019 14:13:55 +0200 Subject: [PATCH] add hexadecimal publication to IRtoMQTT with ESP8266 --- ZgatewayIR.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ZgatewayIR.ino b/ZgatewayIR.ino index 88e55c9..08aaa27 100644 --- a/ZgatewayIR.ino +++ b/ZgatewayIR.ino @@ -106,7 +106,10 @@ void IRtoMQTT(){ IRdata.set("value", (unsigned long)(results.value)); IRdata.set("protocol", (int)(results.decode_type)); IRdata.set("bits",(int)(results.bits)); - + #ifdef ESP8266 //resultToHexidecimal is only available with IRremoteESP8266 + String hex = resultToHexidecimal(&results); + IRdata.set("hex", (char *)hex.c_str()); + #endif String rawCode = ""; // Dump data for (uint16_t i = 1; i < results.rawlen; i++) {