SonoffMicropythonMQTT
Python code for connecting a Sonoff Basic to a MQTT broker and control it. mqtt.py is a modified version of micropython MQTT simple.py https://github.com/micropython/micropython-lib/tree/master/umqtt.simple .Tested on esp8266 latest stable micropython v1.9.3.