DIY Projects

ESP Easy: firmware ESP8266 to create connected and home automation objects without programming

espeasy liste device bmp180

ESP Easy is an open source firmware that allows to program ESP8266 modules without any line of code (official page of the project). ESP Easy has evolved a lot since the 78 version I used in the previous article that explained how to make a connected object based on ESP Easy and connect it to Jeedom. ESPEasy can be installed directly from the Arduino IDE from the source code or from a small program (only available in Windows). ESP Easy embeds a mini web server that allows to configure the module remotely. Many sensors are supported: DS18B20 / DHT11 / DHT22 (temperature and humidity) TCR5000 (pulse counter), BMP085 / BMP280 / BME280 (digital barometer) BH1750 (brightness), Wiegand / PN532 (RFID), HC-SR05 (4 analog inputs 16 bits I2C), INA219 (current measurement) … as well as actuators (relays, led, servo, PWM …). ESP Easy also integrated (since version R120) a script editor that allows to create small scenarios, transforming the ESP8266 into a mini independent home automation server!

For this article, I used the R120 version of the firmware as well as a Wemos D1 Mini (presentation article).

Installing the ESPEasy firmware on an ESP8266 module

You can retrieve the latest stable firmware version on this page. The Download section is at the bottom of the page.

Once decompressed, the directory contains the following:

Depending on the ESP8266 module on which you are going to install ESP Easy, here is the available memory size

512Ko ESP-01 (blue)

ESP-201

ESP-12

1024Ko ESP-01 (black)
4096Ko ESP-12E NodeMCU boards or Wemos D1 Mini for example

Some compatible ESP8266 development boards

Installing the firmware using the flash.exe program

Once you have recovered the COM port to which the ESP8266 is connected, the size of the memory, run flash.exe

Answer the three questions:

Confirm to start the installation.

First start of ESP Easy: WiFi configuration

After installation, the ESP8266 module reboots. ESP Easy embeds a web server that allows access to the configuration interface of the module. When you first boot, you will find the ESP on your Wi-Fi network. Open the Wi-Fi Connection Manager and select the ESP_0 network.

Note. On some systems (including Linux), the default password configesp may be requested when connecting to ESP_0.

In a web browser, open http://192.168.4.1/setup . On macOS, the login window opens automatically after a few seconds. Choose the WiFi network to which the ESP must connect and enter the password.

Then press connect

Once connected, the ip address of the module is displayed (a few seconds!). If you missed the address, go to your internet box or router to find it.

Discovering the ESP Easy interface

The ESP8266 is ready for use. Let’s find out how it works. In a web browser, enter the ip address of the ES. The Web interface of ESP Easy consists of 4 tabs (+ 1 that we will see later). Everything is not documented on the Wiki of the project but here is the essential. A large number of settings are reserved for advanced applications and can be provided for future functions (nodes for example).

Main page: system summary

Easy ESP nodes

To see the other ESP modules on your network you have to make several settings:

Config page: module configuration

This page allows you to configure the general parameters of the module:

A fixed IP address can be assigned to the ESP8266

Hardware Settings Page

This page allows you to configure the module’s GPIOs and assign a default behavior for each input / output:

Page Tools: advanced settings and tools

Before testing ESP Esay on a concrete case, let’s go to the Tools page to find out what it’s all about:

System

Advanced Page

This page contains advanced settings but some are very useful as you see:

Wi-Fi

Interfaces

Very practical, an I2C interface scanner that lists all the modules connected to the ESP. For example, a digital barometer BMP180.

Settings

To save the configuration. The config.txt file is downloaded to your computer.

Loads a configuration. Two files are recognized:

Firmware

Allows you to install a new firmware wirelessly. The bin file is located in the firmware directory. You can also make your own firmware from the source code from the Arduino IDE (instructions here).

Command

ESP Easy offers 35 commands for testing, maintenance, etc. directly from the WEB interface. The complete list of commands is available here. You can even send a command from an ESP to another ESP. For example, order a relay connected to the GPIO 5. In the command field, enter

sendto 2,gpio,5,1

On the second ESP, the relay activates and the log traces the order history.

To disable the relay, send

sendto 2,gpio,5,1

To learn more about the rules system, read this tutorial.

Supported home automation protocols

ESP Easy supports multiple home automation protocols, allowing you to easily integrate small DIY connected objects into your favorite software or online service.

Natively supported home automation software

If you choose MQTT, it is important to assign a number (Unit nr) to each ESP. In this way the messages (commands) will be correctly sent to the destination node.

Domoticz: HTTP or MQTT

HTTP and MQTT protocols are supported. For the HTTP protocol, simply specify the ip address of the Domoticz server and the port (default 8080). It is possible to send and receive commands with the HTTP protocol.

MQTT can only send data to Domoticz at this time.

OpenHAB: MQTT

OpenHAB does not have an MQTT broker installed by default. You can follow this article which explains how to do in detail. This is the best protocol if you want to communicate with Node-RED for example (a sample application).

PiDome: MQTT

PiDome is still a very young project. There may still be malfunctions.

Online services: EmonCMS, ThingSpeak

The online services EmonCMS (energy consumption monitoring) and ThingSpeaks (data acquisition for connected objects) are natively supported by ES Easy. You must have a key (API-KEY) after registration free of charge to the service. Be sure to limit the time to send messages to 15000 (Tools / Advanced) for ThingSpeak.

Generic HTTP and Generic UDP

If your preferred software or online service is not listed, these two protocols allow you to communicate generically in HTTP or UDP. However, the HTTP Generic protocol is limited to sending data (the protocol does not work in reception) for the following types only SENSOR_TYPE_DIMMER, SENSOR_TYPE_LONG, SENSOR_TYPE_DUAL, SENSOR_TYPE_TRIPLE. The use of this protocol is therefore still very limited. I advise you rather to fall back on MQTT.

This is the protocol you can use to communicate with Jeedom. Read this article that explains how to create a remote display using an OLED screen to display weather forecast for example.

Other home automation software

It is not because they are not in the list (Jeedom, Home Assistant …) that one can not communicate with ESP Easy. For example, you can go to a Domoticz MQTT database and customize the MQTT topics in the Tools / Advanced page.

For example, for Home Assistant, I found this configuration on the project forum.

- platform: mqtt
  name: "Switch"
  state_topic: "WemosD1/gpio/5/state"
  command_topic: "WemosD1/gpio/5/set"
  payload_on: "1.0"
  payload_off: "0.0"
  optimistic: true
  qos: 0
  retain: true
  value_template: '{{ value.x }}'

Configuring a Device

Now that you know a lot of the features of ESP Easy, we’ll be able to configure a device. Go to the Device page. Up to 12 devices can be configured. They are grouped by 4. We move from one page to another using the blue arrows.

If you find that 12 devices are not enough, you can opt for I2C sensors or actuators.

For this tutorial, we will recover the temperature and atmospheric pressure measurement returned by a BMP180. The BMP180 communicates with the ESP8266 via the I2C protocol. By default, the SDA pin must be connected to the GPIO-4 (D6 on the Wemos D1 Mini) and the SCL pin to the GPIO-5 (D7 on the Wemos). Go to Tools then scan the I2C bus to find the address of the sensor. In my case it is at address 0x77.

Click Edit in the-  first box.

From the Device list, choose Temperature & Pressure – BMP085. There is (almost) always an online help for the selected material. Then:

The BMP180 is the replacement for the BMP085. Its operation is identical.

Summary calculations (eg, unit conversion) can be performed for each value returned by the sensor. The variable containing the value to be manipulated must be enclosed by%. Note, however, that we are limited to simple operators (+; -; /; -) and it is not possible to retrieve the value of one field for use in another.

Return to the Devices (Close) page. You should have your first steps. Refresh the page if it is not. If nothing is displayed, check that the IDX is not 0.

So, creating a digital barometer and sending the measurements online or on a home automation server is as simple as that!

Supported by ESPEasy

In the R120 version, ESPEasy supports the following hardware.

Warning. Technical specifications. Check the characteristics of your equipment before use.

Sensors, analog or digital inputs

Pulse counter
  • TCR5000
Temperature
Barometer
  • BMP085/BMP180  : temperature from -40 to + 85°C, atmospheric pressure from 300 to 1100hPa
  • BME280 : temperature from -40 to + 85°C, humidity from 0 to 100%, atmospheric pressure from 300 to 1100 hPa
  • BMP280 : temperature from -40 to + 85°C, atmospheric pressure from 300 to 1100 hPa
  • MS5611
Luminosity
  • BH1750 : from 0 to 65535 lux, 16 bits.
  • TSL2561 : from 188 μLux to 88000 lux
Temperature and Humidity
  RFID
Distance
Switchs
ESP8266 analog input
External analog input
Digital inputs
Infrared receiver
Dust
  • GP2Y10 : size from 0,8µm. 0.5V for 0.1mg/m3.
Tension and Intensity

Be careful to respect the characteristics of your sensor before any connection. You are responsible for any deterioration of your equipment. Caution, handling power is dangerous for your health. Do not make any connections if you do not have the skills
  • INA219 : I2C, 0 to 26V, 3.2A max.

Actuators, screens

ESP8266 Numerical output : Led, servo, relais
More numerical outputs
PWM
  • PCA9685 : I2C, 16 chanels 12 bits
Display

ESP Easy compatible sensors and actuators offers

Conclusions

ESP Easy is a very powerful and very easy to use firmware. If you start (and even if you do not start), you may wonder why you should use your Arduino code editor. For small connected objects (sensors, actuators …) intended for home automation, ESP Easy will do wonders effortlessly. The other great force and its web interface which allows to do everything without having to have physical access to the ESP8266 to reprogram it (the update in the air is not yet so simple). The other major novelty of the R120 and the possibility of creating rules (Rules) which will allow to create small independent automatons, virtually a mini home automation server.

However, ESP Easy is limited to the list of sensors and actuators offered by the firmware. If your hardware is not in the list, it will take a little tinkering … or change the firmware from the source code, but here we move away from the project easy to implement!

 

Click to rate this post!
[Total: 0 Average: 0]
Exit mobile version