Go Down

Topic: [Solved] A/C Lennox on/off with IR (Read 1 time) previous topic - next topic

andalado

May 02, 2014, 06:36 am Last Edit: May 06, 2014, 03:22 am by andalado Reason: 1
Hi everyone, here its the thing:

I'm trying to control the ON/OFF of an AC brand lennox (never heard of this brand) by IR, it is the only thing I require at this time.
Researching online, I found two libraries that are responsible for this, they are IRemote and IRLib, i read their examples, despite
both libraries seem easy to use at first glance, this AC it's not support it,

I upload the arduino sketch IRrecvdump from both libraries and pressing the button to turn on / off this is what I got

Unknown encoding: 9368D502 (32 bits)
Raw (100): 26780 4400 -4250 600 -1500 550 -550 500 -1600 550 -1600 500 -550 500 -550 550 -1600 500 -550 600 -450 600 -1550 600 -450 600 -500 550 -1550 600 -1550 550 -500 550 -1600 550 -500 550 -550 550 -1600 500 -1600 550 -1600 550 -1550 550 -1600 550 -1550 550 -1600 550 -1550 550 -550 550 -500 550 -550 500 -550 550 -550 500 -550 500 -550 550 -550 500 -550 550 -500 550 -550 500 -550 550 -500 550 -550 550 -1550 550 -1600 550 -1550 550 -1600 550 -1600 500 -1600 550 -1600 500 -1600 550

Unknown encoding: FA36E9A0 (32 bits)
Raw (100): 12522 4300 -4350 550 -1550 550 -550 550 -1550 550 -1600 550 -500 550 -550 550 -1550 600 -500 550 -500 600 -1550 550 -500 550 -500 600 -1550 550 -1550 600 -500 550 -1550 550 -550 550 -1600 500 -1600 550 -1600 500 -1650 500 -550 500 -1600 550 -1600 500 -1650 500 -550 500 -550 550 -500 550 -550 550 -1550 550 -550 550 -500 550 -1600 500 -1600 550 -1600 550 -500 550 -550 500 -550 500 -600 500 -550 500 -550 550 -500 550 -550 550 -1550 550 -1600 550 -1550 550 -1600 550 -1550 550

Unknown encoding: 9368D502 (32 bits)
Raw (100): 26780 4400 -4250 600 -1500 550 -550 500 -1600 550 -1600 500 -550 500 -550 550 -1600 500 -550 600 -450 600 -1550 600 -450 600 -500 550 -1550 600 -1550 550 -500 550 -1600 550 -500 550 -550 550 -1600 500 -1600 550 -1600 550 -1550 550 -1600 550 -1550 550 -1600 550 -1550 550 -550 550 -500 550 -550 500 -550 550 -550 500 -550 500 -550 550 -550 500 -550 550 -500 550 -550 500 -550 550 -500 550 -550 550 -1550 550 -1600 550 -1550 550 -1600 550 -1600 500 -1600 550 -1600 500 -1600 550

Unknown encoding: FA36E9A0 (32 bits)
Raw (100): 12522 4300 -4350 550 -1550 550 -550 550 -1550 550 -1600 550 -500 550 -550 550 -1550 600 -500 550 -500 600 -1550 550 -500 550 -500 600 -1550 550 -1550 600 -500 550 -1550 550 -550 550 -1600 500 -1600 550 -1600 500 -1650 500 -550 500 -1600 550 -1600 500 -1650 500 -550 500 -550 550 -500 550 -550 550 -1550 550 -550 550 -500 550 -1600 500 -1600 550 -1600 550 -500 550 -550 500 -550 500 -600 500 -550 500 -550 550 -500 550 -550 550 -1550 550 -1600 550 -1550 550 -1600 550 -1550 550

For now I have no physical access to the AC, so I can not make yet another dump by pressing the on/off button, but I would like to have at least a test code to start discarding possibilities.

I never used these libraries before so i really don't know how to use them, the only thing that i know it's that they have a function call sendRaw, that it's used when you don't know the encoding used in the device, but i haven't find any example of it's use in the libraries.

If anyone can help me with this, it would be awesome.

madmexx

#1
May 04, 2014, 06:44 pm Last Edit: May 04, 2014, 09:10 pm by madmexx Reason: 1
I have the same problem! and the same air conditioning

I used this sketch from analyIR:
http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/
i have this output:
Code: [Select]

Press the button on the remote now - once only

