A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By Chris Scicluna
#59504 Hi can someone help me I am trying to control my A/c through IR using the esp8266 I have been trying multiple things to make it work but unfortunatley to no avail. I managed to make my tv and other IR systems work but not the A/C. All other devices use a NEC protocol and the air conditioner is showing it has a Panasonic Protocol.

This said when I used the sendPanasonic specifying the Panasonic Address and the Hex for the IR it did not work either. So I resorted to use raw data (sendRaw) From the Ir Rec.

The data read dump I got when I switched off the A/C (Off Command) was the following:

Code: Select allEncoding  : PANASONIC
Code      : C4D3:64800004 (48 bits)
Timing[99]:
     +3850, -1450     + 600, -1250     + 600, -1250     + 600, - 500
     + 550, - 550     + 600, - 500     + 600, -1250     + 600, - 500
     + 550, - 550     + 600, -1250     + 600, -1250     + 600, - 500
     + 550, -1300     + 600, - 500     + 550, - 500     + 650, -1250
     + 550, -1300     + 600, - 500     + 600, -1250     + 600, -1250
     + 600, - 500     + 550, - 550     + 600, -1250     + 550, - 550
     + 550, - 550     + 600, -1250     + 550, - 550     + 550, - 550
     + 600, - 500     + 550, - 550     + 550, - 550     + 600, - 500
     + 600, - 500     + 600, - 500     + 600, - 500     + 550, - 550
     + 550, - 550     + 600, - 500     + 600, - 500     + 600, - 500
     + 600, - 500     + 550, - 550     + 600, - 500     + 600, - 500
     + 550, - 550     + 550, - 550     + 600, -1250     + 600, - 500
     + 600, - 500     + 600
unsigned int  rawData[99] = {3850,1450, 600,1250, 600,1250, 600,500, 550,550, 600,500, 600,1250, 600,500, 550,550, 600,1250, 600,1250, 600,500, 550,1300, 600,500, 550,500, 650,1250, 550,1300, 600,500, 600,1250, 600,1250, 600,500, 550,550, 600,1250, 550,550, 550,550, 600,1250, 550,550, 550,550, 600,500, 550,550, 550,550, 600,500, 600,500, 600,500, 600,500, 550,550, 550,550, 600,500, 600,500, 600,500, 600,500, 550,550, 600,500, 600,500, 550,550, 550,550, 600,1250, 600,500, 600,500, 600};  // PANASONIC C4D3:64800004
unsigned int  addr = 0xC4D3;
unsigned int  data = 0x64800004;



I am using this code:

Code: Select all#include <IRremoteESP8266.h>

IRsend irsend(0); //an IR led is connected to GPIO pin 0
unsigned int  rawData[99] = {3850,1450, 550,1300, 550,1300, 550,550, 550,550, 550,550, 550,1300, 550,550, 550,550, 550,1300, 550,1300, 550,550, 550,1300, 550,550, 550,550, 550,1300, 550,1300, 550,550, 550,1300, 550,1300, 550,550, 550,550, 550,1300, 550,550, 550,550, 550,1300, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,500, 600,500, 600,500, 550,550, 550,1300, 550,550, 550,550, 550};  // PANASONIC C4D3:64800004


void setup()
{
  irsend.begin();
  Serial.begin(9600);
}
t
void loop() {
  Serial.println("Raw");
  irsend.sendRaw(rawData, 99,38);
  delay(2000);
}


Can someone pinpoint me in the right direction, would be great if I can put a finger on how to make this work!

Thanks in advance
Chris