bassettb / SugarPiDisplay

Display your CGM data on an easy to read e-paper display
MIT License
27 stars 15 forks source link

Can't get working with E-Paper Display V3 #27

Closed NISES12 closed 1 year ago

NISES12 commented 1 year ago

I've gone through the whole process following the instructions but can't get it to work. i've tried the example template from waveshare themselves and if i run epd_2in13_V2_test.py then the display fails to display anything but if i run the same name just with V3 instead then the E-paper display works correctly. whats the best way to get working with my display?

NISES12 commented 1 year ago

@bassettb would there be a problem if i copied the epd_2in13_V3.py from the test location as well as the epdconfig.py to the SugarPiDisplay folder and would this resolve the no screen display?

bassettb commented 1 year ago

I hadn't noticed that they came out with a V3 of the hardware. I also see they've made some changes to the V2 driver example.
I need to figure out if the V3 driver will also work on the V2 screen. If not, I'll need to add a new config option to pick the screen hardware. It will take me a few days to find time for this. You are welcome to try using the new code. Let me know how it goes.

NISES12 commented 1 year ago

@bassettb neither did i to be honest, just ordered the e-paper thinking it was the V2 one but got V3 instead. i've just done a test by changing some bits around in the following files: epd_2in13_V3.py epdconfig.py e-paperdisplay.py

with these changes i've managed to get the display working when running ./sugarpidisplay.py but it gets stuck on the screen initializing and doesn't progress.

bassettb commented 1 year ago

@NISES12 I grabbed the latest files from waveshare and made a few modifications. I confirmed that the V2 code runs with my display, but I don't have a v3 display to test with. Try getting the latest of sugarpidisplay from master. And then modify the top of epaper_display.py to import epd2in13_V3 instead of V2.

NISES12 commented 1 year ago

Hi @bassettb, just tried to re-run sugarpidisplay.sh and now its coming up with an error message stating file & "/home/usr/SugarPiDisplay/./sugarpidisplay.sh, line 3 cd &HOME/SugarPiDisplay ^ syntaxError: invalid syntax

then when i try changing the file to look directly at the folder location it then comes back with

python3 -m sugarpidisplay ^ SyntaxError: invalid syntax.

NISES12 commented 1 year ago

okay managed to get it working now. but seems like it either stuck on displaying the IP address and then sits there doing nothing.

NISES12 commented 1 year ago

@bassettb just having a look at the log file and there are a few error message saying ERROR - Exception during parse Expecting value: Line 1 Colum 1 (Char 0)

bassettb commented 1 year ago

I saw your message about Dexcom ending support for Dexcom Share. We've been using nightscout for a few years and I hadn't tested the Dexcom side in a long while. I'm trying it now with our username and password. I get "Login Failed / Will Retry" on the screen and "WARNING - Login request return status 500" in the logs.

NISES12 commented 1 year ago

wasn't sure if that was the cause of the issue so i deleted just in case that was completely wrong and ah right, haven't used Nightscout before but i can look into this method if the Dexcom Method doesn't work.

bassettb commented 1 year ago

xDrip still seems to support Dexcom share. I'll take a look at his code to see if there's something I can fix.

NISES12 commented 1 year ago

@bassettb not a problem if it doesn't work, i've just created a nightscout location and this is up and running, once i'm home from work i can try and reconfigure the pi zero to use the nightscout instead and try this way.

bassettb commented 1 year ago

I was using the wrong Dexcom login info. I fixed that and now the login succeeds. So I think it should work for you.

NISES12 commented 1 year ago

@bassettb strange not sure why its not working for me then :/, but i've got it working using the nightscout url and token but the only issue i've got is it's showing in mg/dl and not mmol/L even though i've changed the config to "unit_mmolL": true or changed it in nightscout itself to mmol/L

NISES12 commented 1 year ago

@bassettb, don’t suppose there’s a way of changing this to mmol/L by any chance? Since the config is set to this but it’s still showing as mg/dl?

bassettb commented 1 year ago

I'm sorry, I missed your message 2 days ago. It looks like I only half implemented the mmol/L change. I'll finish it up tonight.

NISES12 commented 1 year ago

Hi @bassettb no worries and okay thanks for letting me know. also is there a way to keep sugarpidisplay.sh to keep running? as i have to re-run the sh file every couple of hours to get it back up and running?

bassettb commented 1 year ago

I remember now the issue with mmol/L is the character spacing. I use a fixed-width font which ensures that a 3 digit number always fits. But adding a decimal point would not fit. I'll have to do some experimenting.

Have you followed the installation instructions. That will register a service that runs it on startup. https://github.com/bassettb/SugarPiDisplay/blob/master/docs/software_setup.md

NISES12 commented 1 year ago

Thanks for letting me know, i'll keep it showing as it is, as i can use the graph to estimate where abouts i am. regarding the second bit, yeah i followed the instruction, but doesn't run at startup. i'll grab the logs when i've gotten home and attach it. one thing i did noticed when i ran the install.sh script its runs through but then it sort of stopped after running the commands and i had to use CTRL + C to get out of it.

bassettb commented 1 year ago

@NISES12 Let me know what you think of this layout: https://github.com/bassettb/SugarPiDisplay/pull/29

NISES12 commented 1 year ago

@bassettb thanks again for sorting this out for me, this has been working perfectly now for awhile.