ESP01s relay issue

I have made a ESP01s wifi switch by flashing ESPurna and it works good. The only problem is whenever I switch on, the NC terminal gives current for a fraction of second. How do I fix it?.
The ESP01s relay is https://www.aliexpress.com/item/ESP8266 … 26507.html
The 230v/5v buck is https://www.aliexpress.com/item/AC-DC-5 … 95138.html
The connection is good and I was able to control the switch via web interface.

For my esp’s with relays, I always add a fairly large cap on the power line.
I’ve had problems without caps.

I’d put a 1000-2200uf cap, at least 8v (higher is fine).

The cap is most likely polar, so make sure you connect the negative lead to ground and positive to power.

Randy

Could you please post some pictures of how to connect a capacitor?

If I took a picture of my ESPs, it would be specific to how I wired it up, and I’m not sure how much value it would add.

For your setup, I’d start with a cap across the output of the 230/5V converter.
Buy a cap with leads, and normally the negative lead is marked, and that goes to ground.