Github Devices Community Docs Blog

OMG IR Gateway not working with AC

Hi @1technophile.

First, let me thank you for the amazing work already done :slight_smile:

I’ve been trying to setup my A/C unit using the IR_Gateway.
I have a Junkers (Bosch) Excellence AC. This is basically a Gree A/C, that equips many units out there.

I tried every thing already, and I cannot get it to work. I tried to use some demos from the IRRemote library and I manage to send the poweron and poweroff commands already, so I know my setup is working properly (NodeMCU + ir receiver + ir emitter + transistor + resistors).

This is what happens when I receive on the sensor.
Below the MQTT i receive for several AC inputs.

home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348470284,"protocol":55,"bits":35,"hex":"0x25060060C","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1344275972,"protocol":55,"bits":35,"hex":"0x250200604","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471048,"protocol":55,"bits":35,"hex":"0x250600908","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471049,"protocol":55,"bits":35,"hex":"0x250600909","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471066,"protocol":55,"bits":35,"hex":"0x25060091A","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471051,"protocol":55,"bits":35,"hex":"0x25060090B","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348470284,"protocol":55,"bits":35,"hex":"0x25060060C","protocol_name":"TECO","raw":}

home/OpenMQTTMasterRoom/IRtoMQTT {“value”:1348471048,“protocol”:55,“bits”:35,“hex”:“0x250600908”,“protocol_name”:“TECO”,“raw”:}

And here what i get on the log, for the last command:
Creating IR buffer
Rcv. IR
9044,4462,674,532,676,530,678,528,680,1624,678,528,680,526,672,536,672,530,678,1628,676,530,678,528,680,1626,676,530,678,528,680,526,672,532,676,530,678,526,680,524,674,532,676,530,678,1628,726,1580,734,472,674,532,676,528,680,526,682,524,674,1634,680,526,672,1634,680,526,672,536,672,1632,682,524,672
1348471048
isAdupl?
Adv data IRtoMQTT
Pub json into:
home/OpenMQTTMasterRoom/IRtoMQTT
{“value”:1348471048,“protocol”:55,“bits”:35,“hex”:“0x250600908”,“protocol_name”:“TECO”,“raw”:}
Store val
Min ind:
7
store code :
1348471048/567633
Col: val/timestamp
0:1348471048/535390
1:1344276736/552027
2:1344276736/552113
3:1348471048/552926
4:1348471048/553019
5:1344276736/558118
6:1344276736/558158
7:1348471048/567633
8:1348470284/338442
9:1344276736/533733
10:1344276736/533829
11:1348471048/535289
Creating IR buffer
Rcv. IR
722,484,724,1582,732,1574,676
1763287871
–no pub unknwn prt or data to high–
Hey I got a callback
Store str
Min ind:
8
store code :
1348471048/567693
Col: val/timestamp
0:1348471048/535390
1:1344276736/552027
2:1344276736/552113
3:1348471048/552926
4:1348471048/553019
5:1344276736/558118
6:1344276736/558158
7:1348471048/567633
8:1348471048/567693
9:1344276736/533733
10:1344276736/533829
11:1348471048/535289
JSON str

Hello,

Thanks for this timely case, I was looking for some verification of IR gateway before releasing v0.9.3.

First are you using v0.9.3rc?

What do you want to achieve, i suppose controlling your AC with OMG but I see only logs on receiving and no attempts to post an MQTTtoIR command?

1 Like

Hi

Thanks for the reply.
Yes, I’m using the current development version (from 2 days ago).

I was trying to get the RAW values and use them.

Nothing happens to my A/C if I try to send any of the received commands.

MQTT pub command

home/OpenMQTTMasterRoom/commands/MQTTtoIR {"value":1344276736,"protocol_name":"TECO"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1344276736,"protocol_name":"TECO"}

Log on arduino:
Hey I got a callback
MQTTtoIR json
MQTTtoIR value || raw || datasring ok
MQTTtoIR OK
Pub json into:
home/OpenMQTTMasterRoom/IRtoMQTT
{“value”:1344276736,“protocol_name”:“TECO”}
Hey I got a callback
Store str
Min ind:
0
store code :
1344276736/2374607
Col: val/timestamp
0:1344276736/2374607
1:0/0
2:0/0
3:0/0
4:0/0
5:0/0
6:0/0
7:0/0
8:0/0
9:0/0
10:0/0
11:0/0
JSON str

