Closed Pigi-102 closed 2 years ago
but whatever I do in my sketch I always send out a 48-bit message vs a 24-bit.
Can you supply a capture of what it is sending? And what kind of settings you set the IRCoolixAC
class to before sending it.
At first glance, I can't see anything obviously wrong in your code. Also, what version/revision of the library are you using?
Have you tried simplifying your code down to the bare minimum that produces the fault/issue? e.g. Like one of the many "TurnOn" examples.
IRCoolixAC::send()
should only ever produce a "COOLIX" message, not a "COOLIX48" message.
Basically, a COOLIX message is a subset of COOLIX48 messages. COOLIX messages physically contain 48-bits too, but there is a pattern to them. i.e. every second byte is inverted. That means we can shrink it to 24 bits. A COOLIX48 message is just one that does not follow that pattern.
define SEND_COOLIX true
undef SEND_COOLIX48
FYI, that will not have the effect you think it does.
Hello, that's what get captured:
Timestamp : 000013.780
Library : v_IRREMOTEESP8266_VERSION_MAJOR._IRREMOTEESP8266_VERSION_MINOR._IRREMOTEESP8266_VERSION_PATCH
Protocol : COOLIX48
Code : 0xB24D7B84E01F (48 Bits)
uint16_t rawData[199] = {4642, 4502, 514, 1706, 516, 624, 488, 1704, 514, 1702, 516, 624, 488, 624, 488, 1702, 514, 626, 488, 620, 488, 1702, 4
90, 620, 512, 620, 488, 1728, 488, 1704, 514, 624, 488, 1704, 514, 620, 488, 1702, 490, 1722, 488, 1724, 514, 1728, 488, 600, 512, 1728, 490, 1706, 512, 1698, 488, 646, 486, 622, 462, 646, 488
, 624, 488, 1704, 514, 626, 488, 628, 460, 1724, 514, 1702, 514, 1724, 462, 646, 488, 624, 488, 624, 488, 626, 486, 602, 488, 646, 460, 648, 486, 626, 488, 1704, 486, 1724, 488, 1748, 488, 170
4, 514, 1708, 488, 5312, 4648, 4494, 488, 1704, 486, 646, 486, 1698, 512, 1700, 488, 646, 462, 646, 486, 1728, 462, 648, 484, 622, 462, 1724, 510, 622, 488, 626, 488, 1702, 514, 1728, 490, 626
, 488, 1730, 462, 646, 488, 1704, 512, 1724, 486, 1698, 514, 1728, 488, 626, 488, 1728, 488, 1704, 514, 1700, 512, 620, 486, 620, 488, 620, 486, 626, 490, 1728, 488, 626, 488, 628, 460, 1750,
488, 1728, 488, 1704, 488, 646, 488, 620, 488, 624, 488, 626, 488, 626, 462, 646, 462, 644, 488, 626, 488, 1728, 490, 1704, 486, 1724, 514, 1724, 488, 1728, 488}; // COOLIX48 B24D7B84E01F
uint64_t data = 0xB24D7B84E01F;
This is ( or at least should be ) an "off" messages. Using the same decoder, with the original IR Remote the message for an of is the following:
Timestamp : 000023.275
Library : v_IRREMOTEESP8266_VERSION_MAJOR._IRREMOTEESP8266_VERSION_MINOR._IRREMOTEESP8266_VERSION_PATCH
Protocol : COOLIX
Code : 0xB27BE0 (24 Bits)
Mesg Desc.: Power: Off
uint16_t rawData[199] = {4386, 4384, 528, 1618, 528, 546, 526, 1618, 528, 1620, 528, 546, 526, 546, 526, 1618, 528, 546, 526, 546, 528, 1618, 528, 546, 528, 546, 526, 1618, 528, 1620, 528, 546, 528, 1618, 526, 546, 526, 1620, 528, 1618, 504, 1642, 528, 1618, 504, 572, 502, 1644, 528, 1618, 504, 1644, 528, 544, 502, 570, 502, 570, 502, 570, 524, 1622, 502, 572, 502, 570, 502, 1644, 502, 1644, 504, 1642, 504, 570, 502, 570, 502, 570, 502, 570, 502, 570, 502, 570, 502, 572, 502, 570, 526, 1620, 502, 1644, 502, 1644, 502, 1644, 504, 1644, 502, 5232, 4412, 4360, 526, 1620, 502, 570, 526, 1620, 502, 1644, 502, 572, 526, 546, 526, 1618, 502, 572, 502, 572, 526, 1620, 522, 550, 502, 572, 526, 1618, 528, 1620, 526, 546, 526, 1620, 526, 546, 526, 1618, 528, 1618, 528, 1618, 528, 1618, 528, 546, 526, 1618, 526, 1620, 528, 1618, 528, 546, 526, 546, 528, 546, 526, 546, 526, 1618, 528, 546, 528, 544, 528, 1618, 528, 1618, 528, 1618, 528, 544, 528, 546, 526, 546, 528, 544, 528, 544, 528, 544, 526, 546, 528, 544, 528, 1616, 528, 1618, 528, 1618, 528, 1618, 530, 1616, 528}; // COOLIX B27BE0
uint64_t data = 0xB27BE0;
Library version should be the lastone as I have d/loaded with the Arduino ide a couple of days ago From the Ide library manager I have the 2.8.1 version.
Pigi
0xB27BE0
is the correct code for "Power Off" and it turns out 0xB24D7B84E01F
is the 48 bit version of the 24-bit 0xB27BE0
. I hand checked it.
So that leaves a slight timing tolerance issue in the COOLIX detection/decoding as the likely issue. i.e. This is a false negative. I'll try to see if I can diagnose it deeper to see which part of the message if failing.
While I do that, I suggest you tweak this value/line in the dump code:
https://github.com/crankyoldgit/IRremoteESP8266/blob/f8e5662776102e57cf4c03af5e9fc54d14a07b19/examples/IRrecvDumpV2/IRrecvDumpV2.ino#L112
Try something larger than 25
. i.e. 30
or 35
. It may give you the correct results with that.
Yep. a Tolerance value of 27
would have matched that "Off" message as a 24-bit COOLIX message.
In short, the real device might accept it as is.
I'm actually using the IRrecvDumpV3 as receiver and already has the line you suggest. Could I modify the line
const uint8_t kTolerancePercentage = kTolerance; // kTolerance is normally 25%
with a bit more tollerance so I can see the message ?
const uint8_t kTolerancePercentage = 30
I'm not sure about my code and would like to see all messages I can send before trying to the real device.
Thnks for your time !
Yes ! I do confim that modifying with 30 will make dump works
Thanks a million for you time !
FYI, the changes mentioned above have now been included in the new v2.8.2 release of the library.
I've followed the web-ac-controller example to create a sketch to control my AC unit. The unit use the 24 bit protocol ( derived by testing the remote control with the irdump example ) but whatever I do in my sketch I always send out a 48-bit message vs a 24-bit. Cannot find anywhere a way to force the use of the 24-bit protocol.
Can someone share a bit of light on this ?
Here to sketch: