(Resolved) IR codes Dump Issue - IRrecvDump v2 VS OMG

resolved

#1

Hello Community!

The IR codes (raw) I receive using Ardiuno sketch IRrecvDump v2 and OMG are very different. Sending the raw data captured from IRrecvDump v2 via MQTT to OMG works but sending raw codes captured OMG doesnt work.

Raw Data IRrecvDump v2
unsigned int rawData[161] = {1050,500, 1050,500, 1050,2500, 1050,2450, 1100,500, 1050,450, 1100,2500, 1050,2500, 1050,2500, 1050,2450, 1050,2500, 1050,500, 1050,500, 1100,500, 1050,2450, 1100,500, 1050,500, 1050,450, 1150,500, 1050,500, 1100,450, 1100,500, 1050,500, 1100,450, 1100,450, 1100,500, 1100,500, 1050,2500, 1050,2450, 1050,500, 1100,2450, 1050,500, 1100,450, 1100,500, 1100,2450, 1050,2500, 1050,2450, 1100,500, 1050,2500, 1050,2450, 1050,500, 1100,500, 1050,2500, 1050,2450, 1050,2500, 1050,500, 1100,2450, 1050,2500, 1050,500, 1050,500, 1050,2450, 1100,2450, 1100,2450, 1100,450, 1100,2450, 1050,2500, 1050,500, 1050,500, 1100,450, 1100,2500, 1050,500, 1050,500, 1100,500, 1050,2500, 1050,500, 1050,500, 1050,500, 1100,500, 1050,450, 1100,500, 1100,500, 1050,550, 1050,450, 1100,500, 1050,500, 1100,500, 1050,2500, 1050,2500, 1050,2450, 1050,500, 1050};

V/S Captured by OMG:
1132,498,1084,498,1082,2480,1080,2488,1082,500,1080,500,1082,2478,1088,2506,1054,2478,1090,2488,1076,2500,1070,500,1084,500,1082,500,1080,2508,1056,502,1080,500,1084,500,1082,468,1114,496,1086,500,1082,500,1084,498,1086,420,1162,524,1058,500,1084,524,1058,2508,1058,2510,1054,506,1078,502,1082,498,1084,498,1084,498,1086,2508,1058,2506,1058,2502,1062,504,1080,2504,1060,2502,1064,502,1080,500,1082,2506,1058,2508,1060,2482,1090,492,1084,2504,1058,2508,1060,500,1084

What am I missing here? Any help is much appreciated …


#2

Hello,

Did you modified your pubsubclient.h max length ?

To receive raw data you need first to modify the library pubsubclient.h by replacing #define MQTT_MAX_PACKET_SIZE 128 by #define MQTT_MAX_PACKET_SIZE 512 To enable sending larger MQTT packet.

In your case I will go maybe to 1024


#3

Yes it was 512 made it 1024 and still same result. I also changed the IRremoteESP8266>src>IRrecv.h #define RAWBUF from 128U to 512U nothing happened.

EDIT: here is the full dump of both

IRrecvDump