Thanks for the details;
Could you try sending the hex value instead of the decimal one

mosquitto_pub -t home/OpenMQTTMasterRoom/commands/MQTTtoIR -m {"datastring":"2,50,60,09,0B","protocol_name":"TECO"}

Pub command
mosquitto_pub -t home/OpenMQTTMasterRoom/commands/MQTTtoIR -m {"datastring":"2,50,60,09,0B","protocol_name":"TECO"}

Mosquitto log
home/OpenMQTTMasterRoom/commands/MQTTtoIR {“datastring”:“2,50,60,09,0B”,“protocol_name”:“TECO”}
home/OpenMQTTMasterRoom/IRtoMQTT {“datastring”:“2,50,60,09,0B”,“protocol_name”:“TECO”}

Arduino log
Hey I got a callback
MQTTtoIR json
MQTTtoIR value || raw || datasring ok
datastring
2,50,60,09,0B
MQTTtoIR OK
Pub json into:
home/OpenMQTTMasterRoom/IRtoMQTT
{“datastring”:“2,50,60,09,0B”,“protocol_name”:“TECO”}
Hey I got a callback
Store str

I see activity on the led (using my phone). But nothing on the AC unit

Just some more info.
I’ve set #define pubIRunknownPrtcl true

Then I sent some random commands to the receiver.
Swtich ON, Mode Auto Cool, Mode Dry, Mode Vent, Mode Auto Heat, Mode Heat/Cool, Switch Off.
This is what i got on MQTT.

home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471048,"protocol":55,"bits":35,"hex":"0x250600908","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1763287871,"protocol":-1,"bits":4,"hex":"0x6919A33F","protocol_name":"UNKNOWN","raw":"676,530,678,1628,676,1632,672"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471049,"protocol":55,"bits":35,"hex":"0x250600909","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1412006103,"protocol":-1,"bits":8,"hex":"0x542980D7","protocol_name":"UNKNOWN","raw":"672,534,674,530,678,528,680,526,672,1636,678,1628,674,1632,672"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471066,"protocol":55,"bits":35,"hex":"0x25060091A","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1679092137,"protocol":-1,"bits":7,"hex":"0x6414E9A9","protocol_name":"UNKNOWN","raw":"678,526,672,534,674,1632,682,1624,678,1628,676,1630,672"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471051,"protocol":55,"bits":35,"hex":"0x25060090B","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348470284,"protocol":55,"bits":35,"hex":"0x25060060C","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":2939351976,"protocol":-1,"bits":7,"hex":"0xAF32F3A8","protocol_name":"UNKNOWN","raw":"532,676,528,680,524,672,532,676,1632,672,1634,680,1626,676"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471048,"protocol":55,"bits":35,"hex":"0x250600908","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":2517984316,"protocol":-1,"bits":6,"hex":"0x9615643C","protocol_name":"UNKNOWN","raw":"530,678,526,672,1636,678,528,680,1626,678,1630,674"}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1348471049,"protocol":55,"bits":35,"hex":"0x250600909","protocol_name":"TECO","raw":}
home/OpenMQTTMasterRoom/IRtoMQTT {"value":1344276737,"protocol":55,"bits":35,"hex":"0x250200901","protocol_name":"TECO","raw":}

Tried to send some of them, nothing worked. Led illuminates :frowning:

There is something to do with the data string:
by checking what you receive and what is defined here maybe you could try that

{"datastring":"02,50,60,09,0B","protocol_name":"TECO"}

And replace datastring with the different values captured below as “hex”:

Still not working :frowning:

Endless road ?

You’ve tried with the 0 in front of the 2 ,
{“datastring”:“02,50,60,09,0B”,“protocol_name”:“TECO”}

And with different codes?

I have found an issue in the code, I will correct it and come back to this topic

@cinzas
I corrected it in development branch:

You can now use:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoIR -m '{"hex":"0x25060090B","protocol_name":"TECO"}'

instead of datastring