Inkplate 6, ESPHome

Looks cool. Congrats.

You find various approaches with the inkplate here in the forum. I looked for one where you can change content shown on the display without need for reprogramming the ESP.

I found a way to display any Lovelace dashboard on the Inkplate. Doing so anyone who can build a dashboard via UI can create a compelling view on the inkplate.

Mine is running for 3 weeks now on the 1st battery charge with update every 5 minutes.

What I miss is having my code integrated into ESPHome to be able to get the easy integration for the buttons, see battery consumption etc. I tried, but failed so far.

A question.
Isn’t there a way to make a dictionary/associative array/key value pair with the images in ESP-Home?

Example:

["fog": "wpng_3"] 

That way you don’t need the large if section in the lambda, you can just use array[weather].

I’m about to start a project with a screen also soon and it would be nice to have that ability.

Thank you for your input, I will be playing around with that. Thinking about buying an other inkplate just for playing around with. Lovelace UI in inkplate sounds very nice.

Hi Echo, looks good! Just received my Inkplate6 and have been fiddling around with it, using part of your code. I’m having trouble displaying the weather icons correctly. I found some color icons which display ok, but only as a filled icon, and I would like to show only the outlines (as in your example). So I retrieved several sets of weather icons in b/w, only outlines, but if I replace the color icons with any of them they show up as squares and sometimes the icon is visible inside the square but filled and in negative. I checked the icons in photoshop for size, resolution, nr of bits/channel, all seems ok. Are there any specifications for using bitmaps on e-paper or the Inkplate specific that I missed?
And mind sharing your icons?
Thanks!

There is a font you can use.
Materialdesigns font, the same as all the HA icons use.
That way you create a sensor in HA with the weather, in my case i use something like 3-6;10.5;[rain icon] and in ESP this string is split and produce the output:

And then I have one sensor with five days weather that just have a second delimiter between the days, that way I can loop through the days and output it all fairly easy.

Hi Helllis81, the thought struck my mind earlier but I was afraid that the size/resolution of those fonts would be to grainy for a large icon, so I did not look into that. Great, will give it a try, am already using materialdesigns fonts on a smaller e-paper display so I know how to implement them.
Thanks!

This should almost certainly solve my problem for showing weather icons, but I’m still curious about the specs for bitmaps to show correctly on the inkplate display (or waveshare e-paper displays).

My display is not the six inch. The image is only on a 2.9 inch.
But you could try the font and see what it looks like.

My icons are 8bit grayscale .png, inverted black and white.
I’m not happy with my icons yet, need to do some pixel adjustments.

I think you have to play around with the picture type

#0-default.png
  - file: "images/0-default.png"
    id: wpng_0
    type: BINARY

BINARY: Two colors, suitable for 1 color displays or 2 color image in color displays. Uses 1 bit per pixel, 8 pixels per byte.

GRAYSCALE: Full scale grey. Uses 8 bits per pixel, 1 pixel per byte.
0-default 1-clear-night 2-cloudy 3-fog 4-hail 5-lightning 6-lightning-rainy 7-partlycloudy 8-pouring 9-rainy 10-snowy 12-sunny 13-windy 14-windy-variant 15-exceptional
11-snowy-rainy

Hi Echo, yeah I also tried setting the picture type to grayscale, that did not solve my problem. Also tried converting the bitmaps from RGB 8bit to grayscale 8bit, did not work. But you have inverted the bitmaps, that’s interesting, did not try that yet. Just noticed inverted bitmaps are part of the image package, but this results in just a black square. I’ll take some time researching this, I must be missing something simple. The most amazing thing is that color bitmaps display without problems but as a filled b/w image instead of outlines. I would appreciate it if you can send me one of your bitmaps so I can test with that.
Will report back after my research later this day.

I will upload my icons.

Any updates on your project? Hows it looking now? Thanks

Yes. I had one update I forgot to post. Thank you for reminding me.

include/base.yaml

## Common settings.
wifi:
  ssid: !secret wifi_iot_ssid
  password: !secret wifi_iot_password
  power_save_mode: none
  reboot_timeout: 60min
  fast_connect: true

  ap:
    ssid: $friendly_name Fallback Hotspot
    password: !secret wifi_iot_password

captive_portal:
web_server:
  port: 80
  auth:
    username: admin
    password: !secret wifi_iot_password
  
logger:

api:
  password: !secret esphome_api_password

ota:
  password: !secret esphome_api_password

packages:
  switch: !include switch_reboot.yaml
  sensor: !include sensor_wifi_uptime.yaml
  text_sensor: !include text_sensor_wifi_uptime.yaml
  binary_sensor: !include binary_sensor_status.yaml

switch_reboot.yaml

switch:
  - platform: restart
    name: "$friendly_name Reboot"
    id: reboot

sensor_wifi_uptime.yaml

sensor:
  - platform: wifi_signal
    name: $friendly_name WiFi Strength
    update_interval: $update_slow

  - platform: uptime
    name: $friendly_name Uptime raw
    id: uptime_raw
    update_interval: $update_slow
    internal: true
    on_raw_value:
      then:
        - logger.log:
            format: "Raw Value of Uptime sensor: %f, %f"
            args: ['id(uptime_raw).raw_state', 'id(uptime_raw).state']
            level: INFO
        - text_sensor.template.publish:
            id: uptime_show
            state: !lambda |-
              int seconds = round(id(uptime_raw).raw_state);
              int days = seconds / (24 * 3600);
              seconds = seconds % (24 * 3600);
              int hours = seconds / 3600;
              seconds = seconds % 3600;
              int minutes = seconds /  60;
              seconds = seconds % 60;
              if ( days ) {
                return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
              } else if ( hours ) {
                return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
              } else if ( minutes ) {
                return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
              } else {
                return { (String(seconds) +"s").c_str() };
              }    

text_sensor_wifi_uptime.yaml

text_sensor:
  - platform: wifi_info
    ip_address:
      name: $friendly_name IP Address
      
  - platform: template
    name: $friendly_name Uptime
    id: uptime_show
    icon: mdi:timer-outline
    update_interval: $update_slow

binary_sensor_status.yaml

binary_sensor:
  - platform: status
    name: "$friendly_name Status"
    id: system_status

Hi, nice update thanks.

I expecting a inkplate6 tomorrow, excited to try out the pages functionality. Based on your code, adding additional id: page2 etc would it change to that page when you press the corresponding capacitive button?

Thanks

I did not find a good way to use the capacitive buttons with my case design, so I skipped them.
I soldered some buttons to the top pin-outs for the garage doors. The buttons are almost not visible but still easy to find with fingers. The page 2 and 3 is in planning stage. I’m planning to use page 1 for summer and page 2 for winter.

Which pins did you solder on for your buttons?

number: GPIO12 and number: GPIO13 in the upper part of the board.

Thanks for the reply.

I just got my Inkplate 6 today. Doing Partial refresh every second for a clock, I get grey horizonal lines slowly appearing. Is this normal? Is mine faulty?

Continuing the discussion from Inkplate 6, ESPHome:

It is normal. Because the screen is not whiped, the lines will be there, for every partial it gets fuzzier. I do partial for minimum of 30sec. For clock you need only 60sec update, skip the seconds. Full update whipes the wole screen and the picture is perfect.
If you want to partial update a picture you can try using one black, one white shifting 3-4 times before you posr the right picture.

I’ve been using waveshare displays and they don’t have the line issue, disappointed this does.
I got the pages changing with the capacitive button, quite smart.