Hardware testing

We often do not have this board ourselves. Community testing helps establish what actually works. A successful report is evidence for the maintainer to review, not an automatic compatibility claim.

Board details & configuration
Model
CrowPanel 2.1inch-HMI ESP32 Rotary Display 480*480 IPS Round Touch Knob Screen
Chip, RAM and flash
ESP32-S3
Display and touch
Rotary Display 480*480 IPS Round Touch
Already tried
Have it running in HA ESP32 Builder, but making changes is not easy. I've attached a working config from HA
Configuration status
working
View shared configuration
substitutions:
  # ---- Lampen: naam op het scherm, entity-ID en dimbaar (true/false) ----
  n0: "Woonkamer"
  l0: "light.woonkamer_lamp_woonkamer_lamp"
  d0: "true"
  n1: "Leeslamp"
  l1: "light.leeslamp_woonkamer_leeslamp_woonkamer"
  d1: "true"
  n2: "Eettafel"
  l2: "light.eettafel_lamp_eettafel_lamp"
  d2: "true"
  n3: "Keuken"
  l3: "light.keuken_verlichting_keuken_verlichting"
  d3: "true"
  n4: "Keuken LED"
  l4: "switch.keuken_led_verlichting_aangezet"
  d4: "false"
  n5: "Kast LED"
  l5: "switch.kast_led_verlichting_aangezet"
  d5: "false"

esphome:
  name: 21-lvgl-interface
  friendly_name: 2.1_LVGL_Interface
  platformio_options:
    build_flags: "-DBOARD_HAS_PSRAM"
    board_build.esp-idf.memory_type: qio_opi
    board_build.flash_mode: dio

  on_boot:
    priority: 800
    then:
      - output.turn_on: lcd_power
      - output.turn_on: display_reset
      - delay: 100ms
      - output.turn_off: display_reset
      - delay: 100ms
      - delay: 500ms
      - light.turn_on:
          id: display_backlight
          brightness: 0.5
      - lambda: |-
          id(encoder_ready) = false;
          id(knob).publish_state(0);
      - delay: 200ms
      - lambda: |-
          id(encoder_ready) = true;
      # Start de timer voor automatisch uit
      - script.execute: backlight_timer

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
      CONFIG_ESP32S3_DATA_CACHE_64KB: y
      CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
      CONFIG_SPIRAM_RODATA: y

psram:
  mode: octal
  speed: 80MHz

logger:
  level: DEBUG

api:
  encryption:
    key: "*************"

ota:
  - platform: esphome
    encryption:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "21-Lvgl-Interface"
    password: "**********"

captive_portal:

i2c:
  sda: GPIO38
  scl: GPIO39
  id: bus_a
  scan: true

pcf8574:
  - id: pcf
    address: 0x21

output:
  - platform: ledc
    pin: 6
    id: bl_pwm
    frequency: 19531Hz

  - platform: gpio
    id: lcd_power
    pin:
      pcf8574: pcf
      number: 3
      mode:
        output: true
      inverted: false

  - platform: gpio
    id: display_reset
    pin:
      pcf8574: pcf
      number: 4
      mode:
        output: true
      inverted: true

light:
  - platform: monochromatic
    name: "LCD Backlight"
    output: bl_pwm
    id: display_backlight
    default_transition_length: 0s
    restore_mode: ALWAYS_ON

font:
  - file: "gfonts://Montserrat"
    id: montserrat_25
    size: 25
  - file: "gfonts://Montserrat"
    id: montserrat_50
    size: 50
  - file: "gfonts://Montserrat"
    id: montserrat_14
    size: 14
  - file: "gfonts://Montserrat"
    id: montserrat_12
    size: 12

spi:
  clk_pin: 2
  mosi_pin: 1

display:
  - platform: st7701s
    id: my_display
    update_interval: 50ms
    spi_mode: MODE3
    color_order: RGB
    invert_colors: false
    dimensions:
      width: 480
      height: 480
    cs_pin: 16
    de_pin: 40
    hsync_pin: 15
    vsync_pin: 7
    pclk_pin: 41
    data_pins:
      red: [46, 3, 8, 18, 17]
      green: [14, 13, 12, 11, 10, 9]
      blue: [5, 45, 48, 47, 21]
    hsync_front_porch: 20
    hsync_pulse_width: 10
    hsync_back_porch: 10
    vsync_front_porch: 8
    vsync_pulse_width: 10
    vsync_back_porch: 10
    show_test_card: false
    pclk_frequency: 18MHz
    pclk_inverted: true
    init_sequence:
      - [0x01]
      - delay 120ms
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10]
      - [0xC0, 0x3B, 0x00]
      - [0xC1, 0x0B, 0x02]
      - [0xC2, 0x00, 0x02]
      - [0xCC, 0x10]
      - [0xCD, 0x08]
      - [0xB0, 0x02, 0x13, 0x1B, 0x0D, 0x10, 0x05, 0x08, 0x07, 0x07, 0x24, 0x04, 0x11, 0x0E, 0x2C, 0x33, 0x1D]
      - [0xB1, 0x05, 0x13, 0x1B, 0x0D, 0x11, 0x05, 0x08, 0x07, 0x07, 0x24, 0x04, 0x11, 0x0E, 0x2C, 0x33, 0x1D]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x11]
      - [0xB0, 0x5d]
      - [0xB1, 0x43]
      - [0xB2, 0x81]
      - [0xB3, 0x80]
      - [0xB5, 0x43]
      - [0xB7, 0x85]
      - [0xB8, 0x20]
      - [0xC1, 0x78]
      - [0xC2, 0x78]
      - [0xD0, 0x88]
      - [0xE0, 0x00, 0x00, 0x02]
      - [0xE1, 0x03, 0xA0, 0x00, 0x00, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x20, 0x20]
      - [0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
      - [0xE3, 0x00, 0x00, 0x11, 0x00]
      - [0xE4, 0x22, 0x00]
      - [0xE5, 0x05, 0xEC, 0xA0, 0xA0, 0x07, 0xEE, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
      - [0xE6, 0x00, 0x00, 0x11, 0x00]
      - [0xE7, 0x22, 0x00]
      - [0xE8, 0x06, 0xED, 0xA0, 0xA0, 0x08, 0xEF, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
      - [0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00]
      - [0xEd, 0xFF, 0xFF, 0xFF, 0xBA, 0x0A, 0xBF, 0x45, 0xFF, 0xFF, 0x54, 0xFB, 0xA0, 0xAB, 0xFF, 0xFF, 0xFF]
      - [0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x13]
      - [0xEF, 0x08]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x00]
      - [0x36, 0x08]
      - [0x3A, 0x60]
      - [0x11]
      - delay 100ms
      - [0x29]
      - delay 50ms

touchscreen:
  - platform: cst816
    id: touch
    display: my_display
    address: 0x15
    reset_pin:
      pcf8574: pcf
      number: 0
    # Aanraking zet het scherm aan en verlengt de timer
    on_touch:
      - script.execute: backlight_timer

# Klok van Home Assistant (voor de begroeting en tijd in het menu)
time:
  - platform: homeassistant
    id: ha_time
    on_time_sync:
      - script.execute: update_clock
    on_time:
      - cron: "0 * * * * *"
        then:
          - script.execute: update_clock

globals:
  - id: encoder_ready
    type: bool
    restore_value: false
    initial_value: "false"
  # Actieve pagina: 0 = Menu, 1 = Warmtepomp, 2 = Lamp bedienen, 3 = Auto, 4 = Slapen, 5 = Lampenlijst
  - id: cur_page
    type: int
    restore_value: false
    initial_value: "0"
  # Licht: geselecteerde lamp (0 t/m 5)
  - id: sel
    type: int
    restore_value: false
    initial_value: "0"
  # Per lamp: helderheid in % en aan/uit (6 lampen)
  - id: lamp_pct
    type: int[6]
    restore_value: false
    initial_value: '{50, 50, 50, 50, 50, 50}'
  - id: lamp_on
    type: bool[6]
    restore_value: false
    initial_value: '{false, false, false, false, false, false}'
  # Auto laden
  - id: car_live
    type: float
    restore_value: false
    initial_value: "0"
  - id: car_soc
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: car_kw
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: car_amp
    type: float
    restore_value: false
    initial_value: "NAN"
  # Warmtepomp (Altherma): -1 = onbekend, 0 = nee/uit, 1 = ja/aan
  - id: alt_boiler
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: alt_flow
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: alt_room
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: alt_out
    type: float
    restore_value: false
    initial_value: "NAN"
  - id: alt_heat
    type: int
    restore_value: false
    initial_value: "-1"
  - id: alt_dhw
    type: int
    restore_value: false
    initial_value: "-1"

script:
  # ---------- Scherm: aan bij beweging of aanraking, uit na 60 seconden ----------
  # Blijft aan zolang minstens een presence-sensor beweging ziet.
  - id: backlight_timer
    mode: restart
    then:
      - if:
          condition:
            light.is_off: display_backlight
          then:
            - light.turn_on: display_backlight
      - delay: 60s
      - if:
          condition:
            not:
              or:
                - binary_sensor.is_on: ha_pres1
                - binary_sensor.is_on: ha_pres2
          then:
            - lvgl.page.show:
                id: page_menu
                animation: NONE
                time: 0ms
            - light.turn_off: display_backlight

  # ---------- Menu: klok en begroeting ----------
  - id: update_clock
    then:
      - lvgl.label.update:
          id: lbl_time
          text: !lambda |-
            auto t = id(ha_time).now();
            if (!t.is_valid()) return std::string("--:--");
            return t.strftime("%H:%M");
      - lvgl.label.update:
          id: lbl_greet
          text: !lambda |-
            auto t = id(ha_time).now();
            if (!t.is_valid()) return std::string("Welkom");
            if (t.hour < 6) return std::string("Goedenacht");
            if (t.hour < 12) return std::string("Goedemorgen");
            if (t.hour < 18) return std::string("Goedemiddag");
            return std::string("Goedenavond");

  # ---------- Menu: waarden in de tegels ----------
  - id: update_menu
    then:
      - lvgl.label.update:
          id: lbl_m_alt_boiler
          text: !lambda |-
            if (isnan(id(alt_boiler))) return std::string("--");
            char buf[16];
            snprintf(buf, sizeof(buf), "%.1fΒ°", id(alt_boiler));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_m_alt_room
          text: !lambda |-
            if (isnan(id(alt_room))) return std::string("--");
            char buf[16];
            snprintf(buf, sizeof(buf), "%.1fΒ°", id(alt_room));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_m_licht
          text: !lambda |-
            int n = 0;
            for (int i = 0; i < 6; i++) if (id(lamp_on)[i]) n++;
            return std::to_string(n) + "/6";
      - lvgl.label.update:
          id: lbl_m_car
          text: !lambda |-
            if (isnan(id(car_soc))) return std::string("--");
            char buf[16];
            snprintf(buf, sizeof(buf), "%d%%", (int) roundf(id(car_soc)));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_m_car_sub
          text: !lambda |-
            if (isnan(id(car_kw))) return std::string("--");
            if (id(car_kw) < 0.2f) return std::string("niet laden");
            char buf[24];
            snprintf(buf, sizeof(buf), "%.1f kW laden", id(car_kw));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_m_out
          text: !lambda |-
            if (isnan(id(alt_out))) return std::string("Buiten --");
            char buf[24];
            snprintf(buf, sizeof(buf), "Buiten %.1fΒ°C", id(alt_out));
            return std::string(buf);

  # ---------- Lampenlijst: naam + status per tegel ----------
  - id: update_tiles
    then:
      - lvgl.label.update:
          id: lbl_t0
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[0] ? (D[0] ? std::to_string(id(lamp_pct)[0]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n0}") + "\n" + s;
      - lvgl.widget.update:
          id: tile0
          state:
            checked: !lambda 'return id(lamp_on)[0];'
      - lvgl.label.update:
          id: lbl_t1
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[1] ? (D[1] ? std::to_string(id(lamp_pct)[1]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n1}") + "\n" + s;
      - lvgl.widget.update:
          id: tile1
          state:
            checked: !lambda 'return id(lamp_on)[1];'
      - lvgl.label.update:
          id: lbl_t2
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[2] ? (D[2] ? std::to_string(id(lamp_pct)[2]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n2}") + "\n" + s;
      - lvgl.widget.update:
          id: tile2
          state:
            checked: !lambda 'return id(lamp_on)[2];'
      - lvgl.label.update:
          id: lbl_t3
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[3] ? (D[3] ? std::to_string(id(lamp_pct)[3]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n3}") + "\n" + s;
      - lvgl.widget.update:
          id: tile3
          state:
            checked: !lambda 'return id(lamp_on)[3];'
      - lvgl.label.update:
          id: lbl_t4
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[4] ? (D[4] ? std::to_string(id(lamp_pct)[4]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n4}") + "\n" + s;
      - lvgl.widget.update:
          id: tile4
          state:
            checked: !lambda 'return id(lamp_on)[4];'
      - lvgl.label.update:
          id: lbl_t5
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            std::string s = id(lamp_on)[5] ? (D[5] ? std::to_string(id(lamp_pct)[5]) + "%" : std::string("AAN")) : std::string("UIT");
            return std::string("${n5}") + "\n" + s;
      - lvgl.widget.update:
          id: tile5
          state:
            checked: !lambda 'return id(lamp_on)[5];'

  # ---------- Licht ----------
  - id: refresh_ui
    then:
      - lvgl.label.update:
          id: lbl_name
          text: !lambda |-
            static const char* const N[] = {"${n0}", "${n1}", "${n2}", "${n3}", "${n4}", "${n5}"};
            return std::string(N[id(sel)]);
      # Dimboog alleen tonen bij dimbare lampen
      - if:
          condition:
            lambda: |-
              static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
              return D[id(sel)];
          then:
            - lvgl.widget.show: arc_brightness
          else:
            - lvgl.widget.hide: arc_brightness
      - lvgl.arc.update:
          id: arc_brightness
          value: !lambda 'return id(lamp_pct)[id(sel)];'
      - lvgl.label.update:
          id: lbl_brightness
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            if (!D[id(sel)]) return std::string(id(lamp_on)[id(sel)] ? "AAN" : "UIT");
            return std::to_string(id(lamp_pct)[id(sel)]) + "%";
      - lvgl.label.update:
          id: lbl_toggle
          text: !lambda |-
            static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
            bool on = id(lamp_on)[id(sel)];
            if (!D[id(sel)]) return std::string(on ? "Uitzetten" : "Aanzetten");
            return std::string(on ? "AAN" : "UIT");
      - script.execute: update_tiles
      - script.execute: update_menu

  - id: toggle_sel
    then:
      - homeassistant.action:
          action: homeassistant.toggle
          data:
            entity_id: !lambda |-
              static const char* const L[] = {"${l0}", "${l1}", "${l2}", "${l3}", "${l4}", "${l5}"};
              return std::string(L[id(sel)]);

  - id: dim_sel
    parameters:
      delta: int
    then:
      # Niet-dimbare lampen negeren
      - if:
          condition:
            lambda: |-
              static const bool D[] = {${d0}, ${d1}, ${d2}, ${d3}, ${d4}, ${d5}};
              return !D[id(sel)];
          then:
            - script.stop: dim_sel
      - lambda: |-
          int &p = id(lamp_pct)[id(sel)];
          p = std::max(1, std::min(100, p + delta));
      - script.execute: refresh_ui
      - homeassistant.action:
          action: light.turn_on
          data:
            entity_id: !lambda |-
              static const char* const L[] = {"${l0}", "${l1}", "${l2}", "${l3}", "${l4}", "${l5}"};
              return std::string(L[id(sel)]);
            brightness_pct: !lambda |-
              return std::to_string(id(lamp_pct)[id(sel)]);

  # ---------- Auto laden ----------
  - id: update_car
    then:
      - lvgl.arc.update:
          id: arc_car
          value: !lambda |-
            if (isnan(id(car_soc))) return 0;
            return (int) std::max(0.0f, std::min(100.0f, id(car_soc)));
      - lvgl.label.update:
          id: lbl_car_pct
          text: !lambda |-
            char buf[16];
            if (isnan(id(car_soc))) snprintf(buf, sizeof(buf), "%.1f", id(car_live));
            else snprintf(buf, sizeof(buf), "%d%%", (int) roundf(id(car_soc)));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_car_kw
          text: !lambda |-
            char a[12];
            char b[12];
            if (isnan(id(car_kw))) snprintf(a, sizeof(a), "--");
            else snprintf(a, sizeof(a), "%.1f", id(car_kw));
            if (isnan(id(car_amp))) snprintf(b, sizeof(b), "--");
            else snprintf(b, sizeof(b), "%.1f", id(car_amp));
            return std::string(a) + " kW   " + std::string(b) + " A";
      - lvgl.label.update:
          id: lbl_car_detail
          text: !lambda |-
            char buf[40];
            if (isnan(id(car_soc))) snprintf(buf, sizeof(buf), "kWh geladen");
            else snprintf(buf, sizeof(buf), "%.1f kWh geladen", id(car_live));
            return std::string(buf);
      - script.execute: update_menu

  # ---------- Warmtepomp ----------
  - id: update_alt
    then:
      - lvgl.label.update:
          id: lbl_alt_boiler
          text: !lambda |-
            if (isnan(id(alt_boiler))) return std::string("--");
            char buf[16];
            snprintf(buf, sizeof(buf), "%.1f", id(alt_boiler));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_alt_room
          text: !lambda |-
            if (isnan(id(alt_room))) return std::string("--");
            char buf[16];
            snprintf(buf, sizeof(buf), "%.1f", id(alt_room));
            return std::string(buf);
      - lvgl.label.update:
          id: lbl_alt_heat
          text: !lambda |-
            if (id(alt_heat) < 0) return std::string("Verwarming: --");
            return std::string(id(alt_heat) == 1 ? "Verwarming: AAN" : "Verwarming: UIT");
      - lvgl.label.update:
          id: lbl_alt_dhw
          text: !lambda |-
            if (id(alt_dhw) < 0) return std::string("Warmwater: --");
            return std::string(id(alt_dhw) == 1 ? "Warmwater: AAN" : "Warmwater: UIT");
      - lvgl.label.update:
          id: lbl_alt_flow
          text: !lambda |-
            if (isnan(id(alt_flow))) return std::string("Flow: --");
            char buf[24];
            snprintf(buf, sizeof(buf), "Flow: %.1f l/min", id(alt_flow));
            return std::string(buf);
      - script.execute: update_menu

binary_sensor:
  # Aanwezigheid in de woonkamer: een van beide zet het scherm aan
  - platform: homeassistant
    id: ha_pres1
    entity_id: binary_sensor.presense_sensor_presence
    on_press:
      - script.execute: backlight_timer
    on_release:
      - script.execute: backlight_timer
  - platform: homeassistant
    id: ha_pres2
    entity_id: binary_sensor.presense_sensor_2_presence
    on_press:
      - script.execute: backlight_timer
    on_release:
      - script.execute: backlight_timer

  # Aan/uit-status van de lampen uit Home Assistant
  - platform: homeassistant
    id: ha_on0
    entity_id: ${l0}
    on_state:
      - lambda: 'id(lamp_on)[0] = x;'
      - script.execute: refresh_ui
  - platform: homeassistant
    id: ha_on1
    entity_id: ${l1}
    on_state:
      - lambda: 'id(lamp_on)[1] = x;'
      - script.execute: refresh_ui
  - platform: homeassistant
    id: ha_on2
    entity_id: ${l2}
    on_state:
      - lambda: 'id(lamp_on)[2] = x;'
      - script.execute: refresh_ui
  - platform: homeassistant
    id: ha_on3
    entity_id: ${l3}
    on_state:
      - lambda: 'id(lamp_on)[3] = x;'
      - script.execute: refresh_ui
  - platform: homeassistant
    id: ha_on4
    entity_id: ${l4}
    on_state:
      - lambda: 'id(lamp_on)[4] = x;'
      - script.execute: refresh_ui
  - platform: homeassistant
    id: ha_on5
    entity_id: ${l5}
    on_state:
      - la

1 owner has volunteered to test.

Sign in to volunteer

Discussion 0

Add a comment

Start the conversation

Share an example, ask a question or explain how you would use this.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images Β· URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.