# Infrared device responds to multiple remotes/“wrong” codes

I have multiple IR devices controlled by my Raspberry Pi:

1. LED strip
2. HDMI input switcher

I used irrecord/mode2 to build a config file and both devices respond properly to the raw codes I found. However, the LED strip also responds to the codes related to the HDMI switcher. Like, the strip will turn off if I send the code corresponding to the "1" button for the HDMI switch, it will turn red for the "2" button and blue for "3". It even responds to the original switcher's remote control, so I don't think there's a problem with the codes I'm sending from the Pi. I also tried messing with the sending frequency for the switch on the Pi by changing it to 36, 38, 40 and 42 KHz. In all cases both the LED strip and HDMI switch will respond. Use anything outside that range and the switch won't respond anymore.

The other way around (using the LED remote on the HDMI switcher) doesn't trigger anything though.

My questions:

1. I always thought IR codes were unique to a particular (type of) receiver, so how come the strip responds to codes it shouldn't really respond to? There doesn't seem to be an overlap in the IR codes either. I'll add an example at the end but I'm not sure if that's actually within the scope of this subsite.
2. Shouldn't every device be sort of "locked" to a certain frequency too? I can understand if something responds to signals sent at 35.9 KHz while it's using 36 KHz itself due to tolerance, but 36k vs 42k seems like a pretty big jump.
3. Is there any way to make the LED receiver ignore things meant for the HDMI switcher?

If it matters in any way: the IR LED I'm using to send signals from the Pi is a 5mm Vishay TSAL7400 940nm, combined with a transistor.

Raw codes:

HDMI button 1

9339     4509      631      547      633      548
632      544      649      537      633      542
632      548      633      548      632     1634
637     1638      634     1652      628     1638
625     1633      636     1637      640     1647
619     1638      632      549      633      548
635     1635      631      548      633      549
641      536      636      544      637      545
639      540      636     1635      636      545
636     1633      649     1628      636     1639
627     1633      638     1636      635     1650
622


LED strip poweroff button

9032    4435     617     511     613     515
612     515     613     519     609     511
614     514     613     515     615     513
614    1616     614    1622     603    1613
618    1608     618     510     617    1614
617    1609     617    1615     618     504
619    1611     618     511     616     507
618     510     620     522     603     511
618     510     630    1596     617     511
617    1609     620    1611     617    1609
616    1614     617    1609     618    1608
623

• IR codes are not unique between devices, and neither is frequencies. If that were the case, there would have to be some controlling agency that issued frequencies (that they would soon run out of). It's possible you found a device that simply has/responds to IR signals that are "fuzzy". – Ron Beyer Oct 30 '19 at 19:16
• IR Codes are in some way unique to a device however it will use a protocol to send/receive these codes. Most simple and frequently used is the NEC protocol. When checking first the received portocol and than the value, it is possible to filter errors. – Codebeat Oct 30 '19 at 19:46
• It would make universal remotes very difficult. – George White Oct 30 '19 at 23:08
• @GeorgeWhite that's sort of what I meant with "unique per type of receiver". I thought that e.g. TVs have some codes that are the same across brands/models, such as volume up/down. Also, don't universal remotes have multiple sets of codes baked in so it may support a wider range of devices? Which is also why sometimes such a remote may not work at all. – Sahbi Nov 1 '19 at 19:15
• @RonBeyer With "locked to a frequency" I didn't quite mean to imply there's a governing agency. I meant it only responds to codes sent using a particular frequency, such as 36 KHz. – Sahbi Nov 1 '19 at 19:16