Nodemcu's housed behind a standard light switch


I like to keep my home automations smart, but appearing dumb. To that end I'm considering a way to simply add functionality to the standard location of each room's light switch. In effect I'd like to say, replace single switches (keeping their dumb function 100% as-is), with a double switch. The 2nd switch won't be used for anything but a momentary contact.

So I'd like to add a hidden dc psu (ideally some cheap, small ac-5vUSB (?) module within the back boxes of my UK light switches, to power a esp8266.

Any pointers please? The possibilities are endless.


In my experience of NodeMCU's they are a great piece of kit, but once you start adding devices to them like relays and with the inclusion of a power supply then they start to get big and messy. Unless you have loads of room behind the light switch I think you will struggle for space.

If your backbox for the switch is deep enough you may get a small relay inside but then you've got to connect the mains wires (usually 1/1.5mm solid drawn cable UK) so then this will make it a very tight fit too... it will just become a nightmare IMO, then more important than everything else there's the safety element of it to consider.

If you have a neutral at your switches would it not be better to change them to smart switches? If not, how would you power the 5v power supply? if there's no netral available would it be possible to get a neutral to them?

For me, because of the lack of a neutral wire I replaced my lamps with ZigBee ones, leaving the switch left in the on position I installed the Phillips Hue dimmer switch & plate which neatly fits over the existing switch, then these can control up to four lamps from them (as there's four useable buttons available) - these are all directly compatible with HEand works flawlessly.

Thanks for the input. I'm thinking that a better approach may be to look to fit a 2nd backbox above each of my existing light switches due to space issues. I'm hoping to have a neat little oled display fitted to each of these, with a few IALED's and momentary switches connected to the nodemcu. The purpose of these will be mainly to display temperature readings and control the heating in that room.

Haven't entirely thought it through yet, I may instead choose to mount one large project box in the stairwells on each floor, with all the controls for that floor's rooms.

Perhaps I could simplify the light switch idea to only have node plus momentary, and use this to Control various bits and bobs whilst appearing to be a standard light switch.

For various reasons, I'm not planning on replacing my switches with smart dimmers. I don't need that functionality enough to justify cost. I can swing it with the nodes.

There is a device kicking about on ebay which sounds like it would serve the purpose of providing 5v dc power provided there's a neutral.

Download the Hubitat app