SrcCodes

Home Automation - Internet of Things - MQTT (MQ Telemetry Transport), ESP8266 and MycroPython

This is my first post on home automation. As a 'Hello World' project, switching on/off a bulb is a common use case. This post is not an exception. But to spice it up, we'll use MQTT (MQ Telemetry Transport) - a machine-to-machine (M2M)/Internet of Things (IOT) connectivity protocol

Configure STA_IF interface of ESP8266 (MycroPython firmware) to connect with WIFI network automatically on boot

ESP8266 can act as both Station / WIFI client (STA_IF interface) and Access Point (AP_IF interface). AP_IF interface is active by default in MycroPython firmware on ESP826 . In the earlier post, we connected to the access point (AP mode) of ESP8266 and used WebREPL to remotely control switch

Example: Remotely switch on/off and control brightness of an LED using MicroPython WebREPL

So far, we have flashed MicroPython firmware onto an ESP8266 and setup WebREPL to run programs over WIFI on the chip. Now it's time for a hands-on excercise. We'll remotely switch on/off and control brightness of an LED using MicroPython WebREPL.

How to setup WebREPL to connect to Python prompt (REPL) of ESP8266 over WIFI network?

WebREPL daemon auto-start is disabled by default in MycroPython on ESP8266 for security reason. Here, we'll enable the same, connect to the REPL over WIFI using locally installed WebREPL client and run a "Hello World" program remotely on the chip.

How to flash MicroPython firmware onto an ESP8266 ESP-12E chip using esptool?

By default, ESP8226 module comes with AT Firmware. In this post, we'll see how to flash MicroPython firmware onto an ESP8266 ESP-12E chip using esptool. Tools,Technologies and Components used in this article 1. ESPlorer IDE 2. MicroPython 3. macOS Sierra 4. Components: * ESP8266 ESP-12E * USB To TTL converter UART

SrcCodes © 2026