Page 1 of 1

AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Sun Jul 20, 2014 2:55 am
by Pasc
Hi there,

I've been trying to emulate an AC remote for quite some time now, after a lot of search I end up here and something tells me that You can help me! I tried your code and it's working fine! this is the Raw for CoolOn/MidFan/16oC

Raw: (139) 8996, -4480, 644, -1652, 644, -556, 644, -556, 640, -1656, 640, -560, 644, -1652, 640, -1656, 640, -560, 668, -532, 668, -532, 664, -540, 640, -560, 640, -560, 640, -536, 664, -564, 612, -588, 612, -588, 616, -588, 612, -588, 612, -560, 640, -588, 612, -1684, 620, -1676, 648, -552, 672, -528, 676, -524, 648, -556, 648, -552, 648, -1648, 648, -552, 648, -1648, 648, -552, 648, -552, 648, -1648, 648, -552, 648, -19928, 676, -1648, 644, -556, 644, -556, 648, -552, 648, -556, 644, -556, 648, -552, 648, -552, 648, -556, 648, -552, 648, -552, 648, -552, 648, -552, 652, -1644, 648, -552, 648, -556, 648, -552, 648, -552, 648, -556, 644, -556, 648, -552, 644, -556, 648, -552, 648, -556, 644, -556, 648, -552, 648, -552, 648, -556, 648, -1644, 648, -556, 644, -1648, 652, -552, 648,
I've also kind of self decode the HEX output so the above signal would be 9600060A
9->Cool On, 6->Middle Fan direction, 0->16oC, 0060A->Always the same (as far as i know). I can't make a lot of sense from the DEC results.
The next step was to try to send the raw data with irsend.sendRaw(Raw, 139, 36);. Did work! I've already changed RAWBUF to 230 in the library. I don't know how to use IRfreq of IRlib.h so i don't know the freq of the signal. i tried changing the freq to 33,30,40,50 but nothing happened.


The AC unit is a Gree GRS 242H/HM-N2 and the remote is a YB1FA. The reciever is tagged "19 232 1836 3V" on top. For anything else You might need please ask.
Any help would be great! thanks in advance!

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Sun Jul 20, 2014 1:14 pm
by AnalysIR
Hi
Yes you have decoded the signal correctly, however only the first part. The signal is longer than standard NEC and also in 2 parts.

The timing looks like the standard NEC protocol, but the number of bits are longer.

IRremote will not send this signal, beacause one of the durations is too long for it.

So you must use IRLib to send this signal.

The modulation frequency is probably 38kHz.

Here is some example code, automatically generated by AnalysIR for IRLib, using the data you provided.

Code: Select all

/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: xxxxxxxx
Session History: 
*/

// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for xxxxxxxx, visit http://www.AnalysIR.com or email info@....... for further details
int khz=38; //NB Change this default value as neccessary to the correct modulation frequency


unsigned int Signal_0_0[] = {8996,4480,644,1652,644,556,644,556,640,1656,640,560,644,1652,640,1656,640,560,668,532,668,532,664,540,640,560,640,560,640,536,664,564,612,588,612,588,616,588,612,588,612,560,640,588,612,1684,620,1676,648,552,672,528,676,524,648,556,648,552,648,1648,648,552,648,1648,648,552,648,552,648,1648,648,552,648,19928,676,1648,644,556,644,556,648,552,648,556,644,556,648,552,648,552,648,556,648,552,648,552,648,552,648,552,652,1644,648,552,648,556,648,552,648,552,648,556,644,556,648,552,644,556,648,552,648,556,644,556,648,552,648,552,648,556,648,1644,648,556,644,1648,652,552,648}; //AnalysIR Batch Export - RAW

