I am using the following 8622 replay module: https://www.aliexpress.com/item/4001108959192.html. Whenever the device is switched on (with the ESP01 plugged), or reboots, the relay is triggered. As I am wanting to use this to control my garage door, this is less than ideal.
I think I probably need a pullup or down resistor somewhere and I have tried putting one in but it seemed to make no difference.
The pin that triggers the relay is GPIO0.
Another approach would be create a hack which results in the GPIO0 only connecting after the boot up process but I am also not sure how to do this.
It made no difference. I tried all combinations. In fact even if a new unprogrammed ESP-01 is inserted, it triggers the relay on startup. Adding the capacitor fixed it.
I may be incorrect but as far as I can recall, that pin might goes high on power up. A capacitor may be an answer but it would not be the approach I would take if I wanted an extended life of my esp-01.
There is another pin on there (GPIO2). Have you tried using that pin? I also read a hack (somewhere) about taking another IO pin off the PCB, with the careful use of a soldering iron...
Also, if you only need one output (to power the relay), then perhaps you could AND these pins together, so that both have to be HIGH for the relay to switch. The 74LS08 might be the TTL logic chip you need. Or you can use a couple of mosfets.