# ESP-01 Tasmota Configuration Walkthrough This document summarizes the final working configuration for the ESP-01 module flashed with Tasmota. ## Hardware Setup - **Device**: ESP-01 (ESP8266) - **Pin GPIO0**: Relay 1 - **Pin GPIO1 (TX)**: **Relay_i 2** (Visual LED) - **Pin GPIO2**: Button 1 ## Firmware Installation Successfully flashed `tasmota.bin` (ESP8266 image). ## Multi-function Timer Button The physical button (Button1) is configured to handle two separate timer durations and uses the LED (Relay2) for visual feedback. ### Final Rule Logic ```text Rule1 ON Button1#Action=SINGLE DO Backlog Var1 700; Var2 2; Power1 2 ENDON ON Button1#Action=HOLD DO Backlog Var1 5500; Var2 10; Power1 2 ENDON ON Power1#State=1 DO Backlog PulseTime1 %Var1%; BlinkTime2 %Var2%; BlinkCount2 0; Power2 3 ENDON ON Power1#State=0 DO Power2 0 ENDON ``` ### Behavior Summary | Action | Current State | Outcome | LED (Relay2) | | :--- | :--- | :--- | :--- | | **Single Click** | OFF | **ON** for **10m** | **Fast Blink** (0.2s) | | **Long Press (2s)** | OFF | **ON** for **1.5h** | **Slow Blink** (1.0s) | | **Any Action** | ON | **OFF** immediately | **OFF** | ## MQTT & Home Assistant Integration - **Server**: `mqtt.oncloud.my.id` - **Topic**: `sutana_2543DB` - **HA Integration**: Auto-Discovery via MQTT. ## Verification Status - [x] **Flashing**: Verified. - [x] **MQTT**: Verified via Python test script. - [x] **Timer Rules**: Verified via Tasmota Console logs. - [x] **LED Visualization**: Simplified via Relay2 mapping and verified.