Using a 3V latching relay to power up ESP8266
You use a latching relay of this form in the exact same way as a normal relay - it's just there's two of them.

One coil you want to control with a button (power on) and the other with a transistor (and possibly an "off" button as well).







simulate this circuit &ndash; Schematic created using CircuitLab

Press ON to latch the relay into the ON position (NO -> COM). Activate M1 or press OFF to latch the relay into the OFF position (NC -> COM).