Inkplate 10 grayscale working for anybody?

Hi,
I’ve acquired the Inkplate 10, and I’m trying to get it working in greyscale mode. So far I’ve managed to get it working in binary mode, but greyscale eludes me.

Here is an black and white example:

esphome:
  name: inkplate-10-1
  friendly_name: inkplate_10-1

esp32:
  board: esp-wrover-kit

psram:
  mode: quad
  speed: 80MHz

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: REDACTED

ota:
  - platform: esphome
    password: REDACTED

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


captive_portal:

i2c:
      
time:
  - platform: pcf85063
    id: esptime
    # repeated synchronization is not necessary unless the external RTC
    # is much more accurate than the internal clock
    update_interval: never
  - platform: homeassistant
    # instead try to synchronize via network repeatedly ...
    on_time_sync:
      then:
        # ... and update the RTC when the synchronization was successful
        pcf85063.write_time:

pca6416a:
  - id: pca6416a_hub
    address: 0x20
    # Primary expander for display control and additional I/O
  - id: pca6416a_hub2
    address: 0x21
    # Secondary expander for additional I/O

switch:
  - platform: gpio
    id: battery_read_mosfet
    pin:
      pca6416a: pca6416a_hub
      number: 9

sensor:
  - platform: adc
    id: battery_voltage
    update_interval: never
    attenuation: 12db
    pin: 35
  - platform: template
    name: "Inkplate Battery Voltage"
    unit_of_measurement: "V"
    accuracy_decimals: 3
    lambda: |-
      // Enable MOSFET to connect battery voltage divider
      id(battery_read_mosfet).turn_on();
      // Wait for voltage to stabilize
      delay(5);
      // Sample ADC value
      float adc = id(battery_voltage).sample();
      // Disable MOSFET to save power
      id(battery_read_mosfet).turn_off();
      return adc;
    filters:
      - multiply: 2 # Compensate for voltage divider (1:2 ratio)


http_request:
  id: fetch_image_request
  verify_ssl: false
  useragent: esphome/seeed-studio-display-1
  timeout: 60s
  watchdog_timeout: 3min

online_image:
  - id: dashboard_image
    format: PNG
    type: BINARY
    url: http://REDACTED/dashboard-displays/inkplate10_1?viewport=1200x825&eink=2
    update_interval: 20min
    on_download_finished:
      - delay: 0ms
      - component.update: main_display

display:
  - platform: inkplate6
    id: main_display
    greyscale: false
    partial_updating: false
    update_interval: never
    model: inkplate_10
    lambda: |-
      it.image(0, 0, id(dashboard_image));

    ckv_pin: 32
    sph_pin: 33
    gmod_pin:
      pca6416a: pca6416a_hub
      number: 1
    gpio0_enable_pin:
      pca6416a: pca6416a_hub
      number: 8
    oe_pin:
      pca6416a: pca6416a_hub
      number: 0
    spv_pin:
      pca6416a: pca6416a_hub
      number: 2
    powerup_pin:
      pca6416a: pca6416a_hub
      number: 4
    wakeup_pin:
      pca6416a: pca6416a_hub
      number: 3
    vcom_pin:
      pca6416a: pca6416a_hub
      number: 5

What I have found on the WEB is that when setting “greyscale: true” I need to use full RGB online_image - which is true, using online_image as a grayscale makes it fail to load to the screen.

Maybe somebody have some nice trick to convert online_image from 24bit RGB to 3 bit grayscale (ie, 8 shades of gray from white to black) ?

Did you end up getting a solution to this?

nope.
It’s way more comlicated than in looks, I’ve started working on few fixes to esphome, but personal matters have slowed me down considerably.

Thanks for the update. I have an Inkplate 10 running Homeplate, but was looking to change to ESPHome but might hold off. The Seeed Studio 7.5" e ink I have also has issues with the grayscale option with bitmap files. There is another thread outlining issues with png images as well.

yeah, I’ve got seed studio 7.5" as well.
it seems that the displays on esphome are “not all that well”

Just looking at your code again as I’m still interested in getting this working and there is a slight typo.

display:
  - platform: inkplate6

There should be no 6 at the end of inkplate as per the documentation. It sure if this would change anything

Sooooooo - When I posted this, the platform was called inkplate6, regardless of subtype.
Your post made me try it again and I can report that:
online image binary and RGB are working to some extent (on that later), GRAYSCALE and RB565 are constantly exploding.
BINARY seem to be limited by amount of buffer it can allocare so binary for me works up to 800x460. RGB with PNG I’ve got working up to 1200x600 with inkplate grayscale mode enabled and I get half decent result, but still part of the screen is just wasted. After looking arround it seems that esp home messes something up and watchdog triggers because decoding takes tooo long (it takes about 5 seconds but it seems that other core is idle and this is why WDT triggers)