- Define what you want/need
- Break this up in pieces
- Solve each piece
- Join all those pieces together
When you're new, don't begin with a separate ESP (ESP-01 to ESP-14) module.
Get yourself a proper development board: NodeMCU - WeMos D1 - Witty Board - ESP Thumbdrive
ESP power requirements are 3.3V±10%@500mA: HLK-PM03 (AC mains to 3.3V@1A)