8000 remote_transmitter.transmit_rc_switch_raw FAILS with zero sync on esp32 but WORKS on esp8266 · Issue #7186 · esphome/issues · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
remote_transmitter.transmit_rc_switch_raw FAILS with zero sync on esp32 but WORKS on esp8266 #7186
Open
@puterboy

Description

@puterboy

The problem

I am using remote_transmitter.transmit_rc_switch_raw to encode a protocol without a well-defined sync.
So I set:

sync: [0, 0]

On an esp8266 (e.g. d1 mini) this works but on an esp32 (e.g., devkit or tdisplay) it FAILS to generate ANY signal when sync.

This is at best an inconsistency in behavior between platforms and at worst a bug.
The failure is SILENT without any error or debug messages either at compile time or run time.

Note that:
[0, 0], [0, 1], and [1,0] all FAIL.
But even a sync as short as [1, 1] SUCCEEDS

Is there any way to get no sync on an esp32?
That is a very valid use case when one just wants to generate a pulse train without a sync.

It should be easy to fix.
But if for whatever reason you choose not to, it should at least be documented in the docs and should issue an error or warning either at compile or run-time. It is after all not at all obvious that [0, 0], [0,1], [1, 0] work on some platforms but fail the entire routing silently on others.

Which version of ESPHome has the issue?

2025.6.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2025.6.3

What platform are you using?

ESP32

Board

esp32 devkit, esp32 tdisplay, d1 mini

Component causing the issue

remote_transmitter

YAML Config

substitutions:
  tx_pin: "18" # "18" for esp32; "5" for d1 mini
globals:
  - id: tx_pin
    type: int
    initial_value: "${tx_pin}"

esphome:
  name: test_remote
  min_version: 2025.4.0
esp32:
  board: esp32dev
  framework:
    type: arduino
# esp8266:
#   board: d1_mini
ota:
  - platform: esphome
    password: !secret ota_password
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
api:
  encryption:
    key: !secret api_key
  reboot_timeout: 0s
logger:
remote_transmitter:
  pin: ${tx_pin}
  carrier_duty_percent: 100%
interval:
  - interval: 1s
    then:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '1111111111111111111111111111111111111111111111111111111111111111'  # 64 pulses
          protocol:
            pulse_length: 1000  # 20ms high + low pulse
            one: [1, 1]
#            sync: [1, 1]
            sync: [0, 0]
      - lambda: |-
          ESP_LOGW("TRANSMIT", "Pulse Transmitted to GPIO %d" , id(tx_pin));

Anything in the logs that might be useful for us?

NOTHING IN LOGS - FAILS SILENTLY

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0