My_Sender.IRsendRaw::send(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export - RAW
 // AnalysIR IR Protocol: NEC2, Key:  
Post back how you get on with this.

My guess is that the correct timings are (uSecs):
9000
4500
560<<<<<this has since been revised to 600 (see later post, DEC 2014)
1690
So if the example above does not work, then try changing the values to the closes one above (except the one that is 19928, which is probably meant to be 20000)

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Mon Jul 21, 2014 1:34 am
by Pasc
Hi,

Thank you for your immediate reply. I've tried it! And... IT WORKS, it works, it works!! So how can i decode correctly other signals too, e.g Turn off?? is there a pattern. thanks for you help!

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Mon Jul 21, 2014 9:44 am
by AnalysIR
Great...glad to be of help!
So how can i decode correctly other signals too, e.g Turn off??
Just copy the same steps for each signal.


Alternatively, you can get your own copy of AnalysIR, which is what I used to generate the 'C' code.
http://www.analysir.com/blog/get-analysir/

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Wed Dec 17, 2014 5:30 pm
by vitorcalvi
Dear Friends, i've working a lot for this problem and searching for too, but without success.
i have A/C Gree too but i didn't successfully turn it on with RAW Data as PASC did.
I've changed the RAWBUF to 230, but it doesn't work yet.

My DUMP is below:

Raw: (226) 6712, -108, 43692, -48, 28356, -8940, 4476, -636, 1656, -632, 564, -636, 560, -636, 1656, -632, 1656, -636, 560, -636, 564, -636, 560, -636, 1656, -632, 1656, -636, 564, -632, 1656, -632, 564, -636, 564, -636, 560, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 1652, -636, 1656, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 1652, -636, 564, -632, 1656, -636, 564, -632, 564, -636, 1652, -636, 564, -632, 19916, -636, 564, -636, 564, -632, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 1652, -636, 564, -636, 564, -632, 564, -632, 564, -636, 1656, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -632, 568, -632, 564, -632, 568, -632, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 13868, -44, 59892, -92, 156, -92, 6416, -88, 288, -48, 484, -48, 656, -160, 5100, -44, 6956, -44, 10204, -44, 24820, -48, 40440, -48, 1088, -52, 49276, -68, 54700, -68, 376, -68, 26364, -44, 34368, -88, 18344, -48, 10300, -84, 49236, -88, 268, -176, 58168, -64, 8872, -64, 16948, -76, 16900, -48, 49040, -72, 18268, -72, 56140, -92, 15904, -68, 16892, -72, 45288, -88, 15824, -88, 57980, -48, 18864, -68, 54608, -112, 42384, -44, 16948, -72, 58292, -48, 32176, -44, 6128, -68,

Press the button on the remote now - once only

Raw: (258) 6344, -48, 38496, -80, 19420, -88, 37092, -8944, 4476, -632, 1656, -636, 564, -632, 564, -636, 1652, -636, 1656, -632, 564, -636, 564, -632, 564, -636, 1652, -636, 1656, -632, 564, -636, 1656, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -632, 568, -632, 564, -632, 568, -632, 564, -632, 1656, -636, 1656, -632, 564, -632, 568, -632, 564, -632, 564, -636, 564, -636, 1652, -636, 564, -632, 1656, -632, 564, -636, 564, -632, 1656, -636, 564, -632, 19916, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -632, 1656, -636, 564, -632, 564, -636, 564, -632, 564, -636, 1652, -636, 564, -632, 568, -632, 564, -632, 564, -636, 564, -636, 560, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -636, 564, -632, 564, -632, 4588, -72, 28992, -672, 116, -284, 7156, -48, 396, -92, 16688, -44, 11348, -48, 12912, -52, 41740, -88, 168, -96, 8436, -48, 8920, -88, 11936, -44, 24948, -48, 51420, -72, 57960, -188, 232, -56, 19328, -68, 23924, -68, 17516, -52, 40348, -68, 928, -104, 42824, -72, 9296, -68, 18400, -104, 1932, -48, 22908, -72, 54036, -48, 33600, -72, 8928, -68, 9840, -92, 15884, -72, 18376, -68, 51400, -68, 7884, -68, 26200, -72, 25572, -68, 45224, -68, 412, -48, 2032, -44, 624, -96, 112, -356, 10052, -84, 42492, -88, 1248, -52, 28228, -64, 6880, -72, 4680, -88, 43372, -108, 42372, -64, 26776, -48, 50188, -76, 540, -52, 440, -132, 240, -68, 15672, -44,


Please, can anybody could help me to solve my IR send Data Problem?

Thanks in advance

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Wed Dec 17, 2014 5:59 pm
by AnalysIR
@vitorcalvi

Looking at your signal dump, there are quite a few values less than 100. This means your IR receiver is not recording the signal properly.

Please explain all of your setup & wiring in more detail .... model numbers etc etc

I also imported your dump into AnalysIR and you can see from the attached Trace image, that your signal is in there along with lots of noise & corruption. It looks like your IR receiver is not capable of recording longer IR signals & seems to suffer with noise in general. If you read some of the recent posts in this section you will find some useful suggestions.


The following post may be useful, if your IR receiver is not up to the job.
http://www.analysir.com/blog/2014/05/28 ... eceiver-2/

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Wed Dec 17, 2014 6:47 pm
by AnalysIR
We have just played around with this a bit more and added support for this Gree protocol into analysIR. It seems to have 67 data bits, which is unusual as most systems stick with multiples of 8 bit bytes.

After further investigation it appears that your signal is actually good (ish) but inverted and has some noise outside the signal (Try covering the IR receiver when recording ...shield from light & sunshine).

I dont know how your signal got inverted, but when you post the details requested we should have a better idea.

Try the following (automatically generated) code to send your signal with IRLib (IRremote will not work properly for this signal, although you could be lucky).

Code: Select all

/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: xxxxxxxx
Session History
Type : Key : Value : Bits
0 : GREE067AC :  : 4C680305200840000 : 67
*/

// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for xxxxxxxx, visit http://www.AnalysIR.com or email info@....... for further details
int khz=38; //NB Change this default value as neccessary to the correct modulation frequency


unsigned int Signal_0_0[] = {8940,4476,636,1656,632,564,636,560,636,1656,632,1656,636,560,636,564,636,560,636,1656,632,1656,636,564,632,1656,632,564,636,564,636,560,636,564,632,564,636,564,632,564,636,564,632,564,636,1652,636,1656,632,564,636,564,632,564,636,564,632,564,636,1652,636,564,632,1656,636,564,632,564,636,1652,636,564,632,19916,636,564,636,564,632,564,632,564,636,564,632,564,636,564,632,564,636,1652,636,564,636,564,632,564,632,564,636,1656,632,564,636,564,632,564,636,564,632,564,636,564,632,564,636,564,632,564,632,568,632,564,632,568,632,564,632,564,636,564,632,564,636,564,632,564,636}; //AnalysIR Batch Export - RAW

My_Sender.IRsendRaw::send(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export (IRLib) - RAW
 // AnalysIR IR Protocol: GREE077AC, Key:  
The correct timings are 9000 / 4500 / 600 / 1690 uSecs & you can make the signal better by fixing this manually. (AnalysIR has a feature that can do this automatically for supported signals/protocols.

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Fri Dec 19, 2014 2:18 pm
by vitorcalvi
Thank you so much for your excellent reply.
Tomorrow i think i will try another ir receiver and turn off the lights and other things as you said.
My IR Receiver is 1057 D21B
I will be in touch

Re: AC Raw Code problem - Gree GRS 242H/HM-N2

Posted: Fri Dec 19, 2014 2:32 pm
by AnalysIR
OK

I just did a quick check and couldnt find a data sheet for this receiver....not a good sign. Also, there are several reports of issues like yours, that I have outlined above. So yes anothe receiver is a good idea.

Did the signal from my last post work?