@GuilhermePagano I’ve moved this to a new topic, because it’s about a different subject.
There are a few projects such as this one that you should look at…
You need an IR receiver (photodiode) to ‘learn’ the codes for an unknown remote control protocol, and an IR photodiode of the correct wavelength to play these back.
Most projects use the IRremoteESP8266.h library to capture and play back the IR commands.