Your IoT Cloud and MQTT drivers seem to be aimed at using an Esp8266 alone as a device, Any word of advice if one wants to use these drivers when an Arduino Mega is coupled with an Esp8266 module?
In other words, if one wants to use the thermostat example, and alter it to use the MQTT libraries, how would they achieve their goal?