Wemos D1 Mini - FengtianGu/Sonoff-Tasmota GitHub Wiki
Flashing Wemos with Tasmota
Using PlatformIO
Follow these steps to flash a Wemos D1 Mini with Tasmota firmware and add the following lines at the end of platformio.ini:
[env:wemos-d1-mini]
platform = espressif8266
framework = arduino
board = esp01_1m
board_build.flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMQTT_MAX_PACKET_SIZE=1000
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_speed = 115200
; *** Upload Serial reset method for Wemos and NodeMCU
upload_resetmethod = nodemcu
upload_speed = 115200
;upload_port = COM6
; *** Upload file to OTA server using SCP
;upload_port = user@host:/path
;extra_scripts = pio/strip-floats.py, pio/sftp-uploader.py
; *** Upload file to OTA server using HTTP
;upload_port = domus1:80/api/upload-arduino.php
;extra_scripts = pio/strip-floats.py, pio/http-uploader.py
From the Menu -> PlatformIO -> Run Other Target... (F7) and choose PIO Upload (wemos-d1-mini), this compiles tasmota and uploads the firmware to the Wemos device connected to usb.
Using esptool.py
- Install esptool.py (instructions for 2.6+)
- Hold the button for 10s while connecting the D1's USB port to the PC (or RaspberryPi). This will power the D1 and make the serial connection
- Verify the connection by running
./esptool.py --port /dev/ttyUSB0 read_mac
- Download sonoff.bin
- Erase + Write the new flash by running:
./esptool.py --port /dev/ttyUSB0 write_flash --erase-all -fm dout 0x0 /path/to/downloaded/sonoff.bin
Configure Tasmota for Wemos
Generic Module
In the Configuration -> Configure Module page, select Module Type: "18 Generic" (releases before 5.12.0 this was called "Wemos D1 Mini"). After Saving the settings, the WEMOS reboots with the Generic configuration. The first time you switch to "18 Generic" you will NOT see all the options as seen in the picture below YET. You have to save "18 Generic" first and when you go there again after the reboot you get the long table where you can change all the pin's parameters. These steps are confirmed to also work with the Wemos D1 mini PRO v2.0.0.