Closed KSuondProject closed 3 years ago
I haven't had this problem with mine so I'm not sure what could be the cause, if it is the program, try increasing the refreshing time, otherwise it might be a faulty screen
When the program goes to sleep mode, the display is not powered right? There's no 5 Volt inside? Because the waveshare tells me that the cause could be that the display is always powered. I thinks not but I'm not sure at 100%.
I think that this display is faulty, so I try to get another one and I'll see what happen!
Thanks as always @duxenmx
mmm, no , no 5 volt inside, the pi is connected for power to the dc input or if you are using a battery and the display hat is connected to the pi, I suppose that might be the "always powered" part they mention, I wonder, but I dont think thats how the screen works
the way the sleep mode works is -once your current time is after the OFF time and before ON time the screen will get cleaned to avoid the burn in and save api calls -while it is between that range it wont clean the screen over and over after the first clean or send any signal to the display, by that it is my thinking that while we dont send commands to the screen it is not powered
I'll check out if there is something else that can be implemented so it doesnt happen for future screens
in the meanwhile in the dashboard.py file go to the last lines and do these changes wherever they are different just for better logs and needed to add some second conversion in the time.sleep function
if check_awake == 0:
check_awake = 1
epd.Clear()
print('Sleeping for ' + str(refresh_sec) + ' min and cleaning the screen.')
time.sleep(refresh_sec*60)
else:
# use this else to prevent constant screen refreshing once its sleeping, it will just keep sleeping for 5 more minutes, like me every morning....
print('Sleeping for ' + str(refresh_sec) + ' min.')
time.sleep(refresh_sec*60)
Thanks for the explanation, I was sure that the process is something like that. So probably I'm just unfortunate with this display. Every day some other column of pixel burn off. I'll try to buy another one and check whats happen. Meanwhile I'll do your correction in the code asap.
Thanks!
heya,, hope you are doing great,
found some functionality in the epd module that sets off the display, give it a try
on the dashboard.py, modify the next parts
here
while True:
epd.init()
with open(os.path.join(creddir, 'dash_id.json'), "r") as rdash_id:
data = json.load(rdash_id)
and here
print('Device Sleeping.')
if check_awake == 0:
check_awake = 1
epd.Clear()
epd.sleep()
print('Sleeping for ' + str(refresh_sec) + ' min and cleaning the screen.')
time.sleep(refresh_sec*60)
else:
# use this else to prevent constant screen refreshing once its sleeping, it will just keep sleeping for 5 more minutes, like me every morning....
print('Sleeping for ' + str(refresh_sec) + ' min.')
epd.sleep()
time.sleep(refresh_sec*60)
on the d_functions.py, look for the write_to_screen function and replace it with the next
def write_to_screen(image, sleep_seconds):
print('Writing to screen.')
# Write to screen
h_image = Image.new('1', (epd.width, epd.height), 255)
# Open the template
screen_output_file = Image.open(os.path.join(picdir, image))
# Initialize the drawing context with template as background
h_image.paste(screen_output_file, (0, 0))
epd.display(epd.getbuffer(h_image))
# Sleep
print('Waiting for ' + str(int(sleep_seconds/60)) + ' min.')
epd.sleep()
time.sleep(sleep_seconds)
we are just adding the epd.sleep() function and an extra epd.init function for extra safety give it a try with the burned screen to see if that helps, let me know
Hi! I've modified the code right now on the burned display. I'll update the situation on the next days. Thanks for the help! :smile:
Mmhh... The process stuck on "Initializing and clearing the screen", but the screen doesn't do nothing. The status of the service doesn't return me any error, it's strange! I've missed something?
weird, quick question, are you following the code on the post or the code on the email, I was modifying it a little since it was also getting stuck on my side until it was working fine for me, so the code in the email is not the final
weird, quick question, are you following the code on the post or the code on the email, I was modifying it a little since it was also getting stuck on my side until it was working fine for me, so the code in the email is not the final
I've used the code of the post, not the email one. If you need to test something else let me know!
Thanks.
Hi there
I just made a new release with the code that I have with the fixes, should be working, compare it to your code for any missing things
changes that I did: dashboard.py -line 52 -line 229 -line 235
d_functions.py -line 242
Hi there
I just made a new release with the code that I have with the fixes, should be working, compare it to your code for any missing things
changes that I did: dashboard.py -line 52 -line 229 -line 235
d_functions.py -line 242
Right, when I came home this evening I'll made the correction and let you know!
I've edited the code but nothing changed, always stuck on "initializing and clearing screen". Have you edited more code? I've to check if the numbers of lines of my code is the same to yours.
I think its everything I modified, could you try with the dashboard.py straight from the github?, backup your dashboard.py and place the fresh one, run it and see if it does the same, disconnect the power first and reconnect
Ok, I've tried to reboot 2 times the Pi Zero. The first attempt it stuck on the clearing screen but the second one is fine! It's a little bit slower the before but it seems ok! So I'll see in the next days and let you know. Thank @duxenmx ! :sunglasses:
After a few days from when I've changed the code with your modification, the display condition is the same and it was not deteriorated anymore. So I can close this issue, I think taht I can see better a new situation when arrives the new display that I've ordered form waveshare. Thanks for the support!
Hi all, I've write to you because from Waveshare support haven't found a great answer to know why my display is start to burn these column of pixel. My refresh rate is every 5 minutes. The display can be restored? What I've do wrong?
Thanks for your support.