Each project consists not only of many important hardware components but also of the appropriate software. It is often less work to assemble the project than to write the appropriate software later.
But thanks to some open source projects this work can be saved. One of them is the often mentioned Tasmota firmware. Another is the project ESPEasy.
ESPEasy is almost a kind of “operating system” for the ESP8266 microcontroller with the help of various sensors and actuators can be controlled and read out. A wide variety of sensors and actuators can even be linked together using simple rules.
Many of the projects on Nerdiy.de are also based on ESPEasy and a plug-in for the project.
A general procedure for how to install your ESPEasy and any desired plug-ins on your ESP8266 is described in the following article.
Hints for our lovely english readers: Basically, many of the articles on Nerdiy.de are translations from the original german articles. Therefore, it may happen here and there that some illustrations are not available in english and that some translations are weird/strange/full of mistakes or generally totaly wrong. So if you find some obvious (or also not obvious) mistakes don't hesitate to leave us a hint about that in the comment section.
Also please don't get confused, that instead of a "dot" often a "comma" is used as decimal separator. 🙂
- 1 Safety instructions
- 2 Affiliate links / advertising links
- 3 Requirements
- 4 Compile it yourself or not?
- 5 Copy the current ESPEasy version from the GitHub
- 6 Enabled required plugins
- 7 Configure WLAN access data
- 8 Configure WiFi access data via the serial interface
- 9 Have fun with the project
I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂
Before you start with this article, you should have the Arduino IDE installed and configured. Information on this can be found in the following article.
Install programs – an example
ArduinoIDE – Tips and Tricks
In the following list you will find all the parts you need to implement this article.
In the following list you will find all the tools you need to implement this article.
Compile it yourself or not?
Basically, there are two “different” ways to get the desired firmware on your ESP8266.
- You can compile the program code yourself (= translate the program code into machine code) and transfer the resulting .bin file to the ESP8266.
- You can transfer a pre-compiled .bin file directly to the ESP8266.
Both way have advantages and disadvantages.
The advantage of 1. is that you can enable or disable all desired features. You have more configuration options but of course more potential sources of error.
The advantage of 2. is that working .bin files can transfered quite fast to the ESP8266. In most cases this is sufficient. Only in the case that you want to have more “control” over the individual firmware options is the first way to choose.
Nevertheless, the first way is described in this article.
Way two is described in the article ESP8266 – Flashing .bin files under Windows using “Esptool” .
Copy the current ESPEasy version from the GitHub
To be able to transfer the firmware to your ESP8266, of course you have to download it first.
This is included in the GitHub of the original project, which you can find here:
There is also a mirrored version on the Nerdiy.de GitHub account, which you can find here:
The advantage of the Nerdiy.de-ESPEasy version is that all plugins written by Nerdiy.de are already included and have been tested with the ESPEasy version used. If you want to use one of the Nerdy plugins, you do not have to copy any additional plugin files into the project. The disadvantage is that the ESPEasy version in the original Git is probably newer.
Enabled required plugins
Some ESPEasy plugins are not enabled by default. In this way you can save the storage space for unneeded plugins.
If you want to use these plugins, it is important that you “enable” them before compiling. Switch to the Arduino IDE in the appropriate plugin.
Configure WLAN access data
After transferring the ESPEasy firmware to your ESP8266, you will need to connect it to your WiFi.
The ESPEasy firmware offers a practical function for this purpose. If no valid WiFi access has been stored on the respective ESP8266 with which the firmware can log into a WiFi, then a separate WiFi will automatically be opened. With this WiFi you can then connect and communicate with the ESPEasy firmware and enter the login data to your “actual” WiFi.
The following describes this way on an Android phone. In principle, this also works with any other wireless-enabled device that is also Internet-enabled. The operation should be identical to an iOS device or normal laptop.
Your ESPEasy device restarts and should connect to the selected WLAN after the reboot.
For example, you recognize that there is a new device in your network. You can find out by checking the devices in your network. How to do this is described in the article “Displaying/finding the IP address of the devices in the network“.
If you have entered the wrong WiFi-access data you can easily reset your ESPEasy device (=reset to factory settings). This deletes all – also possible incorrect – settings and you can configure new correct access data in the same way described above.
To reset your ESPEasy device to factory settings it is sufficient to execute the command “reset”. How to execute commands on an ESPEasy device is described in the article ESPEasy – Commands and actions via HTTP, MQTT, UDP and direct execution. Since you only have access to your ESPEasy device via the serial interface, unfortunately you only have the possibility to execute commands on this way.
Configure WiFi access data via the serial interface
I personally like it more to configure the WiFi access data via the serial interface. Most of the time the ESP was flashed anyway and the serial connection is still active.
In this case, you can use the command
to display the currently saved settings and (if already connected to a WiFi) the assigned IP address of the ESP.
With the command “WifiSSID” you can now set the SSID of your WiFi access point. You send the command first and then the name of your WiFi access point separated by a space. If your WiFi is called “myGreatWiFi” for example, this would look like this
For the password you need the command “WifiKey”. For example, if your password was “myGreatPassword”, the command to set it would look like this
It is important that you save the written settings afterwards. This is done with the command
Then you can restart the ESP by entering the following command and it should then connect to the configured WiFi access point:
Have fun with the project
I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂
P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