This was from a Home Automation presentation I do almost every year. For 2017 I wanted something working and Wireless. So with a Pi, a could of Sonoff devices (ESP8266 boards), a 3v3 usb serial interface (promamer) interface and a WiFi router.
I'm working on getting everything added here I'll add a link to the Sonoff-Tasmota. There are several support libraries that need to be added(as well as the ESP8266 env.)
Unlike many other projects, I actually have this working.