Building something as small as those found at HD etc will be very hard to do for under $50
I do it with things like Particle because itâs fun.
You will need at least (sorry in Canadian Dollars, so likely 25% cheaper for the Americans on the site)
Particle - $29
High quality 10to15A relay and related flyback diodes and connections - 15$
120v to 5 or 3.3v (depends on how small of a package you want, can use externally usb charger âwall wartâ or buy an internal premade circuit, so $5 to $15.
Or just grab a Wimo for $50 but thatâs no fun and canât do things like check temp, or motion etc. (which would add to the above cost but eBay can keep those things cheap)