Encoding : UNKNOWN
Code : D713EC94 (32 bits)
Timing[161]:
+1050, - 500 +1050, - 500 +1050, -2500 +1050, -2450
+1100, - 500 +1050, - 450 +1100, -2500 +1050, -2500
+1050, -2500 +1050, -2450 +1050, -2500 +1050, - 500
+1050, - 500 +1100, - 500 +1050, -2450 +1100, - 500
+1050, - 500 +1050, - 450 +1150, - 500 +1050, - 500
+1100, - 450 +1100, - 500 +1050, - 500 +1100, - 450
+1100, - 450 +1100, - 500 +1100, - 500 +1050, -2500
+1050, -2450 +1050, - 500 +1100, -2450 +1050, - 500
+1100, - 450 +1100, - 500 +1100, -2450 +1050, -2500
+1050, -2450 +1100, - 500 +1050, -2500 +1050, -2450
+1050, - 500 +1100, - 500 +1050, -2500 +1050, -2450
+1050, -2500 +1050, - 500 +1100, -2450 +1050, -2500
+1050, - 500 +1050, - 500 +1050, -2450 +1100, -2450
+1100, -2450 +1100, - 450 +1100, -2450 +1050, -2500
+1050, - 500 +1050, - 500 +1100, - 450 +1100, -2500
+1050, - 500 +1050, - 500 +1100, - 500 +1050, -2500
+1050, - 500 +1050, - 500 +1050, - 500 +1100, - 500
+1050, - 450 +1100, - 500 +1100, - 500 +1050, - 550
+1050, - 450 +1100, - 500 +1050, - 500 +1100, - 500
+1050, -2500 +1050, -2500 +1050, -2450 +1050, - 500
+1050
unsigned int rawData[161] = {1050,500, 1050,500, 1050,2500, 1050,2450, 1100,500, 1050,450, 1100,2500, 1050,2500, 1050,2500, 1050,2450, 1050,2500, 1050,500, 1050,500, 1100,500, 1050,2450, 1100,500, 1050,500, 1050,450, 1150,500, 1050,500, 1100,450, 1100,500, 1050,500, 1100,450, 1100,450, 1100,500, 1100,500, 1050,2500, 1050,2450, 1050,500, 1100,2450, 1050,500, 1100,450, 1100,500, 1100,2450, 1050,2500, 1050,2450, 1100,500, 1050,2500, 1050,2450, 1050,500, 1100,500, 1050,2500, 1050,2450, 1050,2500, 1050,500, 1100,2450, 1050,2500, 1050,500, 1050,500, 1050,2450, 1100,2450, 1100,2450, 1100,450, 1100,2450, 1050,2500, 1050,500, 1050,500, 1100,450, 1100,2500, 1050,500, 1050,500, 1100,500, 1050,2500, 1050,500, 1050,500, 1050,500, 1100,500, 1050,450, 1100,500, 1100,500, 1050,550, 1050,450, 1100,500, 1050,500, 1100,500, 1050,2500, 1050,2500, 1050,2450, 1050,500, 1050}; // UNKNOWN D713EC94

OMG Dump:

home/OpenMQTTGateway/IRtoMQTT/protocol -1
home/OpenMQTTGateway/IRtoMQTT/bits 50
home/OpenMQTTGateway/IRtoMQTT/raw
1094,498,1078,502,1080,2486,1082,2504,1060,500,1080,508,1076,2488,1078,2506,1060,2478,1088,2504,1060,2506,1060,498,1082,500,1082,488,1096,2506,1060,500,1082,502,1082,498,1084,496,1084,494,1088,504,1080,524,1058,500,1080,444,1138,510,1072,420,1162,526,1056,2486,1082,2506,1066,492,1080,502,1084,496,1086,480,1102,462,1120,2508,1062,2504,1058,2486,1080,502,1082,2504,1060,2432,1132,502,1080,502,1080,2508,1060,2478,1084,2512,1060,494,1080,2508,1062,2504,1072,486,1080


#4

I suppose you are using the same version of IRremoteESP8266 in both tests?


#5

the arduino library version says its 2.01 and the library used in OMG is 2.2.0


#6

Could you try to add this to ZgatewayIR
uint16_t CAPTURE_BUFFER_SIZE = 1024;

and try maybe to compare with the same versions of the libraries


#7

Sorry for late reply, it was 2:30 am here in India. I tried it no changes exact same length.


#8

could you try receive dump of version 2.2.0?


#9

I did… and I do get same results as in full code…


#10

By full code you mean with OMG ?


#11

No, IRrecvDump v2. 20 gives me the full code and doesn’t clip anything. OMG after all modifications suggested sends incomplete code. The pubsub isn’t a problem because i can publish full code as captured by IRrecvDump and it works.


#12

Could you try to replace line 34 of ZgatewayIR by

IRrecv irrecv(IR_RECEIVER_PIN, 1024, 15U, true);


Home Assistant and IR gateway problems
#13

Just Awesome… This works flawlessly! I cant thank you enough for OMG and the time you give in making this better. If you ever come to India I d like to buy you some beer! Cheers :slight_smile: