Lanbon L8 Smart Switch Panel

esp32 global Comes with ESPHome misc
Lanbon L8 Smart Switch Panel - lanbon-l8-eu-black.png
Lanbon L8 Smart Switch Panel - lanbon-l8-us-white.png

Drivers

  • Processor: ESP32-WROVER-B
  • Touchscreen: 6336
  • Display: ST7789 (using ili9xxxx plaform)

GPIO Pinout

SPI (used for display)

PinFunction
GPIO19clock
GPIO23mosi
GPIO25miso
GPIO22cs
GPIO21dc
GPIO18reset

I²C (used for touchscreen)

PinFunction
GPIO4i2c SDA
GPIO0i2c SCL

Backlight

PinFunction
GPIO5backlight

Mood Light

PinFunction
GPIO26red
GPIO32green
GPIO33blue

Relay (3-gang switch model)

PinFunction
GPIO12relay #1
GPIO14relay #2
GPIO27relay #3

How To Flash

See BlackAdder’s instruction on how to flash custom firmware. No soldering required.

Example Configuration

psram:
  mode: octal
  speed: 80MHz
output:
  - platform: ledc
    pin: GPIO5
    id: backlight_pwm
  - platform: ledc
    pin: GPIO26
    id: moodRed
  - platform: ledc
    pin: GPIO32
    id: moodGreen
  - platform: ledc
    pin: GPIO33
    id: moodBlue
  - platform: gpio
    pin: GPIO12
    id: relay_1
  - platform: gpio
    pin: GPIO14
    id: relay_2
  - platform: gpio
    pin: GPIO27
    id: relay_3
light:
  - platform: rgb
    name: "Mood Light"
    red: moodRed
    green: moodGreen
    blue: moodBlue
  - platform: monochromatic
    name: "Backlight"
    id: backlight
    output: backlight_pwm
    restore_mode: ALWAYS_ON
spi:
  clk_pin: GPIO19
  mosi_pin: GPIO23
  miso_pin: GPIO25
i2c:
  sda: GPIO4
  scl: GPIO0
display:
  - id: langbon_L8
    platform: ili9xxx
    model: ST7789V
    invert_colors: false
    dimensions: 240x320
    cs_pin: GPIO22
    dc_pin: GPIO21
    reset_pin: GPIO18
    auto_clear_enabled: false
    update_interval: never
    rotation: 180
touchscreen:
  platform: ft63x6
  calibration:
    x_min: 0
    y_min: 0
    x_max: 230
    y_max: 312
  on_release:
    - if:
        condition: lvgl.is_paused
        then:
          - lvgl.resume:
          - lvgl.widget.redraw:
          - light.turn_on: backlight
lvgl:
  on_idle:
    timeout: !lambda "return 10000;"
    then:
      - light.turn_off: backlight
      - lvgl.pause:
  pages:
     ...