Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Waveshare 2.13" V2 display #6337

Merged
merged 6 commits into from Mar 11, 2024

Conversation

manuelkasper
Copy link
Contributor

@manuelkasper manuelkasper commented Mar 8, 2024

What does this implement/fix?

Adds support for Waveshare e-Paper 2.13" V2 displays (also referred to as B72 in some libraries) as a new 2.13inv2 model. It is based on the EPD_2in13_V2 code from Waveshare. I have tested this change with the 2.13" e-Paper Cloud Module, which incorporates this display along with an ESP32.

While this display type already sort-of worked with the 2.13in-ttgo model configuration (which uses the same LUT), partial updates were unusable, and the image faded when using the Deep Sleep component (see also esphome/feature-requests#1779).

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes esphome/feature-requests#1779

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3669

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example with pins configured for Waveshare 2.13" e-Paper Cloud Module
spi:
  clk_pin: 13
  mosi_pin: 14

display:
  - platform: waveshare_epaper
    model: 2.13inv2
    id: epaper_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.47%. Comparing base (4d8b5ed) to head (b49825e).
Report is 82 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6337      +/-   ##
==========================================
- Coverage   53.70%   53.47%   -0.24%     
==========================================
  Files          50       50              
  Lines        9408     9515     +107     
  Branches     1654     1677      +23     
==========================================
+ Hits         5053     5088      +35     
- Misses       4056     4123      +67     
- Partials      299      304       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manuelkasper manuelkasper marked this pull request as ready for review March 10, 2024 08:10
@probot-esphome
Copy link

Hey there @clydebarrow, mind taking a look at this pull request as it has been labeled with an integration (waveshare_epaper) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

esphome/components/waveshare_epaper/waveshare_epaper.cpp Outdated Show resolved Hide resolved
tests/test4.yaml Outdated Show resolved Hide resolved
@esphome
Copy link

esphome bot commented Mar 11, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@esphome esphome bot marked this pull request as draft March 11, 2024 02:45
@manuelkasper manuelkasper marked this pull request as ready for review March 11, 2024 17:55
@esphome esphome bot requested a review from clydebarrow March 11, 2024 17:55
Copy link
Contributor

@clydebarrow clydebarrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clydebarrow clydebarrow merged commit a967622 into esphome:dev Mar 11, 2024
56 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Waveshare 2.13 inch B72 epaper display support
3 participants