My Daikin AC - IRRecvDumpV2 work corretly but OMG no

#1

Hi Friend,
I’ve been looking for a solution for two weeks now.
I have a Daikin A / C that I wanted to control using OMG.
The IR codes (raw) I receive using Ardiuno sketch IRrecvDump v2 work, infact it tell me its a DAIKIN and see me complete RAW.

IRrecvDumpV2 is now running and waiting for IR input on Pin 2
Timestamp : 000244.559
Encoding  : DAIKIN
Code      : 11DA27004202045A11DA27000039260040000006600000C1800058 (216 bits)
Mesg Desc.: Power: On, Mode: 3 (COOL), Temp: 19C, Fan: 2, Powerful: Off, Quiet:    Off, Sensor: Off, Eye: On, Mold: Off, Swing (Horizontal): Off, Swing (Vertical): Off, Current Time: 17:06, On Time: Off, Off Time: Off
Library   : v2.5.6

Raw Timing[583]:
+   462, -   402,    +   434, -   450,    +   436, -   404,    +   432, -   428, 
+   434, -   452,    +   410, - 25394,    +  3454, -  1720,    +   464, -  1262, 
+   436, -   428,    +   434, -   428,    +   430, -   430,    +   436, -  1288, 
+   434, -   430,    +   432, -   428,    +   432, -   454,    +   410, -   452, 
+   410, -  1288,    +   438, -   426,    +   436, -  1288,    +   434, -  1288, 
+   436, -   430,    +   432, -  1240,    +   488, -  1286,    +   436, -  1288, 
+   438, -  1286,    +   438, -  1286,    +   436, -   428,    +   434, -   428, 
+   434, -  1290,    +   434, -   452,    +   412, -   428,    +   434, -   452, 
+   410, -   428,    +   432, -   428,    +   434, -   426,    +   436, -   428, 
+   434, -   452,    +   410, -   426,    +   436, -   450,    +   410, -  1286, 
+   436, -   430,    +   434, -  1290,    +   436, -   428,    +   436, -   428, 
+   432, -   452,    +   436, -  1262,    +   436, -  1314,    +   436, -   426, 
+   412, -   426,    +   436, -   428,    +   434, -   426,    +   436, -   426, 
+   434, -   452,    +   412, -   450,    +   412, -   450,    +   412, -   448, 
+   412, -   426,    +   436, -   426,    +   436, -   450,    +   412, -   450, 
+   412, -   426,    +   434, -   450,    +   412, -   428,    +   434, -  1288, 
+   436, -  1286,    +   438, -  1288,    +   436, -   424,    +   432, -  1290, 
+   436, -   452,    +   410, -  1290,    +   438, -  1288,    +   438, - 34830, 
+  3456, -  1718,    +   436, -  1288,    +   438, -   450,    +   410, -   424, 
+   436, -   428,    +   430, -  1292,    +   438, -   426,    +   436, -   430, 
+   432, -   452,    +   410, -   428,    +   434, -  1288,    +   436, -   450, 
+   412, -  1286,    +   438, -  1288,    +   434, -   430,    +   432, -  1288, 
+   436, -  1286,    +   438, -  1286,    +   438, -  1288,    +   436, -  1288, 
+   436, -   452,    +   412, -   450,    +   410, -  1290,    +   436, -   452, 
+   408, -   428,    +   434, -   452,    +   410, -   452,    +   410, -   428, 
+   434, -   428,    +   432, -   452,    +   412, -   426,    +   436, -   450, 
+   412, -   450,    +   436, -   426,    +   410, -  1288,    +   436, -   428, 
+   432, -   452,    +   410, -   452,    +   410, -   428,    +   432, -  1290, 
+   436, -   428,    +   434, -   450,    +   438, -  1262,    +   438, -   426, 
+   434, -   454,    +   410, -   426,    +   434, -   452,    +   410, -   452, 
+   410, -   452,    +   410, -   452,    +   434, -   426,    +   410, -  1288, 
+   436, -   452,    +   410, -   428,    +   434, -   428,    +   434, -   430, 
+   432, -   430,    +   434, -   450,    +   410, -  1288,    +   436, -   450, 
+   412, -  1290,    +   434, -  1290,    +   436, -   428,    +   432, -  1290, 
+   438, -   426,    +   434, - 34830,    +  3456, -  1718,    +   462, -  1260, 
+   438, -   426,    +   462, -   424,    +   412, -   428,    +   432, -  1294, 
+   434, -   452,    +   408, -   430,    +   434, -   426,    +   436, -   426, 
+   436, -  1286,    +   436, -   430,    +   432, -  1288,    +   464, -  1262, 
+   438, -   428,    +   434, -  1288,    +   436, -  1288,    +   438, -  1286, 
+   438, -  1286,    +   436, -  1288,    +   436, -   430,    +   434, -   450, 
+   412, -  1286,    +   436, -   430,    +   430, -   430,    +   434, -   452, 
+   410, -   428,    +   432, -   430,    +   432, -   430,    +   432, -   432, 
+   432, -   430,    +   432, -   450,    +   412, -   450,    +   412, -   428, 
+   434, -   450,    +   412, -   450,    +   412, -   426,    +   432, -   430, 
+   434, -   426,    +   438, -   426,    +   434, -   450,    +   412, -  1286, 
+   438, -   426,    +   458, -   428,    +   410, -  1288,    +   436, -  1288, 
+   436, -  1290,    +   434, -   454,    +   408, -   430,    +   432, -   452, 
+   410, -  1288,    +   438, -  1288,    +   434, -   430,    +   434, -   452, 
+   410, -  1276,    +   450, -   452,    +   412, -   428,    +   434, -   450, 
+   412, -   416,    +   434, -   440,    +   434, -   450,    +   412, -   428, 
+   432, -   454,    +   410, -   450,    +   410, -   452,    +   410, -   428, 
+   436, -   428,    +   432, -   428,    +   434, -   452,    +   412, -   426, 
+   434, -   430,    +   432, -  1288,    +   438, -   428,    +   434, -   428, 
+   432, -   430,    +   434, -   428,    +   430, -   430,    +   434, -   450, 
+   410, -   452,    +   414, -   428,    +   434, -   452,    +   412, -   428, 
+   436, -   426,    +   434, -   450,    +   410, -   428,    +   432, -   430, 
+   434, -   450,    +   412, -   450,    +   412, -   426,    +   434, -   428, 
+   432, -  1290,    +   438, -  1286,    +   438, -   450,    +   410, -   430, 
+   434, -   450,    +   412, -   450,    +   434, -   404,    +   432, -   454, 
+   408, -   428,    +   434, -   428,    +   434, -   426,    +   434, -   452, 
+   436, -  1264,    +   434, -  1290,    +   438, -   450,    +   410, -   428, 
+   434, -   424,    +   436, -   428,    +   432, -   428,    +   434, -   452, 
+   410, -   430,    +   436, -   450,    +   412, -   428,    +   432, -   452, 
+   410, -   452,    +   412, -   428,    +   434, -   428,    +   434, -   428, 
+   434, -   432,    +   430, -   452,    +   410, -   452,    +   410, -  1290, 
+   434, -   452,    +   410, -   452,    +   408, -   428,    +   434, -   452, 
+   410, -   428,    +   432, -  1290,    +   438, -  1288,    +   436, -   428, 
+   434, -   428,    +   434, -   452,    +   410, -   430,    +   434, -   426, 
+   436, -   452,    +   410, -   426,    +   434, -  1290,    +   436, -   428, 
+   434, -   452,    +   410, -   430,    +   434, -   428,    +   432, -   428, 
+   434, -   428,    +   434, -   452,    +   410, -   428,    +   434, -   452, 
+   410, -   428,    +   436, -   450,    +   410, -  1288,    +   436, -  1288, 
+   436, -   452,    +   410, -  1290,    +   434, -   452,    +   412

 uint16_t rawData[583] = {462, 402,  434, 450,  436, 404,  432, 428,  434, 452,  410, 25394,  3454, 1720,  464, 1262,  436, 428,  434, 428,  430, 430,  436, 1288,  434, 430,  432, 428,  432, 454,  410, 452,  410, 1288,  438, 426,  436, 1288,  434, 1288,  436, 430,  432, 1240,  488, 1286,  436, 1288,  438, 1286,  438, 1286,  436, 428,  434, 428,  434, 1290,  434, 452,  412, 428,  434, 452,  410, 428,  432, 428,  434, 426,  436, 428,  434, 452,  410, 426,  436, 450,  410, 1286,  436, 430,  434, 1290,  436, 428,  436, 428,  432, 452,  436, 1262,  436, 1314,  436, 426,  412, 426,  436, 428,  434, 426,  436, 426,  434, 452,  412, 450,  412, 450,  412, 448,  412, 426,  436, 426,  436, 450,  412, 450,  412, 426,  434, 450,  412, 428,  434, 1288,  436, 1286,  438, 1288,  436, 424,  432, 1290,  436, 452,  410, 1290,  438, 1288,  438, 34830,  3456, 1718,  436, 1288,  438, 450,  410, 424,  436, 428,  430, 1292,  438, 426,  436, 430,  432, 452,  410, 428,  434, 1288,  436, 450,  412, 1286,  438, 1288,  434, 430,  432, 1288,  436, 1286,  438, 1286,  438, 1288,  436, 1288,  436, 452,  412, 450,  410, 1290,  436, 452,  408, 428,  434, 452,  410, 452,  410, 428,  434, 428,  432, 452,  412, 426,  436, 450,  412, 450,  436, 426,  410, 1288,  436, 428,  432, 452,  410, 452,  410, 428,  432, 1290,  436, 428,  434, 450,  438, 1262,  438, 426,  434, 454,  410, 426,  434, 452,  410, 452,  410, 452,  410, 452,  434, 426,  410, 1288,  436, 452,  410, 428,  434, 428,  434, 430,  432, 430,  434, 450,  410, 1288,  436, 450,  412, 1290,  434, 1290,  436, 428,  432, 1290,  438, 426,  434, 34830,  3456, 1718,  462, 1260,  438, 426,  462, 424,  412, 428,  432, 1294,  434, 452,  408, 430,  434, 426,  436, 426,  436, 1286,  436, 430,  432, 1288,  464, 1262,  438, 428,  434, 1288,  436, 1288,  438, 1286,  438, 1286,  436, 1288,  436, 430,  434, 450,  412, 1286,  436, 430,  430, 430,  434, 452,  410, 428,  432, 430,  432, 430,  432, 432,  432, 430,  432, 450,  412, 450,  412, 428,  434, 450,  412, 450,  412, 426,  432, 430,  434, 426,  438, 426,  434, 450,  412, 1286,  438, 426,  458, 428,  410, 1288,  436, 1288,  436, 1290,  434, 454,  408, 430,  432, 452,  410, 1288,  438, 1288,  434, 430,  434, 452,  410, 1276,  450, 452,  412, 428,  434, 450,  412, 416,  434, 440,  434, 450,  412, 428,  432, 454,  410, 450,  410, 452,  410, 428,  436, 428,  432, 428,  434, 452,  412, 426,  434, 430,  432, 1288,  438, 428,  434, 428,  432, 430,  434, 428,  430, 430,  434, 450,  410, 452,  414, 428,  434, 452,  412, 428,  436, 426,  434, 450,  410, 428,  432, 430,  434, 450,  412, 450,  412, 426,  434, 428,  432, 1290,  438, 1286,  438, 450,  410, 430,  434, 450,  412, 450,  434, 404,  432, 454,  408, 428,  434, 428,  434, 426,  434, 452,  436, 1264,  434, 1290,  438, 450,  410, 428,  434, 424,  436, 428,  432, 428,  434, 452,  410, 430,  436, 450,  412, 428,  432, 452,  410, 452,  412, 428,  434, 428,  434, 428,  434, 432,  430, 452,  410, 452,  410, 1290,  434, 452,  410, 452,  408, 428,  434, 452,  410, 428,  432, 1290,  438, 1288,  436, 428,  434, 428,  434, 452,  410, 430,  434, 426,  436, 452,  410, 426,  434, 1290,  436, 428,  434, 452,  410, 430,  434, 428,  432, 428,  434, 428,  434, 452,  410, 428,  434, 452,  410, 428,  436, 450,  410, 1288,  436, 1288,  436, 452,  410, 1290,  434, 452,  412};  // DAIKIN
