So you're a Noob? Post your questions here until you graduate! Don't be shy.
User avatar
By Jan Kučera
#66021 Hello,
I want to create a WiFi controlled light switch with NodeMCU and a relay board. But the problem is, that NodeMCU usualy takes +- 90mA, so a battery is probably not a good choice. Is there any way to connect the NodeMCU to the power? (It is light on the ceiling - no sockets there) I thought of cutting the wires and connecting my old USB charger. Have someone tried it? Will it be legal in EU?

Thanks for all replies :)
User avatar
By rudy
#66025
Will it be legal in EU?


I don't know what the laws are there. But I do no that the installation would never pass an electrical inspection. Does that mean it could not be done safely? No, it can be done safely but I don't know your capabilities and what you want to use to do it.

I don't have any issues as far as doing this kind of this. But I design this stuff for a living. :D

While it still wouldn't make you installation meet code requirements I think the safest thing for you to do is to buy an already made product, such as something like this.
https://www.itead.cc/sonoff-wifi-wireless-switch.html

https://www.itead.cc/wiki/Sonoff

https://www.aliexpress.com/item/New-Ite ... 86013.html

Image
User avatar
By taikapanu
#66111 That sonof looks nice!

And in general to installations. I wouldnt mess up the house wirings. If you rewire your own lamps that you would take with you anyway when moving, I would say it is OK. As long as you know what you are doing. 230 VAC is dangerous to play with.
User avatar
By trackerj
#66123 I've done a while ago, even before sonoff and other variants existed, my own MAINS Switch version for some specific appplications:
AC_MAINS_SW_16A_2.jpg

It has a proper rated OMRON 16A Latch Relay and yes, it takes care of the safety rules and regulations, it has MOV and FUSE, proper creepage and clearance distances, etc, etc.
You do not have the required permissions to view the files attached to this post.