IR remote control - reacts to others remotes

I have been constructing remote control for my old stereo for some time.
Most problems I solved with google search. I can't deal with the last one.
My arduino reacts for all three remote controlers in my room. It would not be surprising if the remotes were sending the same code, but only part of code is the same:

my remote - button 'power' send code FF807F,
remote cd Kenwood - button '1' send code 6D92807F,
smart tv LG - button 'program -' send code 20DF807F.

all three use NEC protocol.

Is there any solution for that?

Different ir library? I use this one GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols

You will have to post your code. Just in case you have not read it yet, please read How to use this forum - please read. - Installation & Troubleshooting - Arduino Forum, specifically point #7 about posting code.

What means "react"? Of course all codes are received, but the reaction to each individual code is under software control. You can choose a different protocol for your stereo remote control.

Sounds like a truncation caused by using (u)int16_t instead of a proper uint32_t.

I guess the variable used for the switch (hasTheWrongType) {, but without code, who knows?

Whandall:
Sounds like a truncation caused by using (u)int16_t instead of a proper uint32_t.

I guess the variable used for the switch (hasTheWrongType) {, but without code, who knows?

You have probably right. I try use another remote (SONY protocol) just like how DrDiettrich advised, but most of button have "duplicate case value". So i guess the code doesn't take all of the remote code into account, but onlu a part.

Here is my code (some, in my opinion, not important parts had to be removed, they did not fit in post):

#include <IRremote.h>
 
int RECV_PIN = 7;
int button = 2;
int power = 3; //itOn[1]
int volup = 4;
int voldown = 5;
int mute = 6; //itOn[2]
int led2 = 0;
int tt_play = 8;
int tt_cuton = 9;
int tt_cutoff = 10;
int tt_motor = 11; 
int bt_play = 12; 
int bt_next = 14; //A0
int bt_back = 15; //A1
int statusLed = 13;
int timerSetA = 16; //A2, timer 15min      -|
int timerSetB = 17; //A3, timer 30min       |- 60 min
int timerSetC = 18; //A4, timer 45min     -|
int timerReset = 19; //A5, reset timer after change 
int timer = 0;
int itsON[] = {0, 0, 0, 0, 0};
boolean TT_status = 0;
int oldButtonState = LOW;
int localon_off = LOW;
#define code1 16744575 // code power
#define code2 16736415 // code vol+
#define code3 16769055 // code vol-
#define code4 16732335 // code mute
#define code5 16730295 // code timer+
#define code6 16742535 // code timer-
#define code7 16752735 // code led
#define code8 16726215 // code tt play
#define code9 16724175 // code tt cut on
#define code10 16775175 // code tt cut off
#define code11 16728255 // code bt play
#define code12 16758855 // code bt next
#define code13 16771095 // code bt back


 
IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
  Serial.begin(9600);   
  irrecv.enableIRIn(); 
  pinMode(button, INPUT);
  pinMode(power, OUTPUT);
  pinMode(volup, OUTPUT);
  pinMode(voldown, OUTPUT);
  pinMode(mute, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(tt_play, OUTPUT);
  pinMode(tt_cuton, OUTPUT);
  pinMode(tt_cutoff, OUTPUT);
  pinMode(statusLed, OUTPUT);
  pinMode(bt_play, OUTPUT);
  pinMode(bt_next, OUTPUT);
  pinMode(bt_back, OUTPUT);
  pinMode(tt_motor, INPUT);
  pinMode(timerSetA, OUTPUT);
  pinMode(timerSetB, OUTPUT);
  pinMode(timerSetC, OUTPUT);
  pinMode(timerReset, OUTPUT);
}
 
void loop() {
//status gramofon
TT_status = digitalRead(tt_motor);


  
  if (irrecv.decode(&results)) {
    unsigned int value = results.value;
    switch(value) {



//remote command:
   
      
//system on/off

       case code1:
            break; 

//volume up
  
       case code2:
          break; 

//volume down
  
       case code3:
          break; 

//mute
                                                    
  case code4:
       break; 

//timer +
                                                    
  case code5:
       break;  

//timer -
                                                    
  case code6:
       break;  

//led
                                                    
  case code7:      
       break;  

//TT_play
  
       case code8:   
               
       break;

//TT_cutOn
  
       case code9:    
               
       break;

//TT_cutOff
  
       case code10:
       break;

//BT_play
  
       case code11:    
               
       break;

//BT_next
  
       case code12:
       break;

//BT_back
  
       case code13:   
               
       break;

      
    }
    irrecv.resume(); 
  }

 
        

}
    unsigned int value = results.value;

This statement does the truncation. Why do you copy the value anyway?

You could use

  if (irrecv.decode(&results)) {
     switch(results.value) {

DrDiettrich:
What means "react"? Of course all codes are received, but the reaction to each individual code is under software control. You can choose a different protocol for your stereo remote control.

I'm sorry, did not answer.

React means that all three button from this three remote turn on and turn off my stereo. It's the same with other functions