Raw: (199) 4444, -4384, 568, -1580, 568, -528, 568, -1540, 608, -1604, 568, -508, 568, -532, 568, -1580, 564, -536, 564, -508, 564, -1612, 568, -504, 568, -532, 568, -1540, 608, -1604, 568, -504, 568, -1608, 564, -512, 564, -1608, 568, -1580, 568, -1564, 608, -1564, 608, -504, 568, -1612, 564, -1580, 564, -1608, 572, -504, 568, -532, 568, -504, 568, -532, 568, -1540, 608, -528, 572, -504, 568, -1604, 568, -1580, 568, -1608, 564, -512, 568, -528, 572, -504, 568, -532, 568, -504, 568, -532, 568, -504, 568, -508, 592, -1580, 568, -1608, 564, -1584, 568, -1604, 568, -1580, 568, -5168, 4440, -4360, 588, -1584, 564, -536, 568, -1576, 572, -1604, 568, -504, 568, -532, 568, -1580, 568, -532, 568, -504, 568, -1604, 568, -508, 568, -532, 568, -1580, 564, -1612, 568, -504, 568, -1604, 568, -504, 596, -1580, 568, -1608, 564, -1580, 568, -1608, 568, -504, 568, -1568, 604, -1540, 608, -1568, 604, -532, 568, -508, 564, -512, 564, -536, 568, -1576, 568, -532, 568, -508, 568, -1564, 608, -1604, 568, -1580, 568, -528, 572, -508, 564, -508, 564, -536, 568, -504, 572, -528, 572, -504, 568, -532, 568, -1576, 568, -1604, 572, -1580, 564, -1608, 568, -1608, 568,

Press the button on the remote now - once only

Raw: (199) 4444, -4384, 568, -1580, 568, -532, 568, -1580, 568, -1604, 568, -504, 568, -532, 568, -1540, 608, -532, 568, -504, 568, -1604, 572, -504, 568, -532, 568, -1576, 572, -1604, 572, -500, 572, -1608, 568, -500, 572, -532, 568, -504, 568, -1608, 568, -1576, 572, -1604, 568, -1604, 596, -1552, 568, -1564, 608, -1580, 568, -1568, 604, -508, 568, -528, 572, -504, 568, -532, 568, -504, 568, -532, 572, -1580, 568, -1604, 568, -1580, 568, -1604, 568, -504, 568, -532, 568, -504, 572, -1604, 572, -500, 572, -532, 568, -504, 568, -532, 568, -1580, 568, -1564, 608, -1580, 568, -5192, 4420, -4380, 568, -1580, 568, -532, 568, -1580, 568, -1564, 608, -504, 568, -532, 568, -1580, 568, -532, 568, -504, 568, -1608, 568, -508, 568, -528, 568, -1540, 608, -1604, 568, -508, 568, -1604, 568, -504, 596, -508, 568, -504, 572, -1604, 568, -1604, 568, -1580, 568, -1604, 568, -1584, 564, -1608, 568, -1604, 568, -1540, 608, -528, 572, -504, 568, -504, 568, -532, 568, -504, 568, -536, 564, -1584, 568, -1604, 572, -1600, 572, -1576, 596, -504, 568, -508, 568, -504, 592, -1580, 568, -532, 568, -504, 572, -504, 568, -532, 568, -1576, 572, -1608, 564, -1608, 564,

Press the button on the remote now - once only

Raw: (199) 4452, -4376, 568, -1540, 608, -532, 568, -1580, 568, -1608, 568, -500, 572, -532, 568, -1580, 568, -532, 568, -504, 568, -1604, 572, -504, 568, -532, 568, -1540, 608, -1604, 568, -504, 596, -1576, 572, -504, 568, -1568, 604, -1580, 572, -1604, 568, -1608, 568, -504, 568, -1604, 568, -1580, 572, -1600, 568, -508, 568, -532, 568, -504, 568, -532, 568, -1540, 608, -532, 568, -504, 568, -1604, 568, -1580, 568, -1608, 564, -512, 568, -528, 572, -504, 568, -532, 568, -504, 568, -532, 568, -504, 572, -504, 596, -1576, 568, -1568, 604, -1580, 568, -1604, 572, -1576, 568, -5172, 4440, -4384, 568, -1580, 568, -528, 572, -1540, 604, -1604, 572, -504, 568, -532, 568, -1576, 572, -528, 568, -512, 564, -1608, 568, -504, 568, -532, 568, -1580, 568, -1604, 568, -504, 568, -1608, 568, -504, 596, -1580, 564, -1608, 572, -1576, 572, -1604, 568, -504, 568, -1604, 568, -1540, 608, -1604, 568, -536, 564, -508, 568, -508, 568, -528, 572, -1576, 568, -532, 568, -504, 572, -1604, 568, -1604, 568, -1584, 564, -532, 572, -504, 568, -504, 568, -532, 568, -504, 568, -532, 568, -508, 568, -528, 568, -1540, 608, -1604, 568, -1580, 568, -1608, 572, -1604, 568,

