Before flashing ensure the device is unplugged from the charge controller.
If you have purchased the RS485-WiFi adaptor with a wemos D1 mini it shall be pre-flashed, if however you are using your own Wemos D1 mini or wish to upgrade to the latest version you shell need to download the latest firmware and flashing tool.
The latest firmware is available here
The flashing tool is available here
The flashing tool is provided by ESP-home team and is a great utility for flashing binary files to Wemos devices. Select the version which is appropriate for your Operating System.
The software does not need to be installed and you just need to launch the program.
Once launched select the serial port which was created when the Wemos was plugged into your computer and then browse to the update file which you have downloaded. Once the software is configured select “Flash ESP” which shall upload the code to the wemos and output a successful message to the Console window.