Simple IR Diode + Hass.io RPI

Hi,
I’ve got an RPI 3 setup with Hass.io, and I would like to add an IR diode coming from my RPI near a device which I want to control.

  1. Do I need another ESP8266 device or can I connect the IR diode to the RPI directly? If not, then how? Which pins on the RPI3?
  2. What software do I need to run or Hass.io to send codes with automation/MQTT?
    Thank you!