Custom Display

Hi all,

I’m new to ESPHome and quite impressed what it can do. Many thanks at this point to all contributors.

After doing my first steps I want to integrate one display which I have here into ESPHome: W082XLG

I tried to create a clone of the existing LCD integration and then add it via a custom include. The basis config in the yaml was as well the LCD example. Unfortunately I cannot use that module. It is not recognized as Plattform custom nore the name I gave it.

Is this mechanism not possible for displays?

Any idea? Did anyone already create custom displays?

Meinereiner

You give no actual clue as to what you have coded. Too vague.

You are right, here some more detailed information:

On the ESP8266 I already had this display running without ESPHome by using this code as a basis: https://www.lcd-module.de/fileadmin/html-seiten/deu/disk/development_service/Arduino/EA_Wxxx-XLG%20%20OLED%20textseries.zip

So I thought I take the existing LCD code as a reference:

Anyway, what I did is copying the folder from the link before in my config folder, renamed it accordingly:
esphome-configs/lcd_W082-XLG/
→ display.py
init.py
→ w082xlg_display.cpp
→ w082xlg_display.h

Then I integrated the entire folder:

esphome:
...
  includes:
      - lcd_W082-XLG

The is no difference when I directly link the .h file.
Then I tried to add it as a display:

display:
  - platform: lcd_w082xlg
    dimensions: 8x2
    lambda: |-
      it.print("Hello World!");

The class is called :

class W082xlgLCDDisplay : public lcd_base::LCDDisplay, public spi::SPIDevice {
...

The implementation is tagged with:

static const char *const TAG = "lcd_w082xlg";

When I try to compile I get the error that the platform is not found:

  Platform not found: 'display.lcd_w082xlg'.
  platform: lcd_w082xlg
  dimensions: 8x2
  lambda: it.print("Hello World!");

Where do I need to place the display implementation that it is found by the esphome compilation process?

Did you ever get this worked out? I would like to test a different display as well.

Hi,

Partly :slight_smile: I was able to create a custom display but I didn’t get it working with the internal SPI. The original example code was using a custom SPI implementation that did the job.

BUT: first I was doing it on an esp8266 where it was working like a charm, on an ESP32 it was constantly failing and only showing rubbish. This is why I replaced it :confused:

1 Like

Hi. Where did you end up pacing the files so it resolved your platform not found issue?

Unfortunately I was not able to recover the code as I gave up this display. It was not running stable due to the emulated SPI.
But as far as I remember I was using the full path to get it properly building …

Hope this helps!