When the hardware intended for our own project is ready, the first thing we need to do is to upload the unicontrol software to the module. The easiest and recommended method is to upload it using the freely available Flasher program as described here.
Once the software is successfully uploaded to the module, a reset or power cycle should start the program. The fact that the program is running can be verified by looking at the on-board LED.

The LED flashes every 10 seconds depending on the mode the module is currently in. One blink means that the program is running and working according to the set values. Since there is nothing configured on the first run, nothing happens except the blinking LED. Two flashes mean that the module has successfully connected to the WiFi network. Three flashes mean a simultaneous connection to the MQTT broker.
The first boot of the program takes a little longer than usual to start. This is because the factory reset is initiated and the all program defaults are loadedbeing loaded into EEPROM and File System.
After completing the INIT procedure, it is possible to connect to the module via a predefined WiFi network. After the factory settings or the first start-up the ESP8266 automatically tries to connect to the default WiFi network with the name “aya_ssid” and the password “aya_pass“. The easiest way is to make the first connection to the module with a mobile phone via a Hotspot, on which we set the required WiFi network. After starting Hotspot (ssid: “aya_ssid”, pass: “aya_pass”), the module will automatically connect to your mobile phone. The connected device will appear in the active hotspot connection. All you have to do is type its IP address into the browser. If the IP is correctly entered, a simple module page will be displayed. Here it is possible to make initial settings for connecting to the existing network on which we want to operate the module. We write the new network name and password in the selected columns on the displayed page. It is also possible to choose a password for the WEB pages of the module, which is required when activating “Web protection“. Press the “SAVE” button to save the entered values. Before connecting the module to our network, it is still necessary to either turn the device off and on or press the “WiFi Reset” button. After this step, the module will already connect to our newly defined network.

The external website is only used for configuring and setting processes. The actual running of the program does not need this page or the Internet itself for its operation. This is, of course the case unless it need to be further controlled or monitored via MQTT or HTTP. In this case, the module must be permanently connected to WiFi.
Running the unicontrol program
After successfully connecting via the interface the main and most important part follows. When connecting for the first time, we will see the main page with default values. First of all, it is necessary to configure the I/O ports used by the hardware. This is done in the “PERIPHERAL” menu. All options for setting individual items are described in the online manual.


When we have defined the I/O ports, we can proceed to setting up the behavior of the outputs based on the measured inputs, i.e. – setting the processes. Depending on the program version, 5, 15 or 40 processes are available that can be set. Each process consists of “NAME“, “CONSTRAINTS“, “INPUT“, “EVENTS“, “OUTPUT” and “CYCLE” blocks. Each block has multiple parameters according to the specified configuration. The listing of available parameters is dynamic and differs depending on the set-up of prior parameters. The picture below shows a listing of parameters for individual items in the program. This list may differ from the current version of the program that you have installed due to the active development of the underlying program’s capabilities. All current settings are described in the ONLINE manual. In the list of scrolling menu items, only those items that can be actively used based on valid HW configuration of the peripherals are highlighted an can be selected.
Factory settings
It is important to be able to restore the module to factory values in case of incorrect entry or forgetting of connection parameters to the WiFi network. This can be done in several ways. If the module is connected to WiFi and we just need to reset it and start over, just press the “FACTORY RESET” button at the bottom of the page in the settings page in the “WIRELESS“, “DEVICE” or “SYSTEM” menu and confirm.
However, if the module is not connected to WiFi, it is possible to initialize the settings in two ways:
- using a serial line
- by connecting the selected ESP8266 pin to GND
Due to the larger scope, a detailed description of the serial line is described in the following blog.
To upload implicit values to ESP8266, one of the pins set in the program for the RESET function must be grounded. The LED on D4 flashes 10 times quickly while the pin is connected. After this time, all default values are re-loaded into the EEPROM and the program is started with the factory settings.

Conclusion
In this part, we successfully uploaded the program to the ESP8266 and verified its functionality. In the next installment, the individual items of the “PROCESSES” menu will be explained in detail and we will create the first BLINK application.