Jeedom: create a display OLED with ESP Easy (HTTP request) [Exclusive Guide]

1:50 am January 4, 20179577

in tutorial previous , we have seen how integrate into Jeedom (retrieve data and send commands) small Wi – Fi connected objects developed using the framework ESP Easy for the modules ESP8266 . In this tutorial, we will see how to make a small display using a screen OLED SSD1306 and an ESP8266 Wemos D1 Mini module (or any other module NodeMCU also).

for this tutorial, we are just going to use an OLED screen, but nothing prevents you to combine with other elements, for example a sensor of temperature DHT22 , a barometer BME280 or particle sensor in the atmosphere to achieve a miniature air quality Analyzer.

the OLED display connects to the I2C bus. By default these are pins 4 (SDA on D2) and 5 (SCL on D1) that are used. Installation is the same as the tutorial previous .

espeasy + dht22 + ssd1306 + bmp180

a time connected to ESP Easy, we will use the Generic HTTP protocol to communicate with Jeedom. Go to the Config page and fill in the fields according to your configuration:

  • 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

jeedom esp easy protocol generic

If you need to send data to Jeedom , go to the Tools page and Advanced . Dans le champ Publish Template collez

jeedom esp easy publish template

save with submit .

for the purpose of the tutorial, I used the weather module (free) for information to display on the OLED display.

jeedom plugin meteo

once installed, turn it on. You will need a free API key for personal use (and limited) on . Once this key for been recovered, go to the configuration of the plugin page and save it in the corresponding field. Save the configuration.

jeedom cle api openweathermap

turn on the weather plugin page and Add (+) a new place. OpenWeatherMap will return to Jeedom forecasts for the city shown in the field City . You can do a test by completing and then by entering this URL in a browser

which gives you for example (in JSON format)

 jeedom lieu meteo

Nous allons pouvoir récupérer la valeur de nombreuses informations envoyées par OpenWeatherMap , but we can send on the screen the value of any variable. Click on the gear (in expert mode) for a list of variables available for the weather plugin.

jeedom variables disponibles affichage oled espeasy

we will use the plugin Script available for free on the Market to directly control the OLED display.

jeedom plugin script espeasy http requete

activate the plugin at the end of the installation and return to the page of the plugin.

now, we can begin the serious stuff. Click on the + to create a new script. Give it a name, an object parent and turn it on. In the case of a display, we wish that the content is updated regularly. It is very simple to configure. Press it down? to the right of the field self-actualization (cron) .

jeedom auto-actualisation

a dialog box opens. In the selection list “A run”, choose repeatedly . Then choose the frequency desired in the list every [19[459008](minute, heure, jour, semaine; mois, année). Post

jeedom frequence actualisation affichage oled

now go to the tab control and add a new command.

before going any further, let’s start with how the plugin Easy ESP SSD1306 controls the display. ESP Easy retrieves HTTP requests (sent from a browser or server automation for example). The query is located after the slash (/) and begins by? cmd =. OLED command to trigger a display on the screen. It passes as a parameter the index of the column (one per character), the line and finally the text to display. On the other hand you can not specify the size of the display (if you are interested in writing new plugins, here are how to ).

to summarize, the HTTP request is of the following form:

http:// /control? cmd = oled, ,


  • row : display line
  • col : display column
  • text : text to display


  • he must first clear the screen ( clear ) before sending a new text (otherwise the old characters persist)
  • text will be displayed until the next Refresh ( Delay )

other commands available:

  • turn on the screen: http:// /control? cmd = oledcmd, we
  • turn off the screen: http:// /control? cmd = oledcmd, off
  • empty screen: http:// /control? cmd = oledcmd, clear

Configuration of the Jeddom script

Add a new order. We’ll start by creating a command that sending the command clear to clear the display. Here is how to configure the command:

jeedom script clear oled display esp easy

then add a command by display line. For example, let’s start by displaying a title

jeedom script titre oled display esp easy then the temperature, humidity and the prediction of the day. To recover the contents of a variable, put it between #. You can frame the value to a string. Careful however not to exceed 15 characters total.

jeedom script temperature oled display esp easy

save the script. It is run after each record. The OLED display is therefore updated immediately and then based on the frequency previously configured.

that is, you can now easily create small displays connected to Jeedom on which you can display what you want (weather, set to a thermostat, power consumption…).

jeedom affichage oled ssd1306 esp easy meteo