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

Waveshare Screen Degradation Issues #4

Open
Madelena opened this issue Jul 10, 2022 · 37 comments
Open

Waveshare Screen Degradation Issues #4

Madelena opened this issue Jul 10, 2022 · 37 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Madelena
Copy link
Owner

Currently the screen updates every minute because of the train arrival time countdown, which is bad for its lifespan. I'm already seeing artifacts on the screen from updating too many times.

I need to make the update_interval more dynamic by:

  • Turn on screen only when someone is in the room, using a motion sensor, and/or
  • Update the screen less often at night when trains are slower, and/or
  • Use opposite color scheme or blank the screen once in a while.

References:
https://community.home-assistant.io/t/dynamically-change-update-interval/108074/8

@Madelena Madelena added bug Something isn't working enhancement New feature or request labels Jul 10, 2022
@Madelena Madelena self-assigned this Jul 10, 2022
@chunkysteveo
Copy link
Contributor

There is also a deep command for the epaper displays:

id(epaper).set_full_update_every(0);

(epaper is my component display ID)

If the display supports partical and full refresh options - according to the documents not all of them allow you to manipulate a full page refresh.

@Madelena Madelena changed the title Reduce update_interval Reduce update_interval / Screen Degradation Jul 17, 2022
@Madelena
Copy link
Owner Author

So this screen has been operating for a full month now, and I've noticed some significant degradations in the screen.

As this screen had been updating every minute for the past month, it had refreshed more than 40000 times, which is less than ideal for this application, as it is already 1/25 of the usual 1 million refreshes lifespan of a normal screen.

I need to reduce the screen refresh interval, and I'll recommend everyone to change the update_interval to at least 10.

@Madelena Madelena pinned this issue Jul 17, 2022
@Madelena Madelena changed the title Reduce update_interval / Screen Degradation IMPORTANT!!! Screen Degradation Issue / Reduce update_interval Jul 17, 2022
@Bruhildo
Copy link

With few screen refreshes, I wonder if it would be better to change the train prediction to "Due At" at top with medium font and the "Due In" under with a small font.

@Madelena
Copy link
Owner Author

@Bruhildo yep. This is probably what I'm going to do to reduce the refresh_interval down to something more optimal like 3-5 minutes. And probably remove due_in since that's what required minute refresh.

I over-estimated the durability of e-ink screens. 😢

As a silver lining, I can probably use the extra space to display something like "You need a jacket" or "You need to bring an umbrella" for weather to continue the Rainmeter tradition.

@chunkysteveo
Copy link
Contributor

chunkysteveo commented Jul 18, 2022

Does a full page refresh not clear your artefacts on the screen? I have a couple of 2.9 inch epaper screens which update day and night, and they still appear "100% white" when I do a full display update.

I wonder if it's due to you having the colours swapped, guessing the black needs more power and "effort" from the screen to push them to the top each time. My displays are white with black writing.

FYI - here's one of mine, inspired by your big Gothic Bold font and using your "weatherman" sensor to pull in hourly stats - it's HOT here in the UK!!

https://www.instagram.com/p/CgJeIZorzWx/?utm_source=ig_web_copy_link
image

@chunkysteveo
Copy link
Contributor

Also - for one of my screens, I have a switch setup that triggers on a motion sensor and disables any screen update if there's no motion. Works for me as both screen and motion sensor point at me at work, so the display "turns off" when I leave my work. That will help with the life span too.

@Bruhildo
Copy link

Hi @chunkysteveo . Do you mean a physical switch to cut power or a logic switch on ESPHome that just cut the ePaper update? I was wondering if this could be achieved.

@chunkysteveo
Copy link
Contributor

Sorry, no - I meant a 'switch' within Home Assistant and ESPHome, the motion sensor sets the switch on/off which is set in the display lambda to either show the screen text, or a blank white screen.

@Bruhildo
Copy link

@chunkysteveo thank you. It is a better solution than a physical plug.

I will try to implement something similar on mine. Just need to sharpen my skills to be able to do it.

@chunkysteveo
Copy link
Contributor

chunkysteveo commented Jul 19, 2022

Assuming you have a motion sensor or some kind of binary sensor like a door contact etc - here's a cut down version of my code... You can see the binary_sensor setup pulls in a Home Assistant sensor, and the display lambda checks if it should draw all the text, or just draw white (i.e. "off"). The on_state - then to update the epaper is handy as it makes the screen draw or not draw as soon as motion is triggered, or if the motion sensor goes to "clear".

binary_sensor:      
  - platform: homeassistant
    id: multisensor_garage_motion_sensor
    entity_id: binary_sensor.multisensor_garage_motion
    internal: true  
    on_state:
      then:
      - component.update: epaper

display:
  - platform: waveshare_epaper
    id: epaper
    cs_pin: GPIO15
    dc_pin: GPIO0
    busy_pin: GPIO4
    reset_pin: GPIO2
    model: 2.90in
    rotation: 180°
    update_interval: 3600s
    lambda: |-
      if(id(multisensor_garage_motion_sensor).state){
        //Here you have your main display of text, weather etc....
      }
      else{
	//Fill with white (i.e. 'off')
        it.fill(COLOR_OFF);
      
      }

@Bruhildo
Copy link

Got it. Thanks a lot. Very helpful.

I will try to implement on mine this weekend.

@paviro
Copy link
Contributor

paviro commented Jul 22, 2022

I think setting the update_interval: to never is better else the screen still refreshed even if it's one color.

@chunkysteveo
Copy link
Contributor

Nice example of how to do it in the PR, i may have to copy that logic!

In my setup, a fill of white on every update doesn't change the display (no flicker or cycling etc), but not updating it full stop must be better for the controller 👍🏻

@Madelena
Copy link
Owner Author

Madelena commented Nov 8, 2022

Hi all! I finally got money to buy a new e-ink screen and so I can write new code for this!

Screen refreshing is now more intelligent based on motion sensors and new incoming sensor data, thanks to @paviro! The screen should refresh a lot fewer times per day now.

On top of that, I inverted the text and background colors, which I believe is the culprit. Let's see if this will work!

@Madelena Madelena closed this as completed Nov 8, 2022
@Madelena Madelena unpinned this issue Nov 8, 2022
@Madelena
Copy link
Owner Author

Madelena commented Jan 4, 2023

So it has been two months since I got a brand new e-ink screen and made it display content in white on black with fewer refreshes. Guess what? The screen degradation issue is still happening! The display is still getting dimmer and dimmer with each refresh.

And then I noticed that the degradation was stronger during the day than the night. How is that possible? During the day, I looked closer to the screen and noticed that the degradation was stronger on one side than the other, closely matching the shadow of the coat rack! The clue has been in front of me the entire time!

Notice how the photo was really bright in this photo? It is because my living room has a lot of sunlight as the windows face south. When I moved the frame into my bedroom which is shrouded in darkness, the degradation disappeared right away.

My new hypothesis is that UV light is bad for e-ink displays. I'm going to try pasting a layer of anti-UV film on the picture frame and see if the problem will be fixed. I'll report back later when I have a more conclusive result.

@Madelena Madelena reopened this Jan 4, 2023
@chunkysteveo
Copy link
Contributor

Some interesting findings for sure! I'm sure I read on the epaper display listings that have some generic warning about "keep out of direct Sunlight", but assumed that was just generic warnings?

I have a display that tends to fade a little on the side that's more towards the window. Never really put the two together?!

@paviro
Copy link
Contributor

paviro commented Jan 4, 2023

Could be the issue mine still looks perfect though I am using a inkplate.

@filikun
Copy link

filikun commented Jan 9, 2023

I have some problems with fading and noted this on the the screens amazon page

"Note that you cannot use Partial refresh all the time, you should full refresh e-paper regularly, otherwise, ghost problem will get worse even damage.Please set the e-Paper to sleep fashion or power off it directly, otherwise, the e-Paper is damaged because of working in high voltage for long time. You need to update the content of three-color e-Paper at least one time every 24h to avoid from burn-in problem."

@Madelena
Copy link
Owner Author

Madelena commented Jan 9, 2023

@filikun Since we tried a bunch of ways to optimize screen refresh on our end, I think we can try adjusting the voltage or powering off the display when it's not in use, although I don't see any documentation on ESPHome about this.

From what I've seen on the ESPHome bug reports, it seems that it was not just us who have the fading screen issue with Waveshare screens: esphome/issues#2216 The original dev for the Waveshare component for ESPHome is not around, so everyone seems to be also having troubles. @paviro uses Inkplate and doesn't seem like it has any issues so far.

@Madelena Madelena changed the title IMPORTANT!!! Screen Degradation Issue / Reduce update_interval Waveshare Screen Degradation Issues Jan 9, 2023
@paviro
Copy link
Contributor

paviro commented Jan 9, 2023

I am currently at 2.814 refreshes since starting to record them at October 23rd, I am sure I have at least double that from before. My Inkplate still looks like on the first day. I see you haven't set full_update_every in your code. This means if your panel supports it, the screen will only refresh fully on every 30st update.

I also get washed out images if I don't do a full refresh on every update (every update takes away a bit of contrast not sure if the esphome partial refresh code is not fully optimised yet or if our driver boards are at fault).

