Page 1 of 3

TechnoLux AC codes

Posted: Mon Jun 07, 2021 9:18 am
by oxygen
Hello,

I've deciphered the binary format for my TechnoLux AC (AnalysisIR sees the protocol as KOMECO112_128AC), but I am not sure how exactly to send it. I want to use a Xiaomi IR remote for this (chuangmi.remote.v2). From what I can tell it knows pronto codes and raw format, but since I know what the actual bytes are I want to send them so I can mix and match as I please. From what I can tell the remote expects a base64 encoded string as a command and maybe a frequency. What I can't figure out is do I have to encode my bytes in any way or do I just base64 them and send them?

This is an example of what I got:
Hex: 23CB26010024030A38000000007E
Binary:
00100011 11001011 00100110 00000001
00000000 00100100 00000011 00001010
00111000 00000000 00000000 00000000
00000000 01111110

Re: TechnoLux AC codes

Posted: Mon Jun 07, 2021 12:23 pm
by AnalysIR
You can export the signal in RAW or Pronto format. Menu->File->Export in AnalysIR.

Unfortunately, I don't know much about this Xiaomi device. It seems it only works @ 38kHz which should be fine for most(95%+) AC units.

The simplest approach is to record (& clean) the signals you want to use, with AnalysIR. Then export to RAW or Pronto format.

Then once you have a set of signals you are happy with, send them via the Xiaomi device.
I presume you have software for that?

If you want to control individual feature of the AC unit, you would need to reverse engineer the actual bit patterns of the IR protocol - so you can build each signal on-the-fly as required. You can also use the tools in AnalysIR to help with that. See the user manual, our videos & several posts on our blog. You may find it is already done on Github, if lucky.

Re: TechnoLux AC codes

Posted: Mon Jun 07, 2021 3:55 pm
by oxygen
I have reversed the actual bit patterns of the IR protocol and I can build each signal on the fly from a binary stand point. What I was wondering is how do I send a generated pattern? Is there anything other than frequency that I have to worry about? Is sending the bits with just the right frequency enough?

Re: TechnoLux AC codes

Posted: Mon Jun 07, 2021 4:53 pm
by AnalysIR
I see 2 options:

Once you have the bit pattern, create a RAW signal in a buffer and send that. You will also need to add in headers & trailers for your signal.

If you are sending directly without a buffer, you can just send it on the fly - insert the mark/space length for 1s & 0s as they occur and similarly for headers/trailers.

For the frequency you will have to generate the carrier & turn it on for a mark and off for a space.

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 10:57 am
by oxygen
I think I am starting to get the hang of this. So my Xiaomi remote (chuangmi.remote.v2) can only send raw IR. That means I somehow have to take a built hex frame and turn it into a raw signal.


For example this is a code captured with AnalysisIR for On Cool 21 degrees:

Row: On Cool 21 degree
Hex: 23CB26010024030A38000000007E
Binary:
00100011 11001011 00100110 00000001
00000000 00100100 00000011 00001010
00111000 00000000 00000000 00000000
00000000 01111110

1, 12:05:24.7, KOMECO112_128AC, On Cool 21, 23CB26010024030A38000000007E, , 112, 5/27/2021, 1;0;1000;0|2;1000;3432;1|3;4432;1660;0|4;6092;516;1|5;6608;1240;0|6;7848;516;1|7;8364;1236;0|8;9600;544;1|9;10144;372;0|10;10516;512;1|11;11028;400;0|12;11428;516;1|13;11944;396;0|14;12340;516;1|15;12856;1240;0|16;14096;476;1|17;14572;436;0|18;15008;516;1|19;15524;404;0|20;15928;516;1|21;16444;1236;0|22;17680;520;1|23;18200;1236;0|24;19436;516;1|25;19952;396;0|26;20348;516;1|27;20864;1240;0|28;22104;516;1|29;22620;400;0|30;23020;512;1|31;23532;400;0|32;23932;516;1|33;24448;1240;0|34;25688;516;1|35;26204;1240;0|36;27444;544;1|37;27988;368;0|38;28356;520;1|39;28876;1236;0|40;30112;516;1|41;30628;1240;0|42;31868;516;1|43;32384;396;0|44;32780;516;1|45;33296;400;0|46;33696;516;1|47;34212;1236;0|48;35448;516;1|49;35964;400;0|50;36364;516;1|51;36880;400;0|52;37280;516;1|53;37796;1236;0|54;39032;520;1|55;39552;396;0|56;39948;516;1|57;40464;396;0|58;40860;516;1|59;41376;400;0|60;41776;516;1|61;42292;396;0|62;42688;516;1|63;43204;396;0|64;43600;516;1|65;44116;396;0|66;44512;520;1|67;45032;400;0|68;45432;516;1|69;45948;396;0|70;46344;516;1|71;46860;396;0|72;47256;520;1|73;47776;396;0|74;48172;516;1|75;48688;396;0|76;49084;516;1|77;49600;396;0|78;49996;516;1|79;50512;400;0|80;50912;516;1|81;51428;396;0|82;51824;516;1|83;52340;400;0|84;52740;516;1|85;53256;400;0|86;53656;516;1|87;54172;396;0|88;54568;516;1|89;55084;1240;0|90;56324;516;1|91;56840;396;0|92;57236;516;1|93;57752;396;0|94;58148;520;1|95;58668;1236;0|96;59904;516;1|97;60420;396;0|98;60816;516;1|99;61332;404;0|100;61736;544;1|101;62280;1208;0|102;63488;516;1|103;64004;1240;0|104;65244;516;1|105;65760;400;0|106;66160;512;1|107;66672;400;0|108;67072;516;1|109;67588;396;0|110;67984;516;1|111;68500;400;0|112;68900;516;1|113;69416;396;0|114;69812;516;1|115;70328;400;0|116;70728;540;1|117;71268;376;0|118;71644;512;1|119;72156;1240;0|120;73396;516;1|121;73912;400;0|122;74312;516;1|123;74828;1236;0|124;76064;516;1|125;76580;400;0|126;76980;516;1|127;77496;396;0|128;77892;516;1|129;78408;396;0|130;78804;516;1|131;79320;400;0|132;79720;516;1|133;80236;400;0|134;80636;516;1|135;81152;396;0|136;81548;516;1|137;82064;400;0|138;82464;516;1|139;82980;1236;0|140;84216;516;1|141;84732;1240;0|142;85972;516;1|143;86488;1240;0|144;87728;516;1|145;88244;396;0|146;88640;516;1|147;89156;400;0|148;89556;516;1|149;90072;396;0|150;90468;516;1|151;90984;400;0|152;91384;516;1|153;91900;396;0|154;92296;516;1|155;92812;396;0|156;93208;520;1|157;93728;396;0|158;94124;516;1|159;94640;396;0|160;95036;516;1|161;95552;400;0|162;95952;460;1|163;96412;456;0|164;96868;516;1|165;97384;396;0|166;97780;516;1|167;98296;396;0|168;98692;520;1|169;99212;396;0|170;99608;512;1|171;100120;400;0|172;100520;516;1|173;101036;396;0|174;101432;516;1|175;101948;400;0|176;102348;516;1|177;102864;396;0|178;103260;520;1|179;103780;396;0|180;104176;516;1|181;104692;400;0|182;105092;512;1|183;105604;400;0|184;106004;516;1|185;106520;396;0|186;106916;520;1|187;107436;396;0|188;107832;516;1|189;108348;396;0|190;108744;516;1|191;109260;396;0|192;109656;516;1|193;110172;400;0|194;110572;516;1|195;111088;400;0|196;111488;516;1|197;112004;396;0|198;112400;516;1|199;112916;400;0|200;113316;516;1|201;113832;396;0|202;114228;516;1|203;114744;396;0|204;115140;516;1|205;115656;400;0|206;116056;516;1|207;116572;396;0|208;116968;516;1|209;117484;396;0|210;117880;520;1|211;118400;400;0|212;118800;516;1|213;119316;396;0|214;119712;516;1|215;120228;1240;0|216;121468;516;1|217;121984;1236;0|218;123220;516;1|219;123736;1240;0|220;124976;544;1|221;125520;1212;0|222;126732;516;1|223;127248;1240;0|224;128488;516;1|225;129004;1236;0|226;130240;516;1|227;130756;404;0|228;131160;516;1|, , 0,


I know that the 5th byte (numbering from 0) is the one that controls ON or OFF and that 0x24 is ON and 0x20 is OFF. I also know that the last byte is a checksum of the previous ones. So for example if I wanted to send Off Cool 21 degrees I would need to send this hex code (I used spaces to make the on/off byte stand out):
23CB260100 20 030A38000000007A


What is not clear to me is how do I convert this from hex bytes to a raw signal? I think there is a header there in the signal that is a bit special from what I can see in the Channel 1 graph in AnalysisIR. And there is also the modulation protocol KOMECO112_128AC that I think influences how this is encoded.
demodulated signal on cool 21.png

Here is also the pulse analytics which I am not sure how to read:
pulse analytics on cool 21.png


My feeling is that the hex bytes is not all the information I need. How can I extract the raw header from AnalysisIR? What does generate the carrier mean?

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 11:52 am
by AnalysIR
just export it as RAW (actually IRremote) format from the Menus option. You will then be able to figure out how to do it.

Remember to 'Clean' the signal first for better performance (Option under the Power Tools Menu)

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 2:05 pm
by oxygen
Ok, so I got this:

Raw (227): 3400,-1700,420,-1260,420,-1260,420,-420,420,-420,420,-420,420,-1260,420,-420,420,-420,420,-1260,420,-1260,420,-420,420,-1260,420,-420,420,-420,420,-1260,420,-1260,420,-420,420,-1260,420,-1260,420,-420,420,-420,420,-1260,420,-420,420,-420,420,-1260,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-1260,420,-420,420,-420,420,-1260,420,-420,420,-420,420,-1260,420,-1260,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-1260,420,-420,420,-1260,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-1260,420,-1260,420,-1260,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-420,420,-1260,420,-1260,420,-1260,420,-1260,420,-1260,420,-1260,420,-420,420

I'm guessing the first 2 numbers (3400 & -1700) are the header, the first mark and first space. These are different from the rest so I assume they will always remain unchanged. The trailer is always 420. But I can't rap my head around how come sometimes a pair of 420, -420 end up being a 1 and other times a 0.

I've lined them up in excel with byte borders and everything and I still can't figure it out.
bit borders.png

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 2:10 pm
by oxygen
Hmm, I think my excel does not account for bit ordering...

EDIT: Yes, now it all makes sense, the bits are reversed.
bit borders.png
So that means that when I build my signal I have to reverse every byte before turning it into a raw signal?

Thank you so much for all the help!

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 2:43 pm
by AnalysIR
In AnalysIR you can change the bit orders for display and reverse engineering using the MSB/LSB8. Usually LSB8 is best for AC units.

Re: TechnoLux AC codes

Posted: Tue Jun 08, 2021 3:03 pm
by oxygen
Yes, I reverse engineered the signals using LSB8 and forgot about it and I just couldn't understand why things didn't line up. Now all I have to do is understand how to encode the raw signal in base64 in order for my Xiaomi remote to be able to use them.