Hi @taikapanu,
I am posting another query here as I think this is relevant to the topic instead of creating a new post.
As I mentioned, the solution posted above works seamlessly. However, I tried the above solution with Panasonic remote N2QAYZ000002 Dvd play remote and for some reason, it is not accepting either hex or decimal value. There is no IR emitting signal if I run a script. I tried to run “IRsenddemo” code from IRlibrary, it is emitting signal from IR emitter using raw Data. For example for Power command, if i use the following, device turns on without issue.
16:46:35.483 -> unsigned int rawData[99] = {3350,1700, 400,450, 450,1250, 400,450, 350,450, 450,400, 450,400, 400,450, 450,400, 400,450, 400,450, 400,450, 450,400, 350,500, 400,1250, 450,400, 400,450, 400,450, 450,400, 400,450, 400,450, 400,450, 350,1300, 400,450, 400,1300, 400,450, 400,450, 400,1300, 350,1350, 400,1250, 450,400, 400,450, 400,450, 400,1300, 400,450, 450,1250, 350,1300, 450,1250, 450,1250, 400,450, 400,450, 350,1300, 450,400, 450,400, 450,400, 450,400, 450,400, 400,450, 400,1300, 350}
Other thing i notice with Panasonic remote is that it emits different hex and rawdata if press again but it repeats itself. I tried all combination but cannot seem to make it works from HA.
I then tried to hardcode the rawDATA into the ardiuno, it seems to work with 3 rawDATA codes only. if i go beyond 4 to 5, it restarts ardunio everytime i tried to run the script and throwing low memory error during compiling.
// Message received functions from the central node
void receive(const MyMessage & message)
{
// Serial.print("New message: ");
// Serial.println(message.type);
int khz = 38; // 38kHz carrier frequency for the NEC protocol
unsigned int irSignalP[] = {3350,1700, 400,450, 450,1250, 400,450, 350,450, 450,400, 450,400, 400,450, 450,400, 400,450, 400,450, 400,450, 450,400, 350,500, 400,1250, 450,400, 400,450, 400,450, 450,400, 400,450, 400,450, 400,450, 350,1300, 400,450, 400,1300, 400,450, 400,450, 400,1300, 350,1350, 400,1250, 450,400, 400,450, 400,450, 400,1300, 400,450, 450,1250, 350,1300, 450,1250, 450,1250, 400,450, 400,450, 350,1300, 450,400, 450,400, 450,400, 450,400, 450,400, 400,450, 400,1300, 350}; //AnalysIR Batch Export (IRremote) - RAW
unsigned int irSignalvu[] = {3350,1700, 400,450, 400,1250, 450,400, 450,400, 400,450, 400,450, 400,450, 400,450, 400,450, 400,450, 400,400, 450,400, 450,400, 450,1250, 400,450, 400,450, 400,450, 400,450, 400,450, 400,400, 450,400, 450,1250, 450,400, 400,1300, 400,450, 400,450, 400,450, 400,400, 450,400, 450,400, 450,400, 400,450, 400,450, 400,450, 450,400, 400,450, 400,450, 350,1300, 450,400, 450,400, 400,450, 400,450, 400,450, 400,450, 400,450, 400,450, 400,400, 450,1250, 450}; //AnalysIR Batch Export (IRremote) - RAW
//unsigned int irSignalvd[] = {3350,1650, 450,450, 400,1250, 400,500, 350,450, 400,450, 400,450, 400,450, 400,450, 400,450, 400,450, 400,450, 400,400, 400,500, 350,1300, 400,450, 400,450, 400,450, 400,400, 450,400, 450,450, 350,500, 350,1300, 400,450, 400,1300, 400,450, 400,450, 400,450, 400,450, 350,500, 350,450, 400,450, 450,400, 400,1300, 400,450, 400,450, 400,450, 400,400, 400,1350, 350,450, 400,450, 400,1300, 400,450, 400,400, 450,400, 450,450, 350,500, 350,450, 400,1300, 400}; //AnalysIR Batch Export (IRremote) - RAW
unsigned int irSignalvm[] = {3350,1700, 400,450, 400,1250, 450,400, 400,450, 450,400, 400,450, 400,450, 400,450, 400,450, 400,450, 350,500, 400,400, 450,400, 450,1250, 400,450, 400,450, 400,450, 400,450, 400,450, 400,400, 400,450, 450,1250, 450,400, 400,1300, 400,450, 400,450, 400,450, 400,400, 450,400, 400,450, 400,450, 450,400, 400,450, 400,1300, 400,450, 400,450, 400,1250, 450,1250, 450,400, 400,450, 400,450, 400,1300, 350,500, 350,450, 450,1250, 450,400, 450,400, 400,1300, 400}; //AnalysIR Batch Export (IRremote) - RAW
//unsigned int irSignalext[] = {3400,1650, 450,400, 450,1250, 450,400, 450,350, 450,400, 450,400, 450,400, 500,350, 450,400, 450,400, 450,400, 450,400, 450,400, 450,1200, 450,400, 450,400, 450,400, 450,400, 450,400, 450,400, 450,400, 450,1200, 450,400, 450,1250, 450,400, 450,400, 450,400, 450,400, 450,400, 450,400, 450,350, 450,400, 450,400, 450,1250, 450,400, 400,1300, 450,1200, 450,400, 450,400, 450,1250, 450,400, 450,1250, 400,450, 450,1200, 450,1250, 450,1250, 450,400, 450,400, 450}; //AnalysIR Batch Export (IRremote) - RAW
// Message received from the gateway
if (message.type == V_IR_SEND)
{
// Serial.print("# Transmitting IR code for #");
// Read u_long DEC value from received message
// and compare to which manufacturer it belongs to
unsigned long code = message.getULong();
// LG codes
if ( code == 1 )
{
// Serial.print("LG: ");
// Serial.print(code);
// Serial.print(", ");
// Serial.println(code, HEX);
irsend.sendRaw(irSignalP, sizeof(irSignalP) / sizeof(irSignalP[0]), khz); //Note the approach used to automatically calculate the size of the array.
}
else if ( code == 2 )
{
// Serial.print("SAMSUNG: ");
// Serial.print(code);
// Serial.print(", ");
// Serial.println(code, HEX);
// codeType, codeValue, codeLen
irsend.sendRaw(irSignalvm, sizeof(irSignalvm) / sizeof(irSignalvm[0]), khz); //Note the approach used to automatically calculate the size of the array.
}
// else if ( code == 3 )
// {
// // Serial.print("PIONEER: ");
// // Serial.print(code);
// // Serial.print(", ");
// // Serial.println(code, HEX);
//
// // codeType, codeValue, codeLen
// irsend.sendRaw(irSignalvd, sizeof(irSignalvd) / sizeof(irSignalvd[0]), khz); //Note the approach used to automatically calculate the size of the array.
// }
else if ( code == 4 )
{
// Serial.print("PIONEER: ");
// Serial.print(code);
// Serial.print(", ");
// Serial.println(code, HEX);
// codeType, codeValue, codeLen
irsend.sendRaw(irSignalvu, sizeof(irSignalvu) / sizeof(irSignalvu[0]), khz); //Note the approach used to automatically calculate the size of the array.
}
// else if ( code == 5 )
// {
// // Serial.print("PIONEER: ");
// // Serial.print(code);
// // Serial.print(", ");
// // Serial.println(code, HEX);
//
// // codeType, codeValue, codeLen
// irsend.sendRaw(irSignalext, sizeof(irSignalext) / sizeof(irSignalext[0]), khz); //Note the approach used to automatically calculate the size of the array.
// }
}
//
if (message.type == V_LIGHT)
{
if (message.getBool() == 1)
{
// Serial.println("Switch -> HIGH");
send(msgSwitch.set(1));
ir_switch = true;
ir_switch_time = millis();
}
else
{
// Serial.println("Switch -> LOW");
send(msgSwitch.set(0));
ir_switch = false;
}
}
Just checking if anyone have experienced similar issue and how to go about addressing it. appreciate any help in this regard.
Thanks