Press the button on the remote now - once only

Raw: (199) 4472, -4356, 568, -1580, 568, -528, 572, -1576, 596, -1540, 632, -480, 568, -532, 568, -1540, 608, -528, 572, -504, 572, -1604, 568, -504, 568, -532, 568, -1580, 568, -1604, 568, -504, 572, -1564, 608, -504, 568, -532, 568, -504, 568, -1568, 608, -1576, 576, -1604, 568, -1604, 568, -1580, 568, -1604, 568, -1580, 568, -1604, 568, -508, 568, -532, 592, -480, 568, -532, 568, -504, 568, -532, 568, -1580, 568, -1604, 568, -1580, 568, -1608, 568, -508, 568, -528, 572, -504, 568, -1604, 568, -504, 572, -528, 568, -508, 568, -532, 568, -1540, 604, -1608, 568, -1576, 572, -5168, 4440, -4384, 568, -1580, 568, -532, 568, -1540, 604, -1568, 608, -504, 568, -532, 568, -1540, 608, -532, 568, -504, 568, -1604, 568, -508, 568, -532, 568, -1576, 572, -1604, 568, -504, 568, -1608, 568, -504, 596, -508, 564, -508, 564, -1612, 568, -1604, 568, -1580, 568, -1604, 568, -1580, 568, -1604, 568, -1608, 568, -1576, 572, -528, 568, -508, 568, -504, 568, -532, 568, -504, 572, -528, 568, -1580, 568, -1568, 608, -1604, 568, -1580, 568, -528, 572, -504, 568, -504, 600, -1580, 568, -528, 572, -504, 568, -504, 568, -532, 568, -1580, 568, -1604, 572, -1604, 568,


i have pushed ON / OFF /ON / OFF


please help  :smiley-red:

andalado

#2
May 06, 2014, 03:20 am Last Edit: May 06, 2014, 03:34 am by andalado Reason: 1
I Solved it... this morning.
I used the same sketch as you madmexx, to dump the output of the remote and this is what i got

Code: [Select]

Press the button on the remote now - once only

Raw: (199) 4372, 4372, 544, 1592, 544, 548, 548, 1588, 544, 1616, 544, 524, 544, 548, 544, 1592, 544, 548, 544, 524, 544, 1616, 544, 520, 544, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 544, 548, 544, 1592, 544, 1616, 544, 1616, 544, 1588, 544, 1620, 540, 1592, 544, 1616, 544, 1592, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 524, 568, 524, 544, 524, 544, 548, 544, 524, 544, 548, 544, 1592, 544, 1616, 544, 1588, 572, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1592, 544, 5180, 4372, 4372, 544, 1592, 544, 548, 544, 1592, 544, 1616, 544, 524, 544, 548, 544, 1592, 540, 552, 544, 524, 540, 1620, 544, 520, 544, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 568, 524, 544, 1616, 544, 1592, 544, 1616, 544, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1616, 544, 524, 544, 548, 544, 524, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 524, 544, 548, 544, 1616, 544, 1592, 544, 1616, 544, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1616, 544,

Press the button on the remote now - once only

Raw: (199) 4520, 4296, 620, 1512, 624, 468, 624, 1512, 620, 1540, 592, 476, 544, 548, 544, 1592, 540, 552, 544, 524, 540, 1620, 544, 524, 540, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 544, 1616, 544, 1588, 572, 1592, 568, 1592, 568, 496, 572, 1592, 568, 1564, 572, 1588, 568, 500, 568, 524, 568, 500, 568, 528, 564, 1596, 540, 552, 540, 528, 536, 1624, 536, 1596, 540, 1624, 536, 528, 540, 556, 536, 528, 540, 556, 536, 528, 540, 556, 536, 528, 540, 528, 564, 1596, 536, 1624, 540, 1596, 536, 1624, 536, 1600, 536, 5188, 4364, 4380, 536, 1600, 536, 556, 536, 1600, 536, 1624, 536, 532, 536, 556, 536, 1596, 540, 556, 536, 532, 536, 1624, 536, 528, 540, 556, 536, 1596, 536, 1624, 536, 532, 536, 1624, 536, 532, 564, 1596, 536, 1624, 536, 1600, 536, 1624, 536, 528, 540, 1624, 536, 1596, 536, 1624, 536, 556, 536, 532, 536, 532, 536, 556, 536, 1600, 536, 556, 536, 532, 536, 1624, 536, 1624, 536, 1600, 536, 556, 536, 532, 536, 528, 536, 560, 536, 532, 536, 556, 536, 532, 536, 556, 536, 1600, 532, 1624, 536, 1600, 536, 1624, 536, 1624, 536,


