As part of a larger home automation project, I wanted the ability to control some mains power outlets remotely. To achieve this, I interfaced the transmitter from an inexpensive 433MHz mains remote control kit with a raspberry pi zero w (via a pair of 4066 chips). I then wrote a programme in C to which the desired channel is passed along with either an “on” or “off” command. I can now run a script from my smartphone which connects to the raspberry pi and triggers the remote mains outlet.
Currently I have two setup with lamps plugged into them (one in the lounge, one in the kitchen). These have been handy for when we’re out late and want to check on the pets over the webcams. Also has the benefit of making it appear as if someone is home.
I have another one temporarily powering a computer on the network that I occasionally access remotely over ssh. It’s been freezing lately, so until I figure out why, I am at least able to give it a hard reboot and get it running again.