[esp32_rmt] Updates for IDF 5+ changes (#4480)

Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Jonathan Swoboda 2024-12-18 22:10:53 -05:00 committed by GitHub
parent 2c069d1a5c
commit 86550de008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 246 additions and 126 deletions

View File

@ -23,17 +23,9 @@ Configuration variables
- **pin** (**Required**, :ref:`config-pin`): The pin for the data line of the light.
- **num_leds** (**Required**, int): The number of LEDs in the strip.
- **rmt_channel** (**Required**, int): The RMT channel to use. If using multiple strips, you need to use different channels.
- **chipset** (**Required**, enum): The name of the chipset used; determines signal timing. Not required if
:ref:`specifying the timings manually<esp32-rmt-led-strip-manual_timings>`.
.. csv-table::
:header: "ESP32 Variant", "Channels"
"ESP32", "0, 1, 2, 3, 4, 5, 6, 7"
"ESP32-S2", "0, 1, 2, 3"
"ESP32-S3", "0, 1, 2, 3"
"ESP32-C3", "0, 1"
- **chipset** (**Required**, enum): The chipset to apply known timings from. Not used if specifying the timings manually, see below.
- ``WS2811``
- ``WS2812``
- ``SK6812``
@ -41,6 +33,7 @@ Configuration variables
- ``SM16703``
- **rgb_order** (**Required**, string): The RGB order of the strip.
- ``RGB``
- ``RBG``
- ``GRB``
@ -50,13 +43,43 @@ Configuration variables
- **is_rgbw** (*Optional*, boolean): Set to ``true`` if the strip is RGBW. Defaults to ``false``.
- **is_wrgb** (*Optional*, boolean): Set to ``true`` if the strip is WRGB. Defaults to ``false``.
- **max_refresh_rate** (*Optional*, :ref:`config-time`):
A time interval used to limit the number of commands a light can handle per second. For example
16ms will limit the light to a refresh rate of about 60Hz. Defaults to sending commands as quickly as
changes are made to the lights.
- **max_refresh_rate** (*Optional*, :ref:`config-time`): A time interval used to limit the number of commands a light
can handle per second. For example, ``16ms`` will limit the light to a refresh rate of about 60Hz. Defaults to
sending commands as quickly as changes are made to the lights.
IDF configuration variables:
****************************
- **rmt_symbols** (*Optional*, int): The amount of RMT memory allocated to this component. Memory is shared by all
receivers and transmitters. On variants other than ``ESP32`` and ``ESP32-S2`` only half the symbol memory is
available to transmitters. Each symbol is 32 bits and contains two values.
.. csv-table::
:header: "ESP32 Variant", "Memory Size", "Block Size"
"ESP32", "512 symbols", "64 symbols"
"ESP32-S2", "256 symbols", "64 symbols"
"ESP32-S3", "384 symbols", "48 symbols"
"ESP32-C3", "192 symbols", "48 symbols"
"ESP32-C6", "192 symbols", "48 symbols"
"ESP32-H2", "192 symbols", "48 symbols"
Arduino configuration variables:
********************************
- **rmt_channel** (**Required**, int): The RMT channel to use. Each LED strip needs to use a unique channel.
.. csv-table::
:header: "ESP32 Variant", "Channels"
"ESP32", "0, 1, 2, 3, 4, 5, 6, 7"
"ESP32-S2", "0, 1, 2, 3"
"ESP32-S3", "0, 1, 2, 3"
"ESP32-C3", "0, 1"
- All other options from :ref:`Light <config-light>`.
.. _esp32-rmt-led-strip-manual_timings:
Manual Timings
**************

View File

@ -6,15 +6,16 @@ Remote Receiver
:image: remote.svg
:keywords: RF, infrared
The ``remote_receiver`` component lets you receive and decode any remote signal, these can
for example be infrared remotes or 433MHz signals.
The ``remote_receiver`` component lets you receive and decode various common remote control signals, such as infrared
or 433 MHz radio frequency (RF) signals.
The component is split up into two parts: the remote receiver hub which
handles setting the pin and some other settings, and individual
:ref:`remote receiver binary sensors <remote-receiver-binary-sensor>`
which will trigger when they hear their own configured signal.
The component is split into two parts:
**See** :ref:`remote-setting-up-infrared` **and** :ref:`remote-setting-up-rf` **for set up guides.**
- The remote receiver "hub", which defines the pin and a few additional settings, and...
- Individual :ref:`remote receiver binary sensors <remote-receiver-binary-sensor>` which will activate when their
respective signal is received.
**See** :ref:`remote-setting-up-infrared` **and** :ref:`remote-setting-up-rf` **for details.**
.. code-block:: yaml
@ -23,7 +24,7 @@ which will trigger when they hear their own configured signal.
pin: GPIOXX
dump: all
Multiple remote receivers can be configured as a list of dict definitions in remote_receiver.
Multiple remote receivers can be configured as a list of dict definitions within ``remote_receiver``.
Configuration variables:
------------------------
@ -32,7 +33,8 @@ Configuration variables:
- **dump** (*Optional*, list): Decode and dump these remote codes in the logs (at log.level=DEBUG).
Set to ``all`` to dump all available codecs:
- **abbwelcome**: Decode and dump ABB-Welcome codes. Messages are sent via copper wires. See :ref:`transmitter description <remote_transmitter-transmit_abbwelcome>` for more details.
- **abbwelcome**: Decode and dump ABB-Welcome codes. Messages are sent via copper wires. See
:ref:`transmitter description <remote_transmitter-transmit_abbwelcome>` for more details.
- **aeha**: Decode and dump AEHA infrared codes.
- **byronsx**: Decode and dump Byron SX doorbell RF codes.
- **canalsat**: Decode and dump CanalSat infrared codes.
@ -63,17 +65,52 @@ Configuration variables:
- **toshiba_ac**: Decode and dump Toshiba AC infrared codes.
- **mirage**: Decode and dump Mirage infrared codes.
- **tolerance** (*Optional*, int, :ref:`config-time` or mapping): The percentage or time that the remote signal lengths can
deviate in the decoding process. Defaults to ``25%``.
- **tolerance** (*Optional*, int, :ref:`config-time` or mapping): The percentage or time that the remote signal lengths
can deviate in the decoding process. Defaults to ``25%``.
- **type** (**Required**, enum): Set the type of the tolerance. Can be ``percentage`` or ``time``.
- **value** (**Required**, int or :ref:`config-time`): The percentage or time value. Allowed values are in range ``0`` to
``100%`` or ``0`` to ``4294967295us``.
- **value** (**Required**, int or :ref:`config-time`): The percentage or time value. Allowed values are in range ``0``
to ``100%`` or ``0`` to ``4294967295us``.
- **buffer_size** (*Optional*, int): The size of the internal buffer for storing the remote codes. Defaults to ``10kB``
on the ESP32 and ``1kB`` on the ESP8266.
- **rmt_channel** (*Optional*, int): The RMT channel to use. Only on **esp32**.
The following ESP32 variants have these channels available:
- **filter** (*Optional*, :ref:`config-time`): Filter any pulses that are shorter than this. Useful for removing
glitches from noisy signals. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``50us``.
- **idle** (*Optional*, :ref:`config-time`): The amount of time that a signal should remain stable/unchanged for it to
be considered complete. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``10ms``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Useful when multiple
receivers are configured on a single device.
ESP32 IDF configuration variables:
**********************************
- **rmt_symbols** (*Optional*, int): If ``use_dma`` is enabled, ``rmt_symbols`` represents the size of the driver's
internal DMA buffer. If DMA is not enabled, ``rmt_symbols`` determines the amount of RMT memory allocated to this
component. Memory is shared by all receivers and transmitters. On variants other than ``ESP32`` and ``ESP32-S2``,
only half of the symbol memory is available to receivers. Each symbol is 32 bits and contains two values.
.. csv-table::
:header: "ESP32 Variant", "Memory Size", "Block Size"
"ESP32", "512 symbols", "64 symbols"
"ESP32-S2", "256 symbols", "64 symbols"
"ESP32-S3", "384 symbols", "48 symbols"
"ESP32-C3", "192 symbols", "48 symbols"
"ESP32-C6", "192 symbols", "48 symbols"
"ESP32-H2", "192 symbols", "48 symbols"
- **receive_symbols** (*Optional*, int): Maximum receive length in symbols. On some variants the maximum receive is
limited to ``rmt_symbols``.
- **filter_symbols** (*Optional*, int): Filter out any data received with a length in symbols less than
``filter_symbols``. Useful for filtering out short bursts of noise.
- **clock_resolution** (*Optional*, int): The clock resolution used by the RMT peripheral in hz. Defaults to
``1000000``.
- **use_dma** (*Optional*, boolean): Enable DMA on variants that support it.
ESP32 Arduino configuration variables:
**************************************
- **rmt_channel** (*Optional*, int): The RMT channel to use. The following ESP32 variants have these channels available:
.. csv-table::
:header: "ESP32 Variant", "Channels"
@ -83,22 +120,16 @@ Configuration variables:
"ESP32-S3", "4, 5, 6, 7"
"ESP32-C3", "2, 3"
- **memory_blocks** (*Optional*, int): The number of RMT memory blocks used. Only used on ESP32 platform. The maximum
- **memory_blocks** (*Optional*, int): The number of RMT memory blocks used. The maximum
number of blocks shared by all receivers and transmitters depends on the ESP32 variant. Defaults to ``3``.
- **filter** (*Optional*, :ref:`config-time`): Filter any pulses that are shorter than this. Useful for removing
glitches from noisy signals. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``50us``.
- **idle** (*Optional*, :ref:`config-time`): The amount of time that a signal should remain stable (i.e. not
change) for it to be considered complete. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``10ms``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Use this if you have
multiple remote receivers.
- **clock_divider** (*Optional*, int): The clock divider used by the RMT peripheral. A clock divider of ``80`` leads to
a resolution of 1 µs per tick, ``160`` leads to 2 µs. Allowed values are in range ``1`` to ``255``. Only used on ESP32
platform. Defaults to ``80``.
a resolution of 1 µs per tick, ``160`` leads to 2 µs. Allowed values are in range ``1`` to ``255``. Defaults to ``80``
.. note::
The dumped **raw** code is sequence of pulse widths (durations in microseconds), positive for on-pulses (mark)
and negative for off-pulses (space). Usually you can to copy this directly to the configuration or automation to be used later.
and negative for off-pulses (space). Usually you can to copy this directly to the configuration or automation
to be used later.
Automations:
@ -218,8 +249,7 @@ Binary Sensor
The ``remote_receiver`` binary sensor lets you track when a button on a remote control is pressed.
Each time the pre-defined signal is received, the binary sensor will briefly go ON and
then immediately OFF.
Each time the pre-defined signal is received, the binary sensor will briefly go ON and then immediately OFF.
.. code-block:: yaml
@ -234,29 +264,32 @@ then immediately OFF.
Configuration variables:
************************
- **receiver_id** (*Optional*, :ref:`config-id`): The remote receiver to receive the
remote code with. Required if multiple receivers configured.
- **receiver_id** (*Optional*, :ref:`config-id`): The remote receiver to receive the remote code with. Required if
multiple receivers configured.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Remote code selection (exactly one of these has to be included):
- **abbwelcome**: Trigger on a decoded ABB-Welcome code with the given data, see the :ref:`transmitter description <remote_transmitter-transmit_abbwelcome>` for more info.
- **abbwelcome**: Trigger on a decoded ABB-Welcome code with the given data, see the
:ref:`transmitter description <remote_transmitter-transmit_abbwelcome>` for more info.
- **source_address** (**Required**, int): The source address to trigger on.
- **destination_address** (**Required**, int): The destination address to trigger on.
- **three_byte_address** (**Optional**, boolean): The length of the source and destination address. ``false`` means two bytes
and ``true`` means three bytes. Defaults to ``false``.
- **three_byte_address** (**Optional**, boolean): The length of the source and destination address. ``false`` means
two bytes and ``true`` means three bytes. Defaults to ``false``.
- **retransmission** (**Optional**, boolean): ``true`` if the message was re-transmitted. Defaults to ``false``.
- **message_type** (**Required**, int): The message type to trigger on.
- **message_id** (**Optional**, int): The random message ID to trigger on, see dumper output for more info. Defaults to any ID.
- **data** (**Optional**, 0-7 bytes list): The code to listen for. Usually you only need to copy this directly from the
dumper output. Defaults to ``[]``
- **message_id** (**Optional**, int): The random message ID to trigger on, see dumper output for more info. Defaults
to any ID.
- **data** (**Optional**, 0-7 bytes list): The code to listen for. Usually you only need to copy this directly from
the dumper output. Defaults to ``[]``
- **aeha**: Trigger on a decoded AEHA remote code with the given data.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
- **data** (**Required**, 3-35 bytes list): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_aeha>`
for more info. Usually you only need to copy this directly from the dumper output.
- **data** (**Required**, 3-35 bytes list): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_aeha>` for more info. Usually you only need to copy this
directly from the dumper output.
- **byronsx**: Trigger on a decoded Byron SX Doorbell RF remote code with the given data.
@ -266,17 +299,20 @@ Remote code selection (exactly one of these has to be included):
- **canalsat**: Trigger on a decoded CanalSat remote code with the given data.
- **device** (**Required**, int): The device to trigger on, see dumper output for more info.
- **address** (*Optional*, int): The address (or subdevice) to trigger on, see dumper output for more info. Defaults to ``0``
- **address** (*Optional*, int): The address (or subdevice) to trigger on, see dumper output for more info.
Defaults to ``0``.
- **command** (**Required**, int): The command to listen for.
- **canalsatld**: Trigger on a decoded CanalSatLD remote code with the given data.
- **device** (**Required**, int): The device to trigger on, see dumper output for more info.
- **address** (*Optional*, int): The address (or subdevice) to trigger on, see dumper output for more info. Defaults to ``0``
- **address** (*Optional*, int): The address (or subdevice) to trigger on, see dumper output for more info.
Defaults to ``0``.
- **command** (**Required**, int): The command to listen for.
- **coolix**: Trigger on a decoded Coolix remote code with the given data. It is possible to directly specify a 24-bit code,
it will be checked for a match to at least one of the two received packets. The main configuration scheme is below.
- **coolix**: Trigger on a decoded Coolix remote code with the given data. It is possible to directly specify a 24-bit
code, it will be checked for a match to at least one of the two received packets. The main configuration scheme is
below.
- **first** (**Required**, uint32_t): The first 24-bit Coolix code to trigger on, see dumper output for more info.
- **second** (*Optional*, uint32_t): The second 24-bit Coolix code to trigger on, see dumper output for more info.
@ -312,8 +348,9 @@ Remote code selection (exactly one of these has to be included):
- **haier**: Trigger on a Haier remote code with the given code.
- **code** (**Required**, 13-bytes list): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_haier>`
for more info. Usually you only need to copy this directly from the dumper output.
- **code** (**Required**, 13-bytes list): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_haier>` for more info. Usually you only need to copy
this directly from the dumper output.
- **lg**: Trigger on a decoded LG remote code with the given data.
@ -323,12 +360,14 @@ Remote code selection (exactly one of these has to be included):
- **magiquest**: Trigger on a decoded MagiQuest wand remote code with the given wand ID.
- **wand_id** (**Required**, int): The MagiQuest wand ID to trigger on, see dumper output for more info.
- **magnitude** (*Optional*, int): The magnitude of swishes and swirls of the wand. If omitted, will match on any activation of the wand.
- **magnitude** (*Optional*, int): The magnitude of swishes and swirls of the wand. If omitted, will match on any
activation of the wand.
- **midea**: Trigger on a Midea remote code with the given code.
- **code** (**Required**, 5-bytes list): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_midea>`
for more info. Usually you only need to copy first 5 bytes directly from the dumper output.
- **code** (**Required**, 5-bytes list): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_midea>` for more info. Usually you only need to copy
first 5 bytes directly from the dumper output.
- **nec**: Trigger on a decoded NEC remote code with the given data.
@ -354,15 +393,17 @@ Remote code selection (exactly one of these has to be included):
- **pronto**: Trigger on a Pronto remote code with the given code.
- **data** (**Required**, string): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_raw>`
for more info. Usually you only need to copy this directly from the dumper output.
- **data** (**Required**, string): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_raw>` for more info. Usually you only need to copy this
directly from the dumper output.
- **delta** (**Optional**, integer): This parameter allows you to manually specify the allowed difference
between what Pronto code is specified, and what IR signal has been sent by the remote control.
- **raw**: Trigger on a raw remote code with the given code.
- **code** (**Required**, list): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_raw>`
for more info. Usually you only need to copy this directly from the dumper output.
- **code** (**Required**, list): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_raw>` for more info. Usually you only need to copy this
directly from the dumper output.
- **rc5**: Trigger on a decoded RC5 remote code with the given data.
@ -378,21 +419,24 @@ Remote code selection (exactly one of these has to be included):
- **code** (**Required**, string): The remote code to listen for, copy this from the dumper output. To ignore a bit
in the received data, use ``x`` at that place in the **code**.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for
more info.
- **rc_switch_type_a**: Trigger on a decoded RC Switch Type A remote code with the given data.
- **group** (**Required**, string): The group, binary string.
- **device** (**Required**, string): The device in the group, binary string.
- **state** (**Required**, boolean): The on/off state to trigger on.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for
more info.
- **rc_switch_type_b**: Trigger on a decoded RC Switch Type B remote code with the given data.
- **address** (**Required**, int): The address, int from 1 to 4.
- **channel** (**Required**, int): The channel, int from 1 to 4.
- **state** (**Required**, boolean): The on/off state to trigger on.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for
more info.
- **rc_switch_type_c**: Trigger on a decoded RC Switch Type C remote code with the given data.
@ -400,14 +444,16 @@ Remote code selection (exactly one of these has to be included):
- **group** (**Required**, int): The group. Range is 1 to 4.
- **device** (**Required**, int): The device. Range is 1 to 4.
- **state** (**Required**, boolean): The on/off state to trigger on.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for
more info.
- **rc_switch_type_d**: Trigger on a decoded RC Switch Type D remote code with the given data.
- **group** (**Required**, int): The group. Range is 1 to 4.
- **device** (**Required**, int): The device. Range is 1 to 3.
- **state** (**Required**, boolean): The on/off state to trigger on.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for
more info.
- **roomba**: Trigger on a decoded Roomba remote code with the given data.
@ -431,12 +477,14 @@ Remote code selection (exactly one of these has to be included):
- **toshiba_ac**: Trigger on a decoded Toshiba AC remote code with the given data.
- **rc_code_1** (**Required**, int): The remote control code to trigger on, see dumper output for more details.
- **rc_code_2** (*Optional*, int): The second part of the remote control code to trigger on, see dumper output for more details.
- **rc_code_2** (*Optional*, int): The second part of the remote control code to trigger on, see dumper output for
more details.
- **mirage**: Trigger on a Mirage remote code with the given code.
- **code** (**Required**, 14-bytes list): The code to listen for, see :ref:`transmitter description <remote_transmitter-transmit_mirage>`
for more info. Usually you only need to copy this directly from the dumper output.
- **code** (**Required**, 14-bytes list): The code to listen for, see
:ref:`transmitter description <remote_transmitter-transmit_mirage>` for more info. Usually you only need to copy
this directly from the dumper output.
.. note::
@ -446,14 +494,15 @@ Remote code selection (exactly one of these has to be included):
.. note::
**NEC codes**: In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC standard.
Therefore, if the configuration file has come from an earlier version of ESPhome, it is necessary to reverse the order of the address
and command bits when moving to 2021.12 or above. For example, address: 0x84ED, command: 0x13EC becomes 0xB721 and 0x37C8 respectively.
**NEC codes**: In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with
the NEC standard. Therefore, if the configuration file has come from an earlier version of ESPhome, it is necessary
to reverse the order of the address and command bits when moving to 2021.12 or above. For example,
``address: 0x84ED``, ``command: 0x13EC`` becomes ``0xB721`` and ``0x37C8``, respectively.
.. note::
To capture the codes more effectively with directly connected receiver like tsop38238 you can try to use ``INPUT_PULLUP``:
Some receivers, such as the TSOP38238, may require the use of a pull-up resistor. You can enable this as follows:
.. code-block:: yaml

View File

@ -6,19 +6,20 @@ Remote Transmitter
:image: remote.svg
:keywords: Infrared, IR, RF, Remote, TX, 433, Blaster
The ``remote_transmitter`` component lets you send digital packets to control
devices in your home. For example this includes infrared data or 433MHz RF signals.
The ``remote_transmitter`` component lets you send various common remote control signals, such as infrared
or 433 MHz radio frequency (RF) signals.
First, you need to setup a global hub that specifies which pin your remote
sender is connected to. Then you can use the available actions to send encoded
remote signals.
The component is split into two parts:
**See** :ref:`remote-setting-up-infrared` **and** :ref:`remote-setting-up-rf` **for set up guides.**
- The remote transmitter "hub", which defines the pin and a few additional settings, and...
- Individual :ref:`actions<config-action>` to send encoded remote signals.
**See** :ref:`remote-setting-up-infrared` **and** :ref:`remote-setting-up-rf` **for details.**
.. note::
This component is more accurate on the ESP32, since that chipset has a dedicated
peripheral for sending exact signal sequences.
This component performs best with an ESP32 or variant; they have a dedicated hardware peripheral which ensures
accurate signal timing.
.. code-block:: yaml
@ -30,12 +31,39 @@ remote signals.
Configuration variables:
------------------------
- **pin** (**Required**, :ref:`config-pin`): The pin to transmit the remote signal on.
- **carrier_duty_percent** (*Optional*, int): How much of the time the remote is on. For example, infrared
protocols modulate the signal using a carrier signal. Set this to ``50%`` if you're working with IR LEDs and to
``100%`` if working with other things like 433MHz transmitters.
- **rmt_channel** (*Optional*, int): The RMT channel to use. Only on **esp32**.
The following ESP32 variants have these channels available:
- **pin** (**Required**, :ref:`config-pin`): The pin to transmit the remote signal on.
- **carrier_duty_percent** (*Optional*, int): How much of the time the remote is on. For example, infrared protocols
modulate the signal using a carrier signal. Set this to ``50%`` if you're using IR LEDs and ``100%`` for RF
applications like 433 MHz transmitters.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Useful when multiple
transmitters are connected to a single device.
ESP32 IDF configuration variables:
**********************************
- **rmt_symbols** (*Optional*, int): If ``use_dma`` is enabled, ``rmt_symbols`` represents the size of the driver's
internal DMA buffer. If DMA is not enabled, ``rmt_symbols`` determines the amount of RMT memory allocated to this
component. Memory is shared by all receivers and transmitters. On variants other than ``ESP32`` and ``ESP32-S2``,
only half of the symbol memory is available to transmitters. Each symbol is 32 bits and contains two values.
.. csv-table::
:header: "ESP32 Variant", "Memory Size", "Block Size"
"ESP32", "512 symbols", "64 symbols"
"ESP32-S2", "256 symbols", "64 symbols"
"ESP32-S3", "384 symbols", "48 symbols"
"ESP32-C3", "192 symbols", "48 symbols"
"ESP32-C6", "192 symbols", "48 symbols"
"ESP32-H2", "192 symbols", "48 symbols"
- **clock_resolution** (*Optional*, int): The clock resolution used by the RMT peripheral in hz. Defaults to ``1000000``.
- **one_wire** (*Optional*, boolean): Allows the GPIO to be used as both a transmitter and receiver.
- **use_dma** (*Optional*, boolean): Enable DMA on variants that support it.
ESP32 Arduino configuration variables:
**************************************
- **rmt_channel** (*Optional*, int): The RMT channel to use. The following ESP32 variants have these channels available:
.. csv-table::
:header: "ESP32 Variant", "Channels"
@ -45,8 +73,8 @@ Configuration variables:
"ESP32-S3", "0, 1, 2, 3"
"ESP32-C3", "0, 1"
- **id** (*Optional*, :ref:`config-id`): Manually specify
the ID used for code generation. Use this if you have multiple remote transmitters.
- **clock_divider** (*Optional*, int): The clock divider used by the RMT peripheral. A clock divider of ``80`` leads to
a resolution of 1 µs per tick, ``160`` leads to 2 µs. Allowed values are in range ``1`` to ``255``. Defaults to ``80``.
Automations:
------------
@ -73,9 +101,8 @@ Automations:
Remote Transmitter Actions
--------------------------
Remote transmitters support a number of :ref:`actions <config-action>` that can be used
to send remote codes. All supported protocols are listed below. All actions additionally
have these configuration variables:
Remote transmitters support a number of :ref:`actions <config-action>` that can be used to send remote codes. All
supported protocols are listed below. All actions have these additional configuration variables:
.. code-block::yaml
@ -88,17 +115,18 @@ have these configuration variables:
Configuration variables:
- **repeat** (*Optional*): Optionally set the code to be repeated a number of times.
Defaults to sending the code only once.
- **repeat** (*Optional*): Defines the number of times the code is repeated when transmitted. By default, codes are
sent only once.
- **times** (:ref:`templatable <config-templatable>`, int): The number of times to repeat the code.
- **wait_time** (:ref:`templatable <config-templatable>`, :ref:`config-time`): The time to wait between repeats (in µs as a result of a :ref:`lambda <config-lambda>`).
- **wait_time** (:ref:`templatable <config-templatable>`, :ref:`config-time`): The time to wait between repeats (in
µs as a result of a :ref:`lambda <config-lambda>`).
- **transmitter_id** (*Optional*, :ref:`config-id`): The remote transmitter to send the
remote code with. Defaults to the first one defined in the configuration.
- **transmitter_id** (*Optional*, :ref:`config-id`): The remote transmitter to send the remote code with. Defaults to
the first one defined in the configuration.
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in
Home Assistant, you'll want to set the **times** to 10 and the **wait_time** to 0s.
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in Home Assistant, you'll want
to set the **times** to 10 and the **wait_time** to 0s.
.. _remote_transmitter-transmit_abbwelcome:
@ -171,7 +199,8 @@ Configuration variables:
with for infrared signals. Defaults to ``38000Hz``.
- All other options from :ref:`remote_transmitter-transmit_action`.
AEHA refers to the Association for Electric Home Appliances in Japan, a format used by Panasonic and many other companies.
AEHA refers to the Association for Electric Home Appliances in Japan, a format used by Panasonic and many other
companies.
.. _remote_transmitter-transmit_byronsx:
@ -214,7 +243,8 @@ This :ref:`action <config-action>` sends a CanalSat infrared remote code to a re
Configuration variables:
- **device** (**Required**, int): The device to send to, see dumper output for more details.
- **address** (*Optional*, int): The address (or subdevice) to send to, see dumper output for more details. Defaults to ``0``
- **address** (*Optional*, int): The address (or sub-device) to send to, see dumper output for more details.
Defaults to ``0``.
- **command** (**Required**, int): The command to send.
- All other options from :ref:`remote_transmitter-transmit_action`.
@ -240,7 +270,8 @@ This :ref:`action <config-action>` sends a CanalSatLD infrared remote code to a
Configuration variables:
- **device** (**Required**, int): The device to send to, see dumper output for more details.
- **address** (*Optional*, int): The address (or subdevice) to send to, see dumper output for more details. Defaults to ``0``
- **address** (*Optional*, int): The address (or sub-device) to send to, see dumper output for more details.
Defaults to ``0``.
- **command** (**Required**, int): The command to send.
- All other options from :ref:`remote_transmitter-transmit_action`.
@ -248,7 +279,7 @@ Configuration variables:
``remote_transmitter.transmit_coolix`` **Action**
This :ref:`action <config-action>` sends one or two (stricted or not) 24-bit Coolix infrared remote codes to a remote transmitter.
This :ref:`action <config-action>` sends one or two 24-bit Coolix infrared remote codes to a remote transmitter.
.. code-block:: yaml
@ -259,8 +290,10 @@ This :ref:`action <config-action>` sends one or two (stricted or not) 24-bit Coo
Configuration variables:
- **first** (**Required**, :ref:`templatable <config-templatable>`, uint32_t): The first 24-bit Coolix code to send, see dumper output for more info.
- **second** (*Optional*, :ref:`templatable <config-templatable>`, uint32_t): The second 24-bit Coolix code to send, see dumper output for more info.
- **first** (**Required**, :ref:`templatable <config-templatable>`, uint32_t): The first 24-bit Coolix code to send;
see dumper output for more info.
- **second** (*Optional*, :ref:`templatable <config-templatable>`, uint32_t): The second 24-bit Coolix code to send;
see dumper output for more info.
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_dish:
@ -282,7 +315,8 @@ Configuration variables:
- **command** (**Required**, int): The command to send, between 0 and 63 inclusive.
- All other options from :ref:`remote_transmitter-transmit_action`.
You can find a list of commands in the `LIRC project <https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/dishnet/Dish_Network.lircd.conf>`__.
You can find a list of commands in the
`LIRC project <https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/dishnet/Dish_Network.lircd.conf>`__.
.. _remote_transmitter-transmit_dooya:
@ -304,7 +338,8 @@ Configuration variables:
- **id** (**Required**, int): The 24-bit ID to send. Each remote has a unique one.
- **channel** (**Required**, int): The 8-bit channel to send, between 0 and 255 inclusive.
- **button** (**Required**, int): The 4-bit button to send, between 0 and 15 inclusive.
- **check** (**Required**, int): The 4-bit check to send. Includes an indication that a button is being held down. See dumper output for more info.
- **check** (**Required**, int): The 4-bit check to send. Includes an indication that a button is being held down.
See dumper output for more info.
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_drayton:
@ -375,7 +410,8 @@ Configuration variables:
``remote_transmitter.transmit_haier`` **Action**
This :ref:`action <config-action>` sends a 104-bit Haier code to a remote transmitter. 8-bits of checksum added automatically.
This :ref:`action <config-action>` sends a 104-bit Haier code to a remote transmitter. The 8-bit checksum is added
automatically.
.. code-block:: yaml
@ -423,14 +459,16 @@ This :ref:`action <config-action>` sends a MagiQuest wand code to a remote trans
Configuration variables:
- **wand_id** (**Required**, int): The wand ID to send, as a hex integer. See the dumper output for your wand ID.
- **magnitude** (*Optional*, int): The magnitude of swishes and swirls of the want to transmit. See the dumper output for examples. If omitted, sends 0xFFFF (which the real wand never uses).
- **magnitude** (*Optional*, int): The magnitude of swishes and swirls the wand should transmit. See the dumper output
for examples. If omitted, sends 0xFFFF (which the real wand never uses).
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_midea:
``remote_transmitter.transmit_midea`` **Action**
This :ref:`action <config-action>` sends a 40-bit Midea code to a remote transmitter. 8-bits of checksum added automatically.
This :ref:`action <config-action>` sends a 40-bit Midea code to a remote transmitter. 8-bits of checksum added
automatically.
.. code-block:: yaml
@ -446,7 +484,8 @@ This :ref:`action <config-action>` sends a 40-bit Midea code to a remote transmi
Configuration variables:
- **code** (**Required**, list, :ref:`templatable <config-templatable>`): The 40-bit Midea code to send as a list of hex or integers.
- **code** (**Required**, list, :ref:`templatable <config-templatable>`): The 40-bit Midea code to send as a list of
hex or integers.
- All other options from :ref:`remote_transmitter-transmit_action`.
``remote_transmitter.transmit_nec`` **Action**
@ -455,11 +494,12 @@ This :ref:`action <config-action>` sends an NEC infrared remote code to a remote
.. note::
In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC standard.
Therefore, if the configuration file has come from an earlier version of ESPhome, it is necessary to reverse the order of the address and command bits when moving to 2021.12 or above.
For example, address: 0x84ED, command: 0x13EC becomes 0xB721 and 0x37C8 respectively.
Additionally, ESPHome does not automatically generate parity bits or pad values to 2 bytes.
So, in order to send command 0x0, you need to use 0xFF00 (0x00 being the command and 0xFF being the logical inverse).
In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC
standard. Therefore, if the configuration file has come from an earlier version of ESPhome, it is necessary to
reverse the order of the address and command bits when moving to 2021.12 or above. For example,
``address: 0x84ED``, ``command: 0x13EC`` becomes ``0xB721`` and ``0x37C8``, respectively. In additional, ESPHome
does not automatically generate parity bits or pad values to 2 bytes. For example, to send command ``0x0``, you
need to use ``0xFF00`` (``0x00`` being the command and ``0xFF`` being the logical inverse).
.. code-block:: yaml
@ -473,7 +513,8 @@ Configuration variables:
- **address** (**Required**, int): The 16-bit address to send, see dumper output for more details.
- **command** (**Required**, int): The 16-bit NEC command to send.
- **command_repeats** (*Optional*, int): The number of times the command bytes are sent in one transmission. Defaults to `1`.
- **command_repeats** (*Optional*, int): The number of times the command bytes are sent in one transmission.
Defaults to `1`.
- All other options from :ref:`remote_transmitter-transmit_action`.
``remote_transmitter.transmit_nexa`` **Action**
@ -493,7 +534,8 @@ This :ref:`action <config-action>` a Nexa RF remote code to a remote transmitter
Configuration variables:
- **device** (**Required**, int): The Nexa device code to send, see dumper output for more info.
- **state** (**Required**, int): The Nexa state code to send (0-OFF, 1-ON, 2-DIMMER LEVEL), see dumper output for more info.
- **state** (**Required**, int): The Nexa state code to send (0-OFF, 1-ON, 2-DIMMER LEVEL), see dumper output for more
info.
- **group** (**Required**, int): The Nexa group code to send, see dumper output for more info.
- **channel** (**Required**, int): The Nexa channel code to send, see dumper output for more info.
- **level** (**Required**, int): The Nexa level code to send, see dumper output for more info.
@ -562,8 +604,8 @@ This :ref:`action <config-action>` sends a raw code to a remote transmitter spec
Configuration variables:
- **data** (**Required**, string): The raw code to send specified as a string.
A lot of remote control Pronto codes can be found on http://remotecentral.com
- **data** (**Required**, string): The raw code to send specified as a string. Many remote control Pronto codes can be
found on http://remotecentral.com
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_raw:
@ -772,10 +814,15 @@ This :ref:`action <config-action>` sends a Roomba infrared remote code to a remo
Configuration variables:
- **data** (**Required**, int): The Roomba code to send, see dumper output for more info.
- Note that ``repeat`` is still optional, however **Roomba vacuums require that a given code is received at least three times before they will act on it.** If your Roomba still does not respond to sent command increase this value.
- Note that ``wait_time`` is still optional; it will even work without this parameter, but Roomba Remote uses this 17 ms wait time between sent commands.
- All other options from :ref:`remote_transmitter-transmit_action`.
**Important:**
- While ``repeat`` is optional, **Roomba vacuums require that a given code is received at least three times before they
will respond to it.** If your Roomba does not respond to the command, increase this value.
- While ``wait_time`` is optional, the Roomba Remote uses a 17 ms wait time between commands. However, it appears to
work without this parameter.
.. _remote_transmitter-transmit_samsung:
``remote_transmitter.transmit_samsung`` **Action**
@ -866,7 +913,8 @@ Configuration variables:
``remote_transmitter.transmit_mirage`` **Action**
This :ref:`action <config-action>` sends a 112-bit Mirage code to a remote transmitter. 8-bits of checksum added automatically.
This :ref:`action <config-action>` sends a 112-bit Mirage code to a remote transmitter. 8-bits of checksum added
automatically.
.. code-block:: yaml