How accurate is an IR receiver diode and IR remote control?

I've researched about IR receivers and transmitters and decided to use on in our project. Basically, there's an IR receiver attached in our light bulb and then we use an IR remote control to turn it on and off manually. The IR remote control specs said that it can transmit from up to 1 meter and when I actually tried, it doesn't work.

And there are also instances that when I try my IR remote control with the IR receiver diode (I use VS1838b btw), when I press UP for like five times, it gets something liek this in the serial monitor:

UP
other button
UP
UP
other button

'the other button' is sort of like a default button. Something like this:

  case 0xFF629D: Serial.println(" UP"); break;
  .
  .
  .
  .
 
  default: 
    Serial.println(" other button   ");

So, I wanted to know just how accurate IR receivers, transmitters, or diodes are. And are they extremely sensitive to the surroundings?

Thank you!

Some remotes send a repeat code after sending the button code once. So if you hold the button it sends: button code, repeat code, repeat code... until the button is released. The button does not have to be held long to start sending repeats. My favorite NEC remote sends 0xffffffff as a repeat code. Maybe that is what you are seeing. Print the values that you receive to see.

Accurate is not the right word here. Do you mean sensitive? Is there ambient light getting into the IR
receiver? (you mention light bulb, so I guess yes). How many mA are being used by the sender?

MarkT:
Accurate is not the right word here. Do you mean sensitive? Is there ambient light getting into the IR
receiver? (you mention light bulb, so I guess yes). How many mA are being used by the sender?

Yess! There is definitely ambient light getting into the IR receiver. Does that affect the performance of the IR? It's actually attached close to the light bulb. 5mA is being used.

Show us a good schematic of your circuit. Show us a good image of your wiring.

You should be able to get 10-20 feet.

VS1838b

These are not great and very susceptible to interference...probably why they are so cheap.
see: Infrared receiver showdown – TSOP34438 vs VS1838B winner reveale

Consider using a quality Vishay IR receiver like a TSOP34438 or similar. the extra few cents will save you lots of heartaches.

Also make sure you shield the IR receiver as much a possible from the light source & if you are PWMing the light brightness avoid common IR frequencies for the PWM.