Flashing the NodeMcu firmware
The default firmware on the Wemos D1 Mini NodeMcu is AT command based, so we have to flash the NodeMcu firmware into it.
Download and install NodeMcu flashtool.
Download and install ch340 USB seriell driver.
Connect Wemos D1 mini NodeMcu with a micro USB cable to your PC.
Download the firmware from here and the ESP init file from here or get it via NodeMcu homepage.
Switch to tab Config and select Firmware and ESP init file. Make sure to select the checkboxes and enter 0x00000 as base adress for the firmware and 0x3FC000 for the ESP init file.
Switch back to tab Operation and press Flash(F) to start flashing.
Now you have the Wemos D1 Mini NodeMcu running with the correct NodeMcu firmware.
Press the reset button on the Wemos D1 mini module and wait 5 minutes before you begin programming the module, because the firmware is formatting the filesystem on the first reset after flashing.