[Solved] Panasonic A/C decode

Everything related to protocols and IR codes
Locked
psylo24
Posts: 8
Joined: Mon Feb 15, 2016 8:08 am

[Solved] Panasonic A/C decode

Post by psylo24 » Mon Feb 15, 2016 2:35 pm

Dear all,

I tried to decode ircode from my ir remote for my PANASONIC A/C, but it seems the raw code (and the remote IR) are different than the post on your website (http://www.analysir.com/blog/2014/12/27 ... d-protocol)

I did the same test 3 times and have three different results :?
The tests are to configure the remote control to 20 degrees and start the recording of infrared codes and press the button to set temperature above the temperature at 21 degrees.

First test

Code: Select all

     3500     1650      500      400      500     1200
      500      350      500      400      500      350
      500      350      500      400      450      400
      500      350      500      350      500      400
      450      400      500      350      500     1250
      450      400      500      350      500      400
      450      400      500      350      500      400
      450      400      450     1300      450     1250
      450     1300      450      400      450      400
      500     1250      450      400      450      400
      500      400      450      400      450      400
      500      400      450      400      450      400
      450      400      500      400      450      400
      450      400      500      400      450      400
      450      400      450      400      500      400
      450      400      450      400      450      450
      450      400      450      400      450      400
      450      450      450      400      450      400
      450      450      450      400      450      400
      450      400      450     1300      450     1300
      450      400      450      400      450      400
      450      450      450      400      450     9950
     3450     1700      450      450      450     1250
      450      400      450      450      450      400
      450      400      450      450      450      400
      450      400      450      450      400      450
      450      400      450      400      450     1300
      450      400      450      450      400      450
      450      400      450      400      450      450
      450      400      450     1300      400     1300
      450     1300      450      400      450      400
      450     1300      450      400      450      400
      450      450      450      400      450      400
      450      450      400      450      450      400
      450      400      450      450      450      400
      450      400      450      450      400     1300
      450      450      400      450      450     1250
      450      450      400      450      450      400
      450      450      400      450      450     1250
      450      450      450     1250      450      450
      400     1300      450      400      450      450
      450      400      450      400      450      450
      400      450      450      400      450      450
      400      450      450     1250      450      450
      400     1300      450      450      400      450
      450      400      450     1300      400      450
      450     1300      400      450      450      400
      450     1300      400     1300      450      450
      400      450      450      400      450      400
      450      450      400      450      450      400
      450      450      400      450      450      400
      450      450      400      450      400      450
      450     1300      400     1300      450     1300
      450      400      450      400      450      450
      400      450      450      400      450      450
      400      450      450      400      450      400
      450     1300      450     1300      400     1300
      450      400      450      450      400      450
      450      400      450      450      400      450
      450      400      450      450      400      450
      400      450      450      400      450      450
      400      450      450      400      450      450
      400      450      400     1300      450      450
      400      450      450      400      450      450
      400      450      400      450      450     1300
      400      450      450      400      450      450
      400      450      450      400      450      450
      400      450      400      450      450      400
      450      450      400      450      450      400
      450      450      400      450      400      450
      450      400      450      450      400     1300
      450     1300      400      450      450     1300
      400      450      450     1300      400     1300
      450
Second test

Code: Select all

     3550     1650      500      350      500     1250
      500      350      500      350      500      400
      500      350      500      350      500      350
      500      400      500      350      500      350
      500      400      450      400      500     1250
      450      400      450      400      500      350
      500      400      450      400      450      400
      500      400      450     1250      500     1250
      450     1250      500      400      450      400
      450     1250      500      400      450      400
      450      400      500      400      450      400
      450      400      500      350      500      400
      450      400      450      400      500      400
      450      400      450      400      450      400
      500      400      450      400      450      400
      500      400      450      400      450      400
      450      400      500      400      450      400
      450      400      450      450      450      400
      450      400      450      450      450      400
      450      400      450     1300      450     1250
      450      450      450      400      450      400
      450      400      450      450      450     9900
     3500     1700      450      400      450     1300
      450      400      450      400      450      450
      450      400      450      400      450      450
      400      450      450      400      450      400
      450      450      450      400      450     1300
      400      450      450      400      450      400
      450      450      450      400      450      400
      450      450      400     1300      450     1300
      450     1250      450      450      400      450
      450     1300      400      450      450      400
      450      400      450      450      400      450
      450      400      450      450      400      450
      450      400      450      400      450      450
      400      450      450      400      450     1300
      450      400      450      400      450     1300
      450      400      450      450      400      450
      450      400      450      400      450     1300
      450      400      450     1300      450      400
      450     1300      450      400      450      400
      450      450      400      450      450      400
      450      450      400      450      450      400
      450      400      450     1300      450      400
      450     1300      450      400      450      400
      450      450      400     1300      450      450
      400     1300      450      400      450      450
      400     1300      450     1300      450      400
      450      400      450      450      400      450
      450      400      450      450      400      450
      450      400      450      450      400      450
      450      400      450      400      450      450
      400     1300      450     1300      450     1250
      450      450      400      450      450      400
      450      450      400      450      450      400
      450      400      450      450      400      450
      450     1300      400     1300      450     1300
      400      450      450      400      450      450
      400      450      450      400      450      450
      400      450      400      450      450      400
      450      450      400      450      450      400
      450      450      400      450      400      450
      450      400      450     1300      450      400
      450      450      400      450      400      450
      450      400      450      450      400     1300
      450      450      400      450      450      400
      450      450      400      450      400      450
      450      400      450      450      400      450
      450      400      450      450      400      450
      400      450      450      400      450      450
      400      450      450      400      450     1300
      400     1300      450      450      400     1300
      450      450      400     1300      450     1300
      400

Third test

Code: Select all

     3550     1650      500      350      550     1200
      500      350      500      400      500      350
      500      350      500      350      500      400
      500      350      500      350      500      400
      450      400      500      350      500     1250
      450      400      500      350      500      400
      450      400      450      400      500      350
      500      400      450     1250      500     1250
      450     1300      450      400      450      400
      500     1250      450      400      450      400
      500      400      450      400      450      400
      450      400      500      400      450      400
      450      400      500      400      450      400
      450      400      450      400      500      400
      450      400      450      400      450      450
      450      400      450      400      450      400
      500      400      450      400      450      400
      450      450      450      400      450      400
      450      400      450      450      450      400
      450      400      450     1300      450     1300
      400      450      450      400      450      400
      450      450      450      400      450     9950
     3450     1700      450      400      450     1300
      450      400      450      450      400      450
      450      400      450      400      450      450
      450      400      450      400      450      450
      450      400      450      400      450     1300
      450      400      450      400      450      450
      450      400      450      400      450      450
      400      450      450     1250      450     1300
      450     1300      400      450      450      400
      450     1300      450      400      450      400
      450      450      400      450      450      400
      450      400      450      450      450      400
      450      400      450      450      400      450
      450      400      450      400      450     1300
      450      400      450      450      400     1300
      450      400      450      450      450      400
      450      400      450      450      400     1300
      450      450      400     1300      450      400
      450     1300      450      400      450      450
      400      450      450      400      450      400
      450      450      450      400      450      400
      450      450      400     1300      450      400
      450     1300      450      400      450      450
      400      450      450     1300      400      450
      450     1250      450      450      400      450
      450     1300      400     1300      450      400
      450      450      400      450      450      400
      450      450      400      450      450      400
      450      400      450      450      400      450
      450      400      450      450      400      450
      450     1300      400     1300      450     1300
      400      450      450      400      450      450
      400      450      400      450      450      400
      450      450      400      450      450      400
      450     1300      450     1250      450     1300
      450      400      450      450      400      450
      450      400      450      400      450      450
      400      450      450      400      450      450
      400      450      450      400      450      450
      400      450      400      450      450      400
      450      450      400     1300      450      450
      400      450      400      450      450      400
      450      450      400      450      450     1300
      400      450      400      450      450      400
      450      450      400      450      450      400
      450      450      400      450      400      450
      450      400      450      450      400      450
      450      400      450      450      400      450
      400      450      450      450      400     1300
      450     1300      400      450      450     1300
      400      450      400     1350      400     1300
      450
The goal is to control my air conditioning with my raspberry, but I can not interpret the raw code.

I don't undrestand why the results are not the same, and how interpret these codes?

On some sites I found the following results and on other sites I think of completely different values
  • 3550 HDR_MARK
    1600 HDR_SPACE
    550 BIT_MARK
    350 ZERO_SPACE
    500 BIT_MARK
    1200 ONE_SPACE
Thanks in advance for your help.

Best regard.
Last edited by psylo24 on Mon Feb 22, 2016 9:52 am, edited 1 time in total.

User avatar
AnalysIR
Site Admin
Posts: 422
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Panasonic A/C decode

Post by AnalysIR » Mon Feb 15, 2016 7:40 pm

I thinks this is the same post I answered over on GitHub, so I will just repeat the answer here.



@psylo24
Your signals are fine. I was able to decode them and cleaned one up for you.

here is the Hex decode and C code to send the cleaned up signal with IRremote.
Your signals have 216 data bits :)

Code: Select all

/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: xxxxxxxx
Session History
Type : Key : Value : Bits : Carrier Frequency (kHz)
0 : PANASONIC128_216_280AC :  : 40040720000000604004072000905401453000700700008100006B : 216 : 0
Note: Be sure to use the correct Carrier frequency, for each individual signal, as(or if) indicated above
*/

// 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 carrier frequency


unsigned int Signal_0_0[] = {3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,9950,3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,435,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,435,435,1300,435,435,435,1300,435,1300,435}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: PANASONIC128_216_280AC, Key:  
All you need to do is to change the values as in the example I provided above.

You will find it difficult to have all the signals in RAM at the same time. If you search the issues or PRs here you should be able to find an example of storing the signals in flash and sending them from flash without using up RAM. (PROGMEM would be a good word to search for)

Alternatively, you will find several examples of how to send AC signals from the Hex representation on our blog - saving both flash & SRAM.

I also noticed that you plan to use RPi. In that case you should investigate LIRC.

FYI: AnalysIR has a facility to export signal into LIRC format, but it can also be done manually, if you read up on it.

psylo24
Posts: 8
Joined: Mon Feb 15, 2016 8:08 am

Re: Panasonic A/C decode

Post by psylo24 » Tue Feb 16, 2016 1:39 pm

Hello thank you very much for your reply :and for your help.

Yes sure, i used mode2 (included in LIRC package) for make my raw trace.

But I tried to send my raw signal with lirc but it did not work....

I don't undrestand in your response why on your software you put the raw code bellow :

Code: Select all

unsigned int Signal_0_0[] = {3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,9950,3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,435,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,435,435,1300,435,435,435,1300,435,1300,435}; //AnalysIR Batch Export (IRremote) - RAW
Because in my source raw code there isn't 435 value... can you explain me please ?

if I understand your RAW track you changed, the value 1 = 435 and 1300 = 0 ?

In fact my goal is to control my air conditioning trough a web interface (since my rpi), but my problem is to learn the IR codes from my remote to lirc because the code is too long.

I would like to get to calculate the IR code so that I can change the temperature, direct split easily, .... that's why I want to understand why your raw code is different from the one I you provide?

I do not know if I can make myself understood because my English is not very good, but in fact I do not want to record the codes but understand the codes to generate with my good values (temperature, mode, fan speed, etc ...)


Thanks again :)

User avatar
AnalysIR
Site Admin
Posts: 422
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Panasonic A/C decode

Post by AnalysIR » Wed Feb 17, 2016 1:10 pm

All IR receivers will change the timing of a signal and they will always vary, evey time.
see: https://www.analysir.com/blog/2014/03/2 ... ignal-lag/

So I used AnalysIR to to automatically correct these timings for you.

To use LIRC, you need to change the format I posted into LIRC RAW format. (Also a feature in AnalysIR)

There are several examples on our blog, on how to go about reverse engineering signals for an AC.
and a video here showing the reverse engineering tool in AnalysIR: https://www.analysir.com/blog/2015/09/2 ... ring-tool/


In summary, you can manually create a LIRC RAW .conf file (but use the values I posted) and yu should be able to send from LIRC.

(Make sure to test you IR emitter circuit with some TV signals, to ensure it is working etc)

psylo24
Posts: 8
Joined: Mon Feb 15, 2016 8:08 am

Re: Panasonic A/C decode

Post by psylo24 » Thu Feb 18, 2016 8:43 pm

Hello,

Thank you very much for your help it's working fine when i send your modified raw code :P

But I would like to learn more codes from my remote, how can I have an IR 'clean' code that I could send without using the analysIR software?

For example i can see a new raw code when i put a button on my remote :

Code: Select all

7200000
Decoded PANASONIC - Address: 4004 Value: 7200000 (48 bits)
Raw (101): 3500 -1650 500 -350 500 -1250 500 -350 500 -350 550 -350 500 -350 500 -350 500 -350 550 -300 550 -350 500 -350 500 -350 550 -300 500 -1250 500 -350 500 -350 550 -350 500 -350 500 -350 500 -350 550 -350 500 -1200 500 -1250 450 -1250 500 -350 500 -400 450 -1250 500 -350 550 -350 500 -350 500 -350 500 -350 550 -350 500 -350 500 -350 500 -350 550 -350 450 -400 500 -350 500 -350 550 -350 500 -350 500 -350 500 -350 550 -350 500 -350 500 -350 500 -350 550 -350 
 
But the format of my received code is not at all like your code after interpretation by AnaysIR software.

Thanks in advance for your help.

User avatar
AnalysIR
Site Admin
Posts: 422
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Panasonic A/C decode

Post by AnalysIR » Thu Feb 18, 2016 8:54 pm

If you are using IRremote, you need to to change the setting for RAWBUF in the library to increase the size of signal that can be received.

Alternatively, just use the sketch on our blog
https://www.analysir.com/blog/2014/03/1 ... s-arduino/

Then you should just change all of the values to the ones I used...but if you don't have a copy of AnalysIR, you must do the editing manually.

psylo24
Posts: 8
Joined: Mon Feb 15, 2016 8:08 am

[Solved] Re: Panasonic A/C decode

Post by psylo24 » Mon Feb 22, 2016 9:52 am

Hello and thank you for your support, it's working fine :)

I will give you a beer if you come on holiday in France 8-)

Locked