EZPlug v2 on ESPHome
ESPHome firmware for the TH3D EZPlug v2 smart plug, replacing the stock Tasmota. Includes the steps to move a plug over without opening it.
The TH3D EZPlug v2 ships with Tasmota. I wanted my plugs on ESPHome like the rest of my devices, so I wrote a config for it and worked out how to switch a running plug over Wi-Fi, with no serial cable.
hardware
- Chip: ESP32-C3 (ESP8685), 4 MB flash
- Power meter: BL0937 (voltage, current, power)
- Relay on GPIO4, button on GPIO20, power LED on GPIO6 (follows the relay), status LED on GPIO1
how-it-works
- Calibration carried over. The BL0937 values were converted from the Tasmota ones (PowerCal 9058, VoltageCal 1465, CurrentCal 3142). Voltage matches what Tasmota reported. Power and current haven’t been checked against a known load yet.
- Flashing. A
flash.shscript builds the firmware in Docker and uploads it over the air. Wi-Fi credentials come from asecrets.yamlfile. For another plug, copy the YAML and changedevice_name. - Leaving Tasmota. Build once with
allow_partition_access: trueand upload the OTA image through Tasmota’s file upload. Then rewrite the partition table in two steps with ESPHome’s migration partition files. The app is about 900 KB, so I used Indirect Method A from the ESPHome Tasmota migration guide. A power cut during the partition steps means a serial reflash, so keep power stable.
software
- ESPHome YAML config, built and flashed with Docker