E-paper display

Just to update - I have made some progress and have published a case on thingiverse (https://www.thingiverse.com/thing:4692418) I have also commented my Yaml as it might be useful for those starting out with eink and esphome (below).

will do a proper guide in the new year :slight_smile:

esphome:
  name: 2incheink
  platform: ESP8266
  board: nodemcuv2
  
# Set up your wifi - I am using !secret to keep it more secure.  

wifi:
  ssid: !secret WIFI
  password: !secret WIFIPASS

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "2Incheink Fallback Hotspot"
    password: "e3d2h2WY9LL3"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api: 
  

ota:

  
# Configuration  - simply change the id's for the sensors you want to display

sensor:
  - platform: homeassistant
    id: outtemp
    entity_id: sensor.outdoor_temp
    icon: "mdi:thermometer"
    
  - platform: homeassistant
    id: outtempmin
    entity_id: sensor.outdoor_temp_min
    
  - platform: homeassistant
    id: outtempmax
    entity_id: sensor.outdoor_temp_max  
    
  - platform: homeassistant
    id: pressure
    entity_id: sensor.pressure
    
  - platform: homeassistant
    id: pressuremin
    entity_id: sensor.pressure_min
    
  - platform: homeassistant
    id: pressuremax
    entity_id: sensor.pressure_max
    
  - platform: homeassistant
    id: wind
    entity_id: sensor.wind 
    
  - platform: homeassistant
    id: rainvue
    entity_id: sensor.vue
    
text_sensor:

  - platform: homeassistant
    id: winddir
    entity_id: sensor.wind_dir    
    
  - platform: homeassistant
    id: conditionswd
    entity_id: sensor.conditionswd
    
  - platform: homeassistant
    name: forecast
    id: weather_forecast
    entity_id: sensor.forecast
    internal: true   
    
  - platform: homeassistant
    name: temptrend
    id: temptrend
    entity_id: sensor.temperature_trend
    internal: true      
      
# Various fonts - Icons and text at various sizes
# Icons are mapped to the code next to the Material Design Icons Preview.html (fonts need to be uploaded to the esphome folder)
# I am using Roboto-medium from Google Fonts


font:

  - file: 'materialdesignicons-webfont.ttf'
    id: icon_font_30
    size: 30
    glyphs:
      - "\U000F050F" # Temp
      - "\U000F029A" # Pressure
      - "\U000F15FA" # Wind
      - "\U000F058C" # Rain 
      - "\U000F0737" # Rising
      - "\U000F072E" # Falling
      
  - file: 'materialdesignicons-webfont.ttf'
    id: icon_font_10
    size: 20
    glyphs:
      - "\U000F0E02" # Tempmin
      - "\U000F0E03" # Tempmax
      
      
      
  - file: 'materialdesignicons-webfont.ttf'
    id: conditions
    size: 70
    glyphs:
      - "\U000F0594" # Night Time Clear
      - "\U000F0F31" # Night Time Dry/Part Cloudy
      - "\U000F0595" # Partly Cloudy
      - "\U000F0590" # Cloudy. 
      - "\U000F059B" #Dusk/Dry 
      - "\U000F0599" #Sunny/Dry 
      - "\U000F0596" #Raining 
      - "\U000F0F33" #Stopped Raining
      - "\U000F067F" #Sleet
      - "\U000F0F36" #Snowing
      - "\U000F0591" #Fog
      
      
  - file: 'Roboto-Medium.ttf'
    id: roboto
    size: 25
    glyphs: 
      ['&', '@', '!', ',', '.', '"', '%', '+', '-', '_', ':', '°', '0',
        '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
        'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
        'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
        'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
        'u', 'v', 'w', 'x', 'y', 'z', '/', 'è']
        
  - file: 'Roboto-Medium.ttf'
    id: robotosm
    size: 16
    glyphs: 
      ['&', '@', '!', ',', '.', '"', '%', '+', '-', '_', ':', '°', '0',
        '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
        'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
        'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
        'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
        'u', 'v', 'w', 'x', 'y', 'z', '/', 'è']      

 
      
# Configuration for the 2.9inch Waveshare - note the pin numbers so they match your NodeMCU
# The screen does a full update every hour and partial every 10s - edit these according to your use

spi:
  clk_pin: D0
  mosi_pin: D1

display:
  - platform: waveshare_epaper
    cs_pin: D2
    dc_pin: D6
    busy_pin: D7
    reset_pin: D5
    model: 2.90in
    full_update_every: 3600
    rotation: 180
    update_interval: 10s

# Layout - The main part to edit will be the conditions state - this is set for my live weather feed, so edit according to your
# weather icons - probably codes. The Trend arrow reads -1 for falling, 1 for rising - edit out as needs be. The last two
# under the line are the smaller min/max temp icons and data. 

    lambda: |-
    
 
      if (id(conditionswd).state == "Night Time, Clear") {
      it.print(30, 0, id(conditions), "\U000F0594");}
      if (id(conditionswd).state == "Partly_cloudy/Dry") {
      it.print(30, 0, id(conditions), "\U000F0595");}
      if (id(conditionswd).state == "Cloudy/Dry") {
      it.print(30, 0, id(conditions), "\U000F0590");}
      if (id(conditionswd).state == "Mainly_cloudy/Dry") {
      it.print(30, 0, id(conditions), "\U000F0590");}
      if (id(conditionswd).state == "Sunny/Dry") {
      it.print(30, 0, id(conditions), "\U000F0599");}
      if (id(conditionswd).state == "Raining") {
      it.print(30, 0, id(conditions), "\U000F0599");}
      if (id(conditionswd).state == "Cloudy/Moderate_drizzle") {
      it.print(30, 0, id(conditions), "\U000F0596");}
      if (id(conditionswd).state == "Cloudy/Light_rain") {
      it.print(30, 0, id(conditions), "\U000F0596");}
      if (id(conditionswd).state == "Dusk/Dry") {
      it.print(30, 0, id(conditions), "\U000F059B");}
      if (id(conditionswd).state == "Night_time/Dry") {
      it.print(30, 0, id(conditions), "\U000F0F31");}
      if (id(conditionswd).state == "Dawn/Fog") {
      it.print(30, 0, id(conditions), "\U000F0591");}
       if (id(conditionswd).state == "Fog") {
      it.print(30, 0, id(conditions), "\U000F0591");}
      
      
      it.print(5, 70, id(icon_font_30), "\U000F050F");
      it.printf(40, 85, id(roboto), "%.1f", id(outtemp).state);
      if (id(temptrend).state == "-1") {
      it.print(75, 70, id(icon_font_30), "\U000F072E");}
      if (id(temptrend).state == "1") {
      it.print(75, 70, id(icon_font_30), "\U000F0737");}
      
      
      it.print(5, 105, id(icon_font_30), "\U000F029A");
      it.printf(40, 120, id(roboto), "%.1f", id(pressure).state);
      
      
      it.print(5, 140, id(icon_font_30), "\U000F15FA");
      it.printf(40, 155, id(roboto), "%.1f", id(wind).state);
      it.printf(40, 180, id(roboto), "%s", id(winddir).state.c_str());
      
      
      it.print(5, 200, id(icon_font_30), "\U000F058C");
      it.printf(40,215, id(roboto), "%.1f", id(rainvue).state);
      
      
      it.line(5, 240, 120, 240);
      
       it.print(15, 250, id(icon_font_10), "\U000F0E03");
      it.printf(40,260, id(robotosm), "%.1f", id(outtempmax).state);
      
      it.print(15, 270, id(icon_font_10), "\U000F0E02");
      it.printf(40,280, id(robotosm), "%.1f", id(outtempmin).state);
      
      
      
      
      
      
9 Likes