(i took all the - and the spaces) and i use it with this sketck

Code: [Select]

/* Example program for from IRLib - an Arduino library for infrared encoding and decoding
* Version 1.3   January 2014
* Copyright 2014 by Chris Young http://cyborg5.com
* Based on original example sketch for IRremote library
* Version 0.11 September, 2009
* Copyright 2009 Ken Shirriff
* http://www.righto.com/
*/
#include <IRLib.h>

int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
unsigned int Signal_0_0[] = {4372, 4372, 544, 1592, 544, 548, 548, 1588, 544, 1616, 544, 524, 544, 548, 544, 1592, 544, 548, 544, 524, 544, 1616, 544, 520, 544, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 544, 548, 544, 1592, 544, 1616, 544, 1616, 544, 1588, 544, 1620, 540, 1592, 544, 1616, 544, 1592, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 524, 568, 524, 544, 524, 544, 548, 544, 524, 544, 548, 544, 1592, 544, 1616, 544, 1588, 572, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1592, 544, 5180, 4372, 4372, 544, 1592, 544, 548, 544, 1592, 544, 1616, 544, 524, 544, 548, 544, 1592, 540, 552, 544, 524, 540, 1620, 544, 520, 544, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 568, 524, 544, 1616, 544, 1592, 544, 1616, 544, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1616, 544, 524, 544, 548, 544, 524, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 548, 544, 524, 544, 524, 544, 548, 544, 1616, 544, 1592, 544, 1616, 544, 1588, 544, 1616, 544, 1592, 544, 1616, 544, 1616, 544}; //AnalysIR Batch Export - RAW
unsigned int Signal_1_1[] = {4520, 4296, 620, 1512, 624, 468, 624, 1512, 620, 1540, 592, 476, 544, 548, 544, 1592, 540, 552, 544, 524, 540, 1620, 544, 524, 540, 552, 544, 1588, 544, 1616, 544, 524, 544, 1616, 544, 524, 544, 1616, 544, 1588, 572, 1592, 568, 1592, 568, 496, 572, 1592, 568, 1564, 572, 1588, 568, 500, 568, 524, 568, 500, 568, 528, 564, 1596, 540, 552, 540, 528, 536, 1624, 536, 1596, 540, 1624, 536, 528, 540, 556, 536, 528, 540, 556, 536, 528, 540, 556, 536, 528, 540, 528, 564, 1596, 536, 1624, 540, 1596, 536, 1624, 536, 1600, 536, 5188, 4364, 4380, 536, 1600, 536, 556, 536, 1600, 536, 1624, 536, 532, 536, 556, 536, 1596, 540, 556, 536, 532, 536, 1624, 536, 528, 540, 556, 536, 1596, 536, 1624, 536, 532, 536, 1624, 536, 532, 564, 1596, 536, 1624, 536, 1600, 536, 1624, 536, 528, 540, 1624, 536, 1596, 536, 1624, 536, 556, 536, 532, 536, 532, 536, 556, 536, 1600, 536, 556, 536, 532, 536, 1624, 536, 1624, 536, 1600, 536, 556, 536, 532, 536, 528, 536, 560, 536, 532, 536, 556, 536, 532, 536, 556, 536, 1600, 532, 1624, 536, 1600, 536, 1624, 536, 1624, 536}; //AnalysIR Batch Export - RAW

IRsend Envio;

void setup()
{
 Serial.begin(9600);
}

void loop() {
 if (Serial.read() != -1) {
   
   Envio.IRsendRaw::send(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export - RAW
   
   Serial.println("Envio ON");

   delay(15000);
 
   Envio.IRsendRaw::send(Signal_1_1, sizeof(Signal_1_1)/sizeof(int), khz); //AnalysIR Batch Export - RAW
 
   Serial.println("Envio OFF");
 }
}



And IT WORKED...  at the first attempt.  i use IRLib http://tech.cyborg5.com/irlib/ but before use it, you need to go into the library and modify the archive IRLib.h, this specific line

Code: [Select]
#define RAWBUF 100 // Length of raw duration buffer

And change it for a value over 200, i use 230

Code: [Select]
#define RAWBUF 230 // Length of raw duration buffer

And that's it... Use it and tell me how it went

P.S. the code can be smaller, because the stream send by  the remote it's not actually on/off, what it does, it toggle's the power's state os the AC , so if the AC its ON, you can send any of the raw signals and it will go OFF, same thing happend if the AC its OFF.

Go Up