ESP8266 Relay (active low): how to prevent triggering on boot or reset (SOLVED)

Hi everyone.
I’ve tried almost everything, and the only thing that has worked for me is declaring the board in this way:

esp8266:

  • board: d1_mini
    early_pin_init: false

It’s the only way I’ve found to avoid the “blinking” during boot-ups.
Even with capacitors, it still happened.
I’ve tried on both old and new D1 Mini boards (Chinese clones), and it has worked in both cases.

I know the issue is solved on this thread, but for future, I have the same issue, but I have a level shifter between my ESP32 and the relay. Which means the input of the relay is pulled high to 3.3V.
The relay triggers for a pulse when 3.3V turns on, before the ESP32 boots. That’s the race condition.
I am adding a transistor on the GND pin of the relay input, which will turn on when the ESP is initialized. That way, even if the pull up is active, the GND is not connected and the input to the relay board is off.
Anyone try this before?

For me this works on esp01 devices:

esp8266:
  board: esp01_1m
  early_pin_init: false

esphome:
  name: frontdoorbell
  comment: "FrontDoorBell"

I got it now … It depense on the pin
Here you can see the signal at the pin D3 GPIO00 while boot up


with the config of Siar ESP8266 Relay (active low): how to prevent triggering on boot or reset (SOLVED) - #28 by Siar

Now I am using D0 GPIO16 and D2 GPIO04 for my relais an it works :slight_smile:

Not working also
RX = GPIO03
D4 = GPIO02