uint8_t state[27] = {0x11, 0xDA, 0x27, 0x00, 0x42, 0x02, 0x04, 0x5A, 0x11, 0xDA, 0x27, 0x00, 0x00, 0x39, 0x26, 0x00, 0x40, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0xC1, 0x80, 0x00, 0x58};

When i try to capture with OMG not works.

Creating IR buffer
Rcv. IR
436,428,436,450,410,428,434,452,408,454,412
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT/3017984774
{"value":3017984774,"protocol":-,"bits":6,"raw":"436,428,436,450,410,428,434,452,408,454,412"}
Pub data per topic
value
3017984774
protocol
4294967295
bits
6
raw
436,428,436,450,410,428,434,452,408,454,412
Store to avoid duplicate
Min ind: 
0
store code :
3017984774/716846
Col: val/timestamp
0:3017984774/716846
1:962435546/291069
2:220168003/291199
3:655236415/291467
4:3017984774/308993
5:962435546/309152
6:1259362065/309280
7:1620996215/309551
8:3017984774/314299
9:962435546/314457
10:220168003/314588
11:655236415/314857
Creating IR buffer
Rcv. IR
 3458,1718,434,1290,462,422,410,426,466,402,434,1286,462,398,436,430,408,456,440,4    22,434,1290,434,428,436,1288,432,1292,436,426,434,1288,436,1290,436,1288,436,1290,436,1286,438,426,434,454,410,1292,434,428,436,428,432,454,408,454,412,450,408,454,410,452,408,452,410,428,440,446,410,1286,438,452,410,1288,436,452,408,452,412,426,436,1286,438,1290,434,428,434,452,410,426,434,452,410,426,436,426,434,452,410,452,410,452,412,426,434,428,432,430,432,454,410,430,434,450,412,450,410,1288,436,1288,436,1288,438,428,434,1290,434,430,432,1290,434,1294,432
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT/962435546
{"value":962435546,"protocol":-1,"bits":66,"raw":}
Pub data per topic
value
962435546
protocol
4294967295
bits
66
Store to avoid duplicate
Min ind: 
1
store code :
962435546/717005
Col: val/timestamp
0:3017984774/716846
1:962435546/717005
2:220168003/291199
3:655236415/291467
4:3017984774/308993
5:962435546/309152
6:1259362065/309280
7:1620996215/309551
8:3017984774/314299
9:962435546/314457
10:220168003/314588
11:655236415/314857
Creating IR buffer
Rcv. IR
412,426,434,428,458,404,434,1288,436,452,412,450,412,450,410,428,434,1290,434,454,    408,452,410,1288,436,430,434,1288,432,1288,438,1288,436,1292,432,1290,436,1290,434,1292,434,452,410,428,432,430,432,428,434,452,410,452,410,1288,436,452,410,428,434,452,408,1290,434,430,434,1290,434,432,430
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT/3969735902
{"value":3969735902,"protocol":-  1,"bits":35,"raw":"412,426,434,428,458,404,434,1288,436,452,412,450,412,450,410,428,434,1290,434,454,408,452,410,1288,436,430,434,1288,432,1288,438,1288,436,1292,432,1290,436,1290,434,1292,434,452,410,428,432,430,432,428,434,452,410,452,410,1288,436,452,410,428,434,452,408,1290,434,430,434,1290,434,432,430"}
Pub data per topic
value
3969735902
protocol
4294967295
bits
35
raw
412,426,434,428,458,404,434,1288,436,452,412,450,412,450,410,428,434,1290,434,454,408,452,410,1288,436,430,434,1288,432,1288,438,1288,436,1292,432,1290,436,1290,434,1292,434,452,410,428,432,430,432,428,434,452,410,452,410,1288,436,452,410,428,434,452,408,1290,434,430,434,1290,434,432,430
Store to avoid duplicate
Min ind: 
2
store code :
3969735902/717135
Col: val/timestamp
0:3017984774/716846
1:962435546/717005
2:3969735902/717135
3:655236415/291467
4:3017984774/308993
5:962435546/309152
6:1259362065/309280
7:1620996215/309551
8:3017984774/314299
9:962435546/314457
10:220168003/314588
11:655236415/314857
Creating IR buffer
Rcv. IR
 1692,438,1286,436,428,430,456,412,450,410,1284,438,428,436,428,434,430,460,426,410,1290,434,452,410,1288,436,1288,436,428,434,1288,436,1288,438,1286,438,1290,432,1290,436,452,410,428,432,1290,434,452,412,450,410,430,432,454,410,430,432,452,412,428,432,428,432,452,412,428,436,426,432,452,412,452,408,430,434,452,436,402,432,430,434,426,436,452,408,428,436,452,410,1290,432,1294,434,1288,434,452,410,428,434,452,410,1284,438,1290,436,454,412,450,410,1292,432,454,410,428,432,430,434,452,410,424,434,428,434,428,434,454,408,430,434,452,410,452,410,428,434,450,412,452,410,428,432,452,410,1288,434,430,434,454,410,428,432,432,432,428,436,424,436,426,436,452,408,452,410,452,410,430,430,454,410,452,410,452,410,452,410,452,410,430,432,452,412,1288,436,1290,434,428,436,450,418,444,412,442,416,422,440,428,434,454,410,452,410,452,410,450,408,1292,436,1288,434,430,430,452,412,452,410,430,432,452,408,452,410,452,410,450,410,452,410,428,432,430,432,432,434,430,434,452,410,428,434,428,434,452,410,1288,434,452,410,452,410,452,410,426,436,450,410,1288,436,1290,436,452,410,452,410,450,410,454,410,452,408,432,432,452,410,1290,434,452,408,430,434,452,408,454,410,452,410,452,410,452,408,452,410,1290,434,1290,436,1292,434,452,410,1290,432,454,410,1290,434,430,432
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT/1620996215
{"value":1620996215,"protocol":-1,"bits":153,"raw":}
Pub data per topic
value
1620996215
protocol
4294967295
bits
153
Store to avoid duplicate
Min ind: 
 3
store code :
1620996215/717404
Col: val/timestamp
0:3017984774/716846
1:962435546/717005
2:3969735902/717135
3:1620996215/717404
4:3017984774/308993
5:962435546/309152
6:1259362065/309280
7:1620996215/309551
8:3017984774/314299
9:962435546/314457
10:220168003/314588
11:655236415/314857

i use “0.9.1beta” OMG version, i just *#define MQTT_MAX_PACKET_SIZE 1024 and just set IRrecv irrecv(IR_RECEIVER_PIN, 1024, 15U, true);
Can you help me?

#2

Hello,

The code is so huge I think 1024 are not enough for MQTT max packet size, could you try going to 3000?

#3

i try to put 3000 but not work, so i try to put 4000 MQTT max packet size. Nothing :frowning:
So i can try to see code of IRrecvDump v2 sketch (Working) and i see this command:

irrecv(IR_RECEIVER_PIN, 1024, 50, true);

so i change file zGatewayIR under section #ifdef DumpMode and change 15U to 50U :
before:

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

now:

irrecv(IR_RECEIVER_PIN, 1024, 50U, true);

and try to press A/C button again. Now it work, the protocol is 16 (DAIKIN correct) and “bits”:216 (same of results of IRrecvDump v2 sketch)

Rcv. IR
474,390,472,390,472,390,472,390,472,388,472,25354,3518,1658,474,1252,472,390,472,390,472,392,470,1254,472,390,474,390,470,392,472,390,476,1250,472,390,472,1252,474,1252,472,390,472,1250,474,1254,472,1252,472,1254,470,1254,472,390,470,392,472,1252,472,390,472,388,472,390,472,390,470,392,472,390,472,390,472,390,472,390,472,390,470,1254,472,390,472,1252,472,390,470,390,470,392,470,1252,474,1252,472,390,472,390,470,392,470,390,472,390,472,390,470,392,470,392,470,392,470,392,446,414,472,388,470,392,470,390,470,392,446,416,448,1278,470,1254,470,1254,446,416,446,1278,472,390,470,1254,472,1254,472,34792,3488,1686,470,1254,470,392,468,392,470,392,470,1254,472,392,468,392,472,392,446,416,470,1252,472,392,470,1254,472,1254,472,390,448,1276,448,1276,470,1254,472,1252,472,1250,470,394,470,392,472,1254,448,416,468,392,470,392,446,416,446,414,448,414,446,416,446,416,446,414,448,414,470,392,448,1276,448,416,470,392,446,414,448,416,446,1278,448,414,452,1272,472,1254,472,1254,468,394,446,1276,448,416,446,416,446,416,446,416,470,392,446,1276,448,414,446,414,448,416,446,416,446,414,448,1276,448,1276,450,1276,448,1276,474,388,446,1276,446,1274,448,416,446,34822,3490,1686,472,1252,496,366,472,390,496,364,496,1228,470,392,470,390,472,390,472,390,472,1254,472,390,472,1252,472,1252,472,390,470,1252,496,1228,498,1228,472,1252,472,1252,470,390,474,390,474,1250,472,392,470,392,496,364,470,392,470,392,470,390,472,392,468,390,470,392,472,390,470,390,498,364,470,392,470,392,472,392,446,416,472,390,472,390,470,1254,472,390,472,390,470,1254,472,390,472,390,470,392,470,392,472,388,470,1254,472,1254,470,1254,470,394,470,1252,472,392,472,392,470,390,472,390,470,392,470,392,446,414,470,392,470,394,470,390,470,392,446,414,470,392,446,416,446,416,446,416,470,1254,472,388,468,394,468,392,470,392,446,416,470,392,446,416,446,416,468,392,470,392,446,416,470,392,468,392,470,392,446,416,446,416,446,414,448,416,446,1278,500,1224,472,392,470,390,446,416,446,416,470,394,468,392,470,392,448,414,470,392,448,414,446,1278,448,1276,470,392,446,416,468,394,446,414,470,392,448,416,446,416,446,414,448,416,446,414,448,414,468,392,448,416,446,416,446,414,446,416,472,390,446,1278,448,414,470,392,448,416,446,414,448,414,446,1278,470,1254,448,414,472,390,446,416,446,416,446,414,448,414,446,414,446,1276,448,416,446,414,472,392,448,414,448,414,448,414,448,414,448,414,448,414,448,414,470,394,446,414,448,1276,472,1252,448,416,446,414,472
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT/2611729
{"value":2611729,"protocol":16,"bits":216,"raw":}

The problem now is all key i push gime me same code. ON code 2611729, OFF code 2611729, POWERFULL code 2611729, eccc… Where is the problem now?
I just use for my TV and Hi-Fi and all work perfectly in Home Assistant with Mqtt topics, too

And another question, is it possible to send only some parameters? for example only the fan power keeping the temperature and everything else or I have to send each complete IR code for all possibilities of combinations (how i see in this post https://github.com/1technophile/OpenMQTTGateway/wiki/IR-Air-climatiser-Home-Assistant-integration)?

I would like on my Home Assistant climate page see the current parameters adn change one one time (if not possible i think will be interesting and useful integration in your next OMG relase :wink: )

#4

The protocol is well decoded, the gateway fail in publishing the raw value, could you try to put
irrecv(IR_RECEIVER_PIN, 1024, 50U, true);
and MAX PACKET SIZE to 4000

#5

I just do. In libraries/pubsubclient/src/PubSubClient.h i just set #define MQTT_MAX_PACKET_SIZE 4000
and in zGatewayIR line 36 irrecv(IR_RECEIVER_PIN, 1024, 50U, true)

There is another file where i must make changes?

#6

no other file to change

#7

nothing… always same code. :frowning:

#8

hmm irt seems that these raw datas are too big, maybe I need to develop a new feature to handle your case, the goal would be to capture this:
uint8_t state[27] = {0x11, 0xDA, 0x27, 0x00, 0x42, 0x02, 0x04, 0x5A, 0x11, 0xDA, 0x27, 0x00, 0x00, 0x39, 0x26, 0x00, 0x40, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0xC1, 0x80, 0x00, 0x58};

and to be able to republish it to MQTT

#9

Will be fantastic.I personally find it just a convenience to control the TV because when it happens they are usually in front of it (not essential) while being able to check the temperature and humidity in the house (with DHT that I already use) and turn on the air conditioner when I finish work would be brilliant, so to get home and find the cool house. For me this is MQTT Home Automation. On the internet I have found nothing that allows this. You could be the first !!! I really hope so.
An IR signal of any conditioner sends a code IR that groups all the parameters (On or Off, Temp, Mode, Swing, etc.) and to each button on the phisical remote control the IR string changes only for the parameter pressed, keeping all the others same. It would be nice to be able to synchronize the current parameters with one IR receiver near to the conditioner ir sensor so when i push button of phisical remote OMG decodes the string and saves an array with the individual parameters in N topics. I saw that at most there would be 15 topics to create.

example:
home / openMQTTGateway / ACtoMQTT / Power (On or Off)
home / openMQTTGateway / ACtoMQTT / setTemp (15 … 30)
home / openMQTTGateway / ACtoMQTT / setfan (1 … 5)
home / openMQTTGateway / ACtoMQTT / setMode (cool, heat, fan, auto, dry)
etc.

In the IRremoteESP8266 library there is already a file called irDaikin.cpp with all the functions to acquire the parameters and send them. The new relaseof OMG could integrate all the brands of air conditioners (always present in the folder of the library) and thus simplifying everyone’s integration into HomeAssistant (I don’t find it convenient to create 153 scripts https://github.com/1technophile/OpenMQTTGateway/wiki/IR-Air-climatiser-Home-Assistant-integration. ) In this way people can have on Home Assistant climate component, view the current parameters of A/C and change parameter. The IR code to send will be 1 (old IR with new code inside them changed). More more simply

I really hope you will succeed because I admire you very much and I am excited about the work you have done so far! You are awesome

#10

Hello,

Other contributors are, see below !

Could you try the last version of OMG dev branch.

@legion2 corrected the passing of hex value to OMG IR.

Here is an example:

The format is now a comma separated list of hex values.
e.g. 14,63,0,10,10,02,FD in the json it looks like this: {"datastring":"14,63,0,10,10,02,FD","bits":7,"protocol_name":"IR_FUJITSU_AC"}
The “bits” must be the count of hex values in the “datastring”.

In your case you should try
{"datastring":"11,DA,27,00,42,02,04,5A,11,DA,27,00,00,39,26,00,40,00,00,06,60,00,00,C1,80,00,58","bits":27,"protocol_name":"IR_DAIKIN"}

Corresponding from uint8_t state[27] of your dump.

#11

Hi friend,
i download new version and i try to send from HomeAssistant the topic with new payload syntax:
cat1

On OMG i see that:

Hey I got a callback 
MQTTtoIR json
MQTTtoIR data || raw ok
value
0
raw

datastring
11,DA,27,00,42,02,04,5A,11,DA,27,00,00,39,26,00,40,00,00,06,60,00,00,C1,80,00,58
MQTTtoIR OK
Pub json into:
home/OpenMQTTGateway/IRtoMQTT
{"datastring":"11,DA,27,00,42,02,04,5A,11,DA,27,00,00,39,26,00,40,00,00,06,60,00,00,C1,80,00,58","bits":27,"protocol_name":"IR_DAIKIN"}
Hey I got a callback 
Store signal

It work if i send code with new syntax, but the problem is when i try to find another code (unless library DumpV2). I explain better: when i try to push button ON/OFF on my remote control i have the same error:

Creating IR buffer
Rcv. IR
476,386,474,388,472,390,474,388,474,.............,1252,448,1276,470
isAduplicate?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTGateway/IRtoMQTT
{"value":2611729,"protocol":16,"bits":216,"raw":}

If new relase recognize datastring sent from mosquitto (of from Homeassistant) because when i send from IR of control remote (with new libraryes updated) i get same error of 5 days ago?
For me is important use remote control when i’m at home (and update status of A/C on MQTT) and HomeAssistant with new syntax code (just tested and working) when leave work.

This is the situation I would like to be able to recreate with OMG:
At home next to my daikin air conditioner I have a NodeMcu8266 with IR receiver and transmitter. When I point the remote control to turn on the air conditioner, the IR beam is received both from the A / C (which turns on or changes state) and from OMG which should update my status on MQTT on Homeassistant (on / off, mode and temperature). When I finish work I would like to be able to check the current status of the conditioner and the temperature in the house (easy because I already use the DHT module in OMG) and send a topic from home assistant to turn on the climate or change other parameters, such as temperature, fan speed or dry function and make the home comfortable on my return.
for this reason I also need to receive and decode the physical buttons I press on the remote control and update them via MQTT. (sorry for long post and my bad english)
Can you help me?

#12

Hello,

I have added hexadecimal publication to the IRtoMQTT function, which could answer to your need, it is present in the development branch.

#13

Perfect… Now i can send from mqtt from home assistant and most important receive and decode it from my remote. Very happy. Thanks so much.

1 Like
#14

Great ! Would it be possible to share your configurations ?

#15

I’m working to find a way or python script but its not easy…but when i will find solution i will share with all community the way to integrate read/write IR command (without use 150 or more script). I found an interesting component called SmartIR and i think it can be integrate with OMG because it use only one file. Json with all’ code. More easy of 153 script.
Do you just know that component?

1 Like
#16

No I didnt explored it

#17

Hello, i am also very interested about this topic!
I am trying to use ir to make smart my daikin ac. Final purpose is to run an OMG gateway with IR rcv/snd and put it close to the unit, so that it can recieve same signal from remote and align status, but also sending to the unit.
My starting point was OMG and from that i found that the library irremoteESP8266 is so great!
2 are the main examples: IRMQTTServer and IRrecvDumpV2.
The first is an example of what we would like to achieve, that is an mqtt device able to recieve signals from remote and send it to mqtt. Same in the other direction.
The IRrecvDumpV2 is decoding properly all the protocols (including my Daikin) with libraries.
I think the best strategy for OMG would in 2 points:

  1. To decode all possible data through the libraries and expose it to mqtt descriptive tags (as already explained something like mode/power/temp)
  2. To do reverse and allow cmd function on the same to send signals

I think exposing the raw string is not enogh as we would need very long programming in OH or HA to decode all the string. while doing it once here would make everything easier…
What is your idea?

#18

Hello Rick,

David Conran is making an amazing job on it!

Would it be possible to give some examples of what you are expecting?

Currently (with dev branch) the raw string is also an hexadecimal one (not so long in size) but if by long you mean the time to parameterize the different codes a kind of functional description of the device can make sense.
I don’t have ideas about how many functions an AC have?

#19

Hello,
i have been thinking all day long about this idea… it looks like something similar is not yet there, and could be a very unique feautre of OMG.(only commercial expensive products like sensibo are doing something similar…)
Could be an “AC” module (basically the IRremoteESP8266 integration in OMG). Of course, as any other OMG module, could be made of 2 parts:

  • ACtoMQTT: basically what IRrecvDumpV2 example is doing, in the String “description”: simple text (JSON formatted) that uses all libraries in #include to decode the ir command. All libraries are already included so no need to decode nothing in OMG, the job is already done (and maintained) by the IRremoteESP8266.

This is what we get when we click on AC remote in front sensor running IRrecvDumpV2:

Mesg Desc.: Power: On, Mode: 3 (COOL), Temp: 19C, Fan: 2, Powerful: Off, Quiet: Off, Sensor: Off, Eye: On, Mold: Off, Swing (Horizontal): Off, Swing (Vertical): Off, Current Time: 17:06, On Time: Off, Off Time: Off

OMG could post the following JSON payload:

{“Power”:“ON”,“Mode”:3,“Temp”:“19C”,“Fan”:2… and so on}

That could be easy to parse in OH or HA (like i did for RF or BLE library). If i have another brand or message is different, i will parse in another way but always with meaning. I can refer to the proper library in the source to understand all possible states

  • MQTTtoAC: this is a bit more complex i suppose, but also this somehow covered by IRMQTTServer example: this example includes a running webserver, and one page is related to AC. Here you can find description of the page . Also in this case, we could format the JSON in OH or HA abd write the payload to OMG on the proper topic.

I hope my idea is a bit more clear now, i am curious to get your feedback :wink:
Bye bye
Rick

#20

Hi sorry for late but I was away for work… I just have your same ideas: use description message for obtain all informations we are need. For do that I just changed library irmqtt8266 for have description into json format. In openmqttgateway I make some changes to section of IRGateway so with an Boolean variable I know if IR is standard or of AC unit so the results is new json message. At the moment I’m studying how integrate into climate platform in Homeassistant. When I ready I will explain the way