Remote Receiver

The remote_receiver component lets you receive and decode any remote signal, these can for example be infrared remotes or 433MHz signals.

The component is split up into two parts: the remote receiver hub which handles setting the pin and some other settings, and individual remote receiver binary sensors which will trigger when they hear their own configured signal.

See Setting up Infrared Devices and Setting Up RF Devices for set up guides.

# Example configuration entry
remote_receiver:
  pin: GPIO32
  dump: all

Configuration variables:

  • pin (Required, Pin): The pin to receive the remote signal on.
  • dump (Optional, list): Decode and dump these remote codes in the logs. Set to all to dump all available codecs:
    • lg: Decode and dump LG infrared codes.
    • nec: Decode and dump NEC infrared codes.
    • panasonic: Decode and dump Panasonic infrared codes.
    • jvc: Decode and dump JVC infrared codes.
    • samsung: Decode and dump Samsung infrared codes.
    • sony: Decode and dump Sony infrared codes.
    • rc_switch: Decode and dump RCSwitch RF codes.
    • rc5: Decode and dump RC5 IR codes.
    • raw: Print all remote codes in their raw form. Useful for using arbitrary protocols.
  • tolerance (Optional, int): The percentage that the remote signal lengths can deviate in the decoding process. Defaults to 25%.
  • 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.
  • filter (Optional, time): Filter any pulses that are shorter than this. Useful for removing glitches from noisy signals. Defaults to 10us.
  • idle (Optional, time): The amount of time that a signal should remain stable (i.e. not change) for it to be considered complete. Defaults to 10ms.
  • id (Optional, ID): Manually specify the ID used for code generation. Use this if you have multiple remote transmitters.

Automations:

  • on_jvc (Optional, Automation): An automation to perform when a JVC remote code has been decoded. A variable x of type remote_base::JVCData is passed to the automation for use in lambdas.
  • on_lg (Optional, Automation): An automation to perform when a LG remote code has been decoded. A variable x of type remote_base::LGData is passed to the automation for use in lambdas.
  • on_nec (Optional, Automation): An automation to perform when a NEC remote code has been decoded. A variable x of type remote_base::NECData is passed to the automation for use in lambdas.
  • on_sony (Optional, Automation): An automation to perform when a NEC remote code has been decoded. A variable x of type remote_base::SonyData is passed to the automation for use in lambdas.
  • on_raw (Optional, Automation): An automation to perform when a raw remote code has been decoded. A variable x of type std::vector<int> is passed to the automation for use in lambdas.
  • on_rc5 (Optional, Automation): An automation to perform when a RC5 remote code has been decoded. A variable x of type remote_base::RC5Data is passed to the automation for use in lambdas.
  • on_samsung (Optional, Automation): An automation to perform when a samsung remote code has been decoded. A variable x of type remote_base::SamsungData is passed to the automation for use in lambdas.
  • on_panasonic (Optional, Automation): An automation to perform when a panasonic remote code has been decoded. A variable x of type remote_base::PanasonicData is passed to the automation for use in lambdas.

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.

# Example configuration entry
remote_receiver:
  pin: GPIO32
  dump: all

binary_sensor:
  - platform: remote_receiver
    name: "Panasonic Remote Input"
    panasonic:
      address: 0x4004
      command: 0x100BCBD

Configuration variables:

  • name (Required, string): The name for the binary sensor.
  • id (Optional, ID): Manually specify the ID used for code generation.
  • All other options from Binary Sensor.

Remote code selection (exactly one of these has to be included):

  • jvc: Trigger on a decoded JVC remote code with the given data.
    • data (Required, int): The JVC code to trigger on, see dumper output for more info.
  • lg: Trigger on a decoded LG remote code with the given data.
    • data (Required, int): The LG code to trigger on, see dumper output for more info.
    • nbits (Optional, int): The number of bits of the remote code. Defaults to 28.
  • nec: Trigger on a decoded NEC remote code with the given data.
    • address (Required, int): The address to trigger on, see dumper output for more info.
    • command (Required, int): The NEC command to listen for.
  • sony: Trigger on a decoded Sony remote code with the given data.
    • data (Required, int): The Sony code to trigger on, see dumper output for more info.
    • nbits (Optional, int): The number of bits of the remote code. Defaults to 12.
  • raw: Trigger on a raw remote code with the given code.
  • rc5: Trigger on a decoded RC5 remote code with the given data.
    • address (Required, int): The address to trigger on, see dumper output for more info.
    • command (Required, int): The RC5 command to listen for.
  • samsung: Trigger on a decoded Samsung remote code with the given data.
    • data (Required, int): The data to trigger on, see dumper output for more info.
  • panasonic: Trigger on a decoded Panasonic remote code with the given data.
    • address (Required, int): The address to trigger on, see dumper output for more info.
    • command (Required, int): The command.
  • rc_switch_raw: Trigger on a decoded RC Switch raw remote code with the given data.
    • 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 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 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 RC Switch Protocol for more info.
  • rc_switch_type_c: Trigger on a decoded RC Switch Type C remote code with the given data.
    • family (Required, string): The family. Range is a to p.
    • 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 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 RC Switch Protocol for more info.

Note

For the Sonoff RF Bridge you can use this hack created by the Github user wildwiz. Then use this configuration for the remote receiver/transmitter hubs:

remote_receiver:
  pin: 4
  dump: all

remote_transmitter:
  pin: 5
  carrier_duty_percent: 100%