Document what remote "raw format" is (#2773)

* Document what remote "raw format" is

Add a note explaining that raw format is pulse widths (in microseconds) with sign indicating mark or space. This understanding is based on RemoteReceiverComponent::decode_rmt_, RemoteReceiverComponentStore::gpio_intr and RawDumper::dump.

* Update remote_receiver.rst

* Update remote_receiver.rst

---------

Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
This commit is contained in:
David Newgas 2023-03-22 01:13:54 -07:00 committed by GitHub
parent c96a258c09
commit d493079e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 32 deletions

View File

@ -66,6 +66,11 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Use this if you have
multiple remote receivers.
.. 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.
Automations:
------------
@ -101,13 +106,6 @@ Automations:
- **on_nec** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
NEC remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::NECData`
is passed to the automation for use in lambdas.
.. 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.
- **on_nexa** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Nexa RF code has been decoded. A variable ``x`` of type :apiclass:`remote_base::NexaData`
is passed to the automation for use in lambdas.
@ -201,22 +199,12 @@ Remote code selection (exactly one of these has to be included):
- **canalsat**: Trigger on a decoded CanalSat remote code with the given data.
.. note::
The CanalSat and CanalSatLD protocols use a higher carrier frequency (56khz) and are very similar.
Depending on the hardware used they may interfere with each other when enabled simultaneously.
- **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``
- **command** (**Required**, int): The command to listen for.
- **canalsatld**: Trigger on a decoded CanalSatLD remote code with the given data.
.. note::
The CanalSat and CanalSatLD protocols use a higher carrier frequency (56khz) and are very similar.
Depending on the hardware used they may interfere with each other when enabled simultaneously.
- **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``
- **command** (**Required**, int): The command to listen for.
@ -252,12 +240,6 @@ Remote code selection (exactly one of these has to be included):
- **nec**: Trigger on a decoded NEC remote code with the given data.
.. 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.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
- **command** (**Required**, int): The NEC command to listen for.
@ -355,18 +337,16 @@ Remote code selection (exactly one of these has to be included):
.. note::
For the Sonoff RF Bridge you can use `this hack <https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack>`__
created by the GitHub user wildwiz. Then use this configuration for the remote receiver/transmitter hubs:
The **CanalSat** and **CanalSatLD** protocols use a higher carrier frequency (56khz) and are very similar.
Depending on the hardware used they may interfere with each other when enabled simultaneously.
.. code-block:: yaml
remote_receiver:
pin: 4
dump: all
.. 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.
remote_transmitter:
pin: 5
carrier_duty_percent: 100%
.. note::
@ -384,11 +364,30 @@ Remote code selection (exactly one of these has to be included):
dump: all
.. note::
For the Sonoff RF Bridge, you can bypass the EFM8BB1 microcontroller handling RF signals with
`this hack <https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack>`__
created by the GitHub user wildwiz. Then use this configuration for the remote receiver/transmitter hubs:
.. code-block:: yaml
remote_receiver:
pin: 4
dump: all
remote_transmitter:
pin: 5
carrier_duty_percent: 100%
See Also
--------
- :doc:`index`
- :doc:`/components/remote_transmitter`
- :doc:`/components/rf_bridge`
- `RCSwitch <https://github.com/sui77/rc-switch>`__ by `Suat Özgür <https://github.com/sui77>`__
- `IRRemoteESP8266 <https://github.com/markszabo/IRremoteESP8266/>`__ by `Mark Szabo-Simon <https://github.com/markszabo>`__
- :apiref:`remote/remote_receiver.h`