A full refresh will always look better on eink panels though no matter how good the partial refresh is.

This is what I use for my panel:

display:
- platform: inkplate6
  id: inkplate_display
  greyscale: false
  partial_updating: false
  update_interval: never
  model: inkplate_10
  rotation: 270°

As you can see partial_updating is turned off. The waveshare does not seem to have this option but you can use full_update_every: 0 or full_update_every: 1 to do the same (not sure which). Updating the screen will take a bit more time as it first has to clear the panel but it looks a lot better on my display.

Edit: I see @chunkysteveo mentioned this before as well, have you tried on your setup @Madelena?

@Madelena
Copy link
Owner Author

Unfortunately, full_update_every is only available for smaller Waveshare screens.

I also tried the alternative version model: 7.50inV2alt, but somehow it looks worse. 😞

@paviro
Copy link
Contributor

paviro commented Jan 14, 2023

I see so it does partial refreshes by default? That would explain that not amazing image quality.

@filikun
Copy link

filikun commented Jan 14, 2023

I see so it does partial refreshes by default? That would explain that not amazing image quality.

No I think it's full refresh by default. At least the screen turns black and white a couple of times before settling. The weird thing is when it's completely black there is no problem, and like the first 1/2 second after a refresh it looks good but then it gets worse in some area, always bottom right for me (I have it standing so might be top right or something original rotation).

@chunkysteveo
Copy link
Contributor

chunkysteveo commented Jan 14, 2023

Change out your power supply.. it may be struggling to power the refreshes. I had a smilar experience of a faded side, and a beefier power supply helped. (Enough milliamps)

@Madelena
Copy link
Owner Author

@filikun Yep, same as what you described.

@chunkysteveo Ha, let me try that!

@Madelena
Copy link
Owner Author

According to esphome/issues#2216, it seems that the VCOM DC setting and VCOM/Data Interval settings are the most likely culprit. Unfortunately, that requires bug fixes on ESPHome's side, and that is out of my control.

If anyone likes to join in that discussion and help out, it would be greatly appreciated!

@filikun
Copy link

filikun commented Jan 14, 2023

According to esphome/issues#2216, it seems that the VCOM DC setting and VCOM/Data Interval settings are the most likely culprit. Unfortunately, that requires bug fixes on ESPHome's side, and that is out of my control.

If anyone likes to join in that discussion and help out, it would be greatly appreciated!

Interesting, unfortunately with a 1y old I can't find the time for much tinkering right now. Hopefully someone can help out.

I'm using the old iPad power supply (the semi-big one) right now and have tried like one other. I do have a super beefy one that I can try!

@chunkysteveo
Copy link
Contributor

Hmmm, doubt it's a power supply issue if you are using an iPad charger... I was having issues when plugged into a PC, so that was topping out at 500ish-mA.... a charger will be at least 1A, so would/should be fine??

@Bruhildo
Copy link

I agree about that the power supply may not resolve the issue. I have tried many power supply (up to 1.5A) and the issue never went away.

@Madelena
Copy link
Owner Author

I unplugged the project for a week, and then when I plugged it back in, the screen quality returned as if it were brand new. And then a few days later, it started to deteriorate again. I believe the ESPHome Waveshare component is sending the wrong amount of power to the screen.

@rlust
Copy link

rlust commented Jul 24, 2023

I have a new display, I loaded the most recent code, it is working but very very dim. How do I invert the display to show white on black? On a refresh white on black looks great.

@chunkysteveo
Copy link
Contributor

I have a new display, I loaded the most recent code, it is working but very very dim. How do I invert the display to show white on black? On a refresh white on black looks great.

Change the color values in the sketch will swap them. Swap black and white.

@rlust
Copy link

rlust commented Jul 25, 2023

What color settings are you using to get black backroad with white test?
This is what I am using and still white back and very dim test.
color:

  • id: color_bg
    red: 0%
    green: 0%
    blue: 100%
    white: 0%
  • id: color_text
    red: 0%
    green: 0%
    blue: 0%
    white: 100%

@rlust
Copy link

rlust commented Jul 25, 2023

I fixed my very dim display by switching the Paper ESP32 switch A to on. Now looks great.

@chunkysteveo
Copy link
Contributor

Glad you sorted it!

@Madelena
Copy link
Owner Author

Madelena commented Aug 4, 2023

Good news! Looks like the bug will finally be sorted out with the help of many contributors in ESPHome 2023.7.1!

esphome/esphome#5173

@K-RAD
Copy link

K-RAD commented Aug 17, 2023

Paper ESP32 switch A

thank you so much, this solved my issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants