ESP Easy: use connected objects DIY with Jeedom [Exclusive Guide]
we continue our series of articles on the firmware ESP Easy . In this article, we will learn how to integrate projects based in ESP8266 Jeedom . It is possible to recover from sensors (temperature, humidity, brightness,…) and measures to control actuators, for example a relay. There is nothing very complicated to integrate objects DIY ESP Easy based in Jeedom, just a few undocumented tips…
this tutorial was made with version 2.4.4 Jeedom.
– DIY projects (@projetsdiy) October 10, 2016
to do this tutorial, I used the previous project used to create a virtual barometer BME280 under Domoticz. For this tutorial, you will use only the BMP180 to get the measure of air pressure and temperature as well as a shield relay which will fly with a virtual button under Jeedom.
|component||pin||tracking Arduino||Equivalence ESP8266 (Wemos D1 mini)|
|OLED SSD1306 0.96″||VDC||5V||5V|
|Led WiFi activity||Pole +||GPIO-12||D6|
to access all of the settings, the best is to activate the expert mode before you begin.
internal Jeedom network configuration
before you can use the ESPeasy plugin, you have to configure the IP address of the internal access. Otherwise, the module will not work and worse still no error message says not to do.
in the first field, enter the IP address of your home automation box. For example 192.168.1.24. Do not change the port (80 by default) unless you have implemented a port forwarding (read article to find out how). Save the configuration and refresh the page. You must have the OK status before going any further.
install the plugin virtual
install the virtual plugin that will serve us to create a virtual command button to toggle the relay.
install and configure the plugin ESP Easy
now go in the management of plugins and install the ESPeasy plugin, which is located in the home automation protocol section. This plugin is free.
after installation, activate and initiate the installation of the dependencies by pressing raise . The operation lasts a few minutes (it is function of your equipment). Meanwhile, you can set up your ESP8266.
ESP Easy firmware does not support natively support Jeedom. This isn’t a problem, we’ll simply use the generic HTTP protocol.
in the configuration of the plugin, have has everything what need us:
- controller to enter ESPEasy IP. This is the IP address provided in the internal access previously. If the field is empty, it is that there is a problem in the configuration.
- port controller : it’s the 8121
- Publish template : sets the mask of sending data to Jeedom
accessing the interface of ESP Easy configuration and go to the Config page:
- Protocol : choose Generic HTTP
- Locate Controller : select Use IP address
- Controller IP : specify the IP address of the Jeedom box
- Controller Port : specify 8121
- save with submit
then go to the Tools page and Advanced . In the field Publish Template paste
device = % sysname % & taskid = % id % & cmd = % valname % & value = % value %
save with submit .
now the dependencies should be installed (status OK green). Launch the daemon and open the log Espeasy_node . If everything is correctly configured, you should begin to receive the first messages of the ESP8266.
note. The time of receipt of the first message will depend on time for update of the measures. To develop the configuration, set a delay of a few seconds (for example 5) the Delay of the Device on ESP Easy field.
as soon as you receive your first message, you can leave the configuration of the plugin ESPeasy.
press the green button inclusion Mode. According to the time of publication, Jeedom will detect new objects and add them to the list my espeasy . Each object will take the name that has been assigned in the name page Config . Click Mode inclusion to complete inclusion.
click the icon of the object to complete the configuration:
- set a object parent
- choose one category
- check activate and visible
- If your object can be associated with a specific category, choose here in the list of choices.
then go to the tab controls. There is an information command (Pressure and Temperature). Rename the command names in french and indicate the unit of measure. You can also enable the history of measures.
save the configuration and go to the dashboard to see the measures sent by your digital barometer.
you probably noticed but there is Subscribe template. To control actuators, going to therefore use a URL (like on Domoticz by the way). In this example, we’re going to turn a relay connected to the GPIO 16 (PIN D0 D1 Mini Wemos).
return to the configuration of the ESPeasy object and go to the tab controls then click on Add a command to action . Do two times to add two commands.
in the first line created, name IT. In the Task and Variable field paste gpio, 16, 1 . In the second line, give the OFF name and paste gpio, 16, 0.
turn off the display of the two commands and save.
in the value field, the plugin automatically created command recognized by ESP Easy URL.
you can test the relay activates and deactivates by pressing test .
create a command button virtual
go to Plugins-> programming-> virtual and then press Add.
choose a parent object, a class, select and make visible. Go to the Commands tab and add 2 comcontrols virtual.
for the first, name IT. In the value (upper field) field, click search equipment. Find the order to activate the relay (ON) as in this screenshot. Do the same for the extinction of the (OFF) relay command. You can test that the controls work well using the button test .
save and go to the dashboard.
you can now drive your relay since Jeedom, measures of all kinds, etc. without programming thanks to ESP Easy.