I'm working on a project where a NodeMCU will be inside a switch box. To power it, I was planning on using something like this https://www.amazon.com/HI-Link-HLK-PM01-Step-Down-Intelligent-Household/dp/B00ZUELJ6K (Hlk-pm01). My questions are: to power the NodeMCU, is it simple as connecting the Hlk-pm01 to the power grid and to the NodeMCU board? Is it safe to do so?
I ask this, because I have seen some projects where people use fuses and capacitor as overload circuitry, like this one. Is it really necessary for this overload protection? Or is it fine to hook up just the Hlk-pm01? I'm mostly worried about safety (don't want to start a fire since the board will be inside a wall switch box) and size (not much spaxe inside a switch box). Also, is there any other way to power the board that's size efficient and simple? Something for which I would not need to worry about circuitry protection and all? Like a really small usb power supply?
What I'm trying to achieve with this project is turning a regular wall switch into a wireless smart one!
Thanks!