It's expensive but you can for example toggle mains electricity on and off with some super basic electronics skills and about 5 lines of Python [1] (or many other languages). You can add GSM functionality with a regular USB modem, though the API isn't quite as nice [2]. WiFi is much nicer [3].
[0]: https://www.tinkerforge.com/en/
[1]: https://www.tinkerforge.com/en/doc/Kits/HardwareHacking/Remo...
[2]: https://github.com/Tinkerforge/red-brick/blob/master/program...
[3]: https://www.tinkerforge.com/en/doc/Hardware/Master_Extension...