Communication - IR Transmit

.

Plugin details

Type: Communication

Name: IR Transmit

Status: IR

GitHub: P035_IRTX.ino

Maintainer: .

Used libraries: .

Introduction

This plugin can be used to send out IR signals, usually at 38 kHz, to IR-controlled devices like ventilators, TVs, airconditioners etc.

Wiring

The IR led can be connected directly to an ESP GPIO pin. The default is that the Anode of the LED is connected to the GPIO pin, and the Cathode to GND, but using the Inverted output configuration setting allows to connect the Anode to VCC, and the Cathode to the GPIO pin.

Device Configuration

../_images/P035_DeviceConfiguration.png
  • Name: Required by ESPEasy, must be unique among the list of available devices/tasks.

  • Enabled: The device can be disabled or enabled. When not enabled the device should not use any resources.

Actuator

  • GPIO -> LED: Select the GPIO pin the LED is connected to.

Device Settings

  • Inverted output: With this setting enabled, the signal will be sent out inverted (On and Off swapped), so the LED can be connected to VCC and the GPIO pin, instead of between the GPIO pin and GND. This allows for a somewhat larger current through the LED.

Commands available

Command

Extra information

irsend,<protocol>,<data>[,<bits>[,<repeats>]]
Arguments:
<protocol>: Required. The IR protocol to use for sending the data.
<data>: Required. The data to send out.
<bits>: Optional. The number of bits of the protocol used. When using 0 (or not providing a value), the protocol-default will be used.
<repeats>: Optional. How often should the data be transmitted. Many manual IR remotes repeat the same signal up to 3 times, and each protocol has a default setting for this parameter, that will be used when not specified.
Send data out, using the protocol specified. The protocol and required data for a specific command can be obtained from f.i. a manual IR remote by using a TSOP4838 IR receiver and plugin P016: Communication - IR Receive (TSOP4838), retrieving the relevant data from the logs.
Supported protocols are available from the Protocols page at IRremoteESP8266 (external link)
irsendac,<{JSON-formatted-AC-command}>
Argument:
<{JSON-formatted-AC-command}>: Required. A complete JSON string (single line) to control an airconditioner.
Send a complete AC control command. These devices often require more complex commands and arguments, that can be 'carefully crafted' and sent using this command.
Documentation on how to craft these JSON commands can be found in this IRremoteESP8266 F.A.Q. answer (external link)
This JSON string does not have to be quoted if it contains spaces or commas, the entire text supplied is used as-is. It has to be valid JSON to be successfully processed, though.
This command is only available if the Extended AC support is included in the build. (This command is shown on the Device Configuration page when included)

Change log

Changed in version 2.0:

added 2023-07-21 Inverted output option introduced.

added Major overhaul for 2.0 release.

Added in version 1.0:

added Initial release version.