Raspberry Pi is an ideal device to setup a complete stack of software that is needed to run a home automation system. In this blog I will cover installation and configuration of Raspberry Pi Server with MQTT broker, in combination with Sonoffs running Tasmota firmware.
Sonoff is an ESP8266 based on/off switch that will let you control electrical devices around your home. Out of the box it can be only managed by the eWeLink app which is running on Chinese servers. If you want to take full control of the device you can flash the firmware and access it inside your local network.