Inkplate 5 V2 display is vertically mirrored in ESPHome

I’m using an Inkplate 5 V2 with the Soldered ESPHome external component (GitHub - SolderedElectronics/Soldered-Inkplate-ESPHome: ESPHome external component for Inkplate e-paper SPI displays (Inkplate 2, 6 Color, 13 Spectra). · GitHub).

With rotation: 0, the characters are in the correct order, but the entire display is vertically mirrored/upside down. Using rotation: 180 does not solve the issue; instead, the text is mirrored along the X-axis.

My guess is that the framebuffer Y-axis is reversed and that transform: mirror_y: true would fix it, but transform is not supported by the external component.

Is there a known fix or recommended configuration for this when using the external component?

Hi @Ozwald

Thanks for letting us know, it has been fixed with the latest commit on GitHub. Let us know if you face any other issues.

Wow, that was fast, thanks for the fix! :smiley:
The vertical mirroring is gone. However, the display is still mirrored horizontally (text reads backwards) with the last character appearing first and each letter flipped left-to-right.

I managed to fixed it locally (with the help of Claude…) . The fix was to add a toggle that flips each pixels x-position before it is written to the buffer:

// inkplate.h — added a toggle
bool mirror_x_{false};
void set_mirror_x(bool m) { this->mirror_x_ = m; }

// inkplate.cpp — draw_absolute_pixel_internal()
if (this->mirror_x_) x = this->width_ - 1 - x;

Calling set_mirror_x(true) on boot resolved it for me.

Happy to test if there’s a patch to try!

On my end the board displays text correctly. Could you verify that you are running the correct board parameter? There are two Inkplate 5 boards supported, V1 and V2. Running V1 code on V2 will cause the text to be mirrored/flipped (and vice-versa, running V2 code on V1 will also cause the text to be flipped). Make sure your model key under display is set to inkplate5v2. You can also check in the examples.

It’s working now. Must have been something wrong at my end.

Changed:

external_components:
  - source:
      type: git
      url: https://github.com/SolderedElectronics/Soldered-Inkplate-ESPHome
      ref: main

to:

external_components:
  - source:
      type: git
      url: https://github.com/SolderedElectronics/Soldered-Inkplate-ESPHome.git
      ref: main

No idea why, maybe it forced the external component to reload or something.
Anyways, thank you for the great support! :smiley: