
LILYGO TO-ESP8266 OLED SH1106 with Tasmota
Flash the LILYGO TO-ESP8266 OLED SH1106 with Tasmota to get a WiFi-connected smart switch with a 1.3" SH1106 OLED display showing sensor values, device state, and IP address.
Overview
The LILYGO TO-ESP8266 OLED SH1106 is an ESP8266 development board with an integrated 1.3-inch SH1106 OLED display. By flashing Tasmota firmware, it becomes a WiFi-connected smart device that can display sensor readings, switch states, MQTT messages, and network information on the OLED screen.
Tasmota's display driver for SH1106 supports text rendering, sensor values, and customizable layouts via rules. The device template on templates.blakadder.com provides the exact GPIO mapping for the SH1106 display (SDA=D1/GPIO5, SCL=D2/GPIO4).
Features
- Tasmota firmware with SH1106 display driver (
USE_DISPLAY_SH1106) - Displays sensor readings, switch state, WiFi SSID, IP address
- MQTT integration for Home Assistant or other brokers
- Web UI for configuration and control
- OTA firmware updates
- Custom display content via Tasmota Berry scripting or rules
- GPIO pins exposed for custom sensors
Hardware
- LILYGO TO-ESP8266 OLED SH1106 (ESP8266 80/160 MHz + 1.3" SH1106 OLED)
- SH1106 connected: SDA=GPIO5 (D1), SCL=GPIO4 (D2)
Build
Use Tasmocompiler to compile Tasmota with #define USE_DISPLAY, #define USE_DISPLAY_SH1106, and #define USE_I2C enabled. Apply the device template from templates.blakadder.com for correct GPIO mapping. Flash via USB or OTA.

