FAQ
TL;DR: A single-relay ESP8266 with Tasmota draws only 0.7 W at 5 V (“almost like a Sonoff”)[Elektroda, p.kaczmarek2, post #19130883] "Sonoff is not a magic black box"[Elektroda, p.kaczmarek2, post #19132603] Set static IP or hostname, then control via HTTP or MQTT—no cloud needed.
Why it matters: DIY Wi-Fi switching costs little, keeps data local and scales with open-source firmware.
Quick Facts
• ESP8266-01 must run at 3.3 V; 5 V will destroy it[Elektroda, p.kaczmarek2, post #19130883]
• Relay SRD-05VDC-SL-C coil voltage: 5 V[Elektroda, p.kaczmarek2, post #19130883]
• Total current: 140 mA (0.7 W) relay on; 70 mA (0.35 W) off[Elektroda, p.kaczmarek2, post #19130883]
• Tasmota config AP appears as “tasmota_xxxx”; browse 192.168.4.1 after flash[Elektroda, p.kaczmarek2, post #19130883]
• Static address via console: IPAddress 192.168.x.y, or rely on hostname[Elektroda, khoam, post #19131175]
What parts do I need for a basic Wi-Fi relay?
You need an ESP8266-01 module, 5 V 500 mA flyback PSU, 3.3 V LDO, SRD-05VDC-SL-C relay, NPN transistor (BC547 or 2N7002), flyback diode, button, capacitors and resistors
[Elektroda, p.kaczmarek2, post #19130883] Total hardware fits on a small perf-board and costs under €5 in retail parts.
How do I flash Tasmota onto the ESP8266-01?
- Connect USB-UART (3.3 V logic) to TX/RX.
- Tie GPIO0 to GND, then power the board.
- Run “esptool.py write_flash 0x0 tasmota.bin”.
- Remove GPIO0 from GND and reset.[Elektroda, p.kaczmarek2, post #19130883]
Flash time is about 8 s over 921 600 baud.
Why do I need a 3.3 V regulator when I already have 5 V?
The ESP8266 core tolerates max 3.6 V. Supplying 5 V permanently damages the RF front-end—an irreversible failure edge-case
[Elektroda, p.kaczmarek2, post #19130883] Use an LDO such as MCP1702 to drop 5 V to 3.3 V.
How do I map the relay and button inside Tasmota?
Open 192.168.x.x → Configuration → Configure Module. Assign GPIO0 or GPIO2 as “Relay1”, and another pin as “Button1”. Save and reboot; a toggle button appears on the web UI
[Elektroda, p.kaczmarek2, post #19130883]
Do I really need a static IP?
Can I control the relay from my phone without MQTT?
Is internet-wide access possible?
What power does the circuit consume?
With Wi-Fi active and relay on, draw peaks at 140 mA (0.7 W). Relay off sinks about 70 mA (0.35 W)
[Elektroda, p.kaczmarek2, post #19130883] Idle Wi-Fi sleep can drop current to 20 mA, extending PSU headroom.
What happens if I leave GPIO0 grounded after flashing?
How do I reserve an IP via DHCP?
Locate the ESP MAC in the router’s client list, then add a DHCP reservation linking that MAC to your chosen IP
[Elektroda, p.kaczmarek2, post #19133249] Most SOHO routers expose this under LAN → DHCP Settings.
Can I change the ESP8266 MAC address?
Yes, call wifi_set_macaddr() in the Arduino Core. "Useful when cloning devices for testing"
[Elektroda, khoam, post #19133412] Remember to keep it unique to avoid network conflicts.
How can I scale to multiple inputs and outputs?
Add I²C GPIO expanders (e.g., PCF8574) and map their pins in Tasmota’s Configure Template menu. Eight devices give 64 lines without firmware changes. Control remains through the same HTTP or MQTT endpoints.“}]}
Generated by the language model.