Today I would like to show you how you can install ESPEasy on your ESP8266 modules. This is preliminary post to use ESP8266 with domoticz. On top of that last couple weeks I tried to prepare you and other readers to be able to connect different types of sensor to ESP8266. All of it together I hope in next weeks will result with very useful DIY home control system.
Okay, to the point. What you need?
- ESP8266 modules (I have tested it with ESP8266-01 blue and black and ESP8266-12E)
- If you will use ESP8266-01 then you will need some kind USB to Ttl converter I am using CP2102 USB 2.0 to Serial Converter but you can use any other.
- ESPEasy firmware which you need to upload to your ESP8266 modules
Connect USB convert to ESP8266-01
What is important you need to know you need to link GPIO0 with GND and CH_PD with 3.3V as this kind of connections will set ESP8266-01 in flashing mode. After flashing you will need to disconnect GPIO0 and reset board by e.g. disconnecting and connecting CH_PD.
Getting started with the ESP Easy takes a few basic steps. In most cases your ESP module comes with the AT firmware or the NodeMCU LUA firmware. We need to replace the existing firmware with the ESP Easy firmware (From domoticz)
You can download all firmware types as one package from it contains flash tool which we will use to upgrade ESP8266 modules with new firmware:
After downloading and unpacking ESPEasy package you will see couple files:
- bin – firmware files
- esptool.exe – flashing application
- flash.cmd – basic windows script which will run flashing app with settings we will set
You will need to edit your flash.cmd file and customize it for you needs. Flash.cmd should looks similar to this:
set /p comport= Comport (example 3, 4, ..) :
set /p fsize= Flash Size (example 512, 1024, 4096) :
set /p build= Build (example 71, 72, ..) :
echo Using com port: %comport%
echo Using bin file: ESPEasy_R%build%_%fsize%.bin
esptool.exe -vv -cd nodemcu -cb 115200 -cp COM%comport% -ca 0x00000 -cf ESPEasy_R%build%_%fsize%.bin
To adjust it for you needs you need to choose comport, firmware file size and build version.
I will show you my settings hope it will help. For each settings I will quote I will invite you to create a new file (e.g. flash_esp7266_01_black.cmd) and copy paste script code.
Module – ESP8266-01 (black 1024kb)
Comport – COM11
Filename – ESPEasy_R78_1024.bin (1024 version as ESP8266-01 black has 1024 memory)
esptool.exe -vv -cd nodemcu -cb 115200 -cp COM11 -ca 0x00000 -cf ESPEasy_R78_1024.bin
Module – ESP8266-01 (black 512kb)
Comport – COM11
Filename – ESPEasy_R78_512.bin (512 version as ESP8266-01 blue has 512 memory)
esptool.exe -vv -cd nodemcu -cb 115200 -cp COM11 -ca 0x00000 -cf ESPEasy_R78_512.bin
Module – ESP8266-12E (nodemcu)
Comport – COM8
Filename – ESPEasy_R78_4096.bin (4096version as ESP8266-12E (nodemcu) has 4096 memory)
esptool.exe -vv -cd nodemcu -cb 115200 -cp COM8 -ca 0x00000 -cf ESPEasy_R78_4096.bin
When you have created flash…cmd file then you need to run it and wait until you will see information that flashing has ended.
If it ended successful and you have restarted modules then you will be able to connect to module as first it creates Access point to which you can connect and configure it. As e.g. to connect to your domoticz server through you local router.
Github repository: https://goo.gl/ii9xsz
Be positive and stay calm!