esphome / esphome/issues

waveshare_epaper driver 2.90inv2-r2 is displaying text from right to left

Open
#6,094 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
313
Forks
40
PR merge metrics
No merged PRs in 30d

Description

### The problem

Waveshare 2.9 version 2 rel 2.1 e-paper driven by ESP32 and using driver 2.90inv2-r2 is writing all text from right to left instead of left to right.

### Which version of ESPHome has the issue?

2024.7.2

### What type of installation are you using?

Docker

### Which version of Home Assistant has the issue?

2024.7.3

### What platform are you using?

ESP32

### Board

ESP32DEV

### Component causing the issue

Waveshare 2.9 inch e-Paper Module V2 rel 2.1

### Example YAML snippet

```yaml
substitutions:
api_key: "ol5BL0nEm35XD5kXwyeVaWfBNos4oMnStb5lcbkz55k="
device_entity_name: epaper
device_name: esphome_${device_entity_name}
device_wifi_name: esphome_${device_entity_name}_wifi
device_friendly_name: Esphome ${device_entity_name}
device_ip_address: 192.168.1.135
device_sampling_time: 120s
device_frequency: 40000Hz
light_transition_time_default: 1s

esphome:
name: ${device_entity_name}
friendly_name: ${device_friendly_name}

esp32:
board: esp32dev
framework:
type: arduino

font:
# gfonts://family[@weight]
- file: "gfonts://Roboto"
id: roboto_20
size: 20

- file:
type: gfonts
family: Roboto
weight: 900
id: roboto_16
size: 16

- file: "https://github.com/IdreesInc/Monocraft/releases/download/v3.0/Monocraft.ttf"
id: web_font
size: 20

- file:
url: "https://github.com/IdreesInc/Monocraft/releases/download/v3.0/Monocraft.ttf"
type: web
id: web_font2
size: 24
spi:
clk_pin: 26
mosi_pin: 25

logger:
#logs:
#sensor: INFO
#binary_sensor: INFO
#text_sensor: INFO

# Enable Home Assistant API
api:
reboot_timeout: 60min
encryption:
key: ${api_key}

ota:
platform: esphome
password: !secret ota_password

safe_mode:
reboot_timeout: 10min
num_attempts: 5

wifi:
fast_connect: True
ssid: !secret wifi_ssid
password: !secret wifi_password

manual_ip:
static_ip: ${device_ip_address}
gateway: 192.168.1.1
subnet: 255.255.255.0
ap:
ssid: ${device_wifi_name}
password: !secret wifi_password

web_server:
port: 80
auth:
username: !secret web_server_user
password: !secret web_server_password

time:
- platform: homeassistant
id: time_homeassistant

captive_portal:

binary_sensor:
- platform: status
name: status
id: ${device_name}_status

one_wire:
- platform: gpio
pin: 32

display:
- platform: waveshare_epaper
cs_pin: 27
dc_pin: 14
# busy_pin: D4
reset_pin: 12
model: 2.90inv2-r2
# model: 2.90inv2
full_update_every: 100
update_interval: 10s
reset_duration: 2ms
rotation: 90°
lambda: |-
it.printf(150, 6, id(roboto_20), TextAlign::TOP_CENTER, "%s", "Hello World!");
it.strftime(150, 116, id(roboto_20), TextAlign::BOTTOM_CENTER, "%Y-%m-%d %H:%M:%S", id(time_homeassistant).now());

switch:
- platform: gpio
name: "Onboard LED"
pin: 2
inverted: False

output:

light:

sensor:
- platform: uptime
name: uptime

- platform: wifi_signal
name: senseur_signal_wifi
update_interval: ${device_sampling_time}
```

### Anything in the logs that might be useful for us?

```txt
Had those repeating messages depending on some settings:
[16:22:43] [Wl [component: 2371: Component display took a long time for an operation (52 ms).
[16:22:431 [Wl [component: 238]: Components should block for at most 30 ms.
[16:22:531 [Wl [component: 2371: Component display took a long time
for an operation (51 ms).
[16:22:531 [Wl [component: 238]: Components should block for at most 30 ms.
```

### Additional information

![IMG_1600](https://github.com/user-attachments/assets/b53404da-eec5-40f5-8a8b-f02ecfd88a71)

I tried the other drivers (ex: 2.90inv2) and the text was OK but got scrambled at the refresh time.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.