SrcCodes

IOT - Home Automation project using Geofencing, MQTT, ESP8266 and MycroPython

A home automation project that maps switching on/off of appliances with your entry/exit of a geofence (virtual perimeter for a real-world geographic area). Step into a cool room without having to wait for the air conditioning to start functioning? Watch the garage door open as you drive in.

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.

SrcCodes © 2026