I have created web front-end to control esp, sonoff and raspberry pi's over MQTT. It can be used to turn things on and off, receive sensor data and send Infrared commands. The project is open source (https://github.com/jasonbrownza/espio-web-source). The latest release and documentation https://github.com/jasonbrownza/espio. I have included sample sketches for Raspberry Pi, NodeMCU and Sonoff (https://github.com/jasonbrownza/espio-device-scripts).
![Image](https://i.imgur.com/x9p0S4c.gif)