Or use this SONOFF 4CHR3 & 4CHPROR3 4-gang Wi-Fi Smart Switch with RF Control
(Buy for example from banggood)
Din Rail Mount with Tasmota firmware (mqtt controlled)
GitHub - arendst/Tasmota: Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
and here
ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware