Trying to get it to run on boot, it wont do so, and ive executed all commands, one thing i saw tho was that the simplelcd.service would not start. The screen works when i manually do the commands tho, heres the journalctl
Aug 23 18:08:42 carterpi systemd[1]: simpleLCD.service: Failed with result 'exit-code'.
Aug 23 18:08:43 carterpi systemd[1]: simpleLCD.service: Scheduled restart job, restart counter is at 2.
Aug 23 18:08:43 carterpi systemd[1]: Stopped simpleLCD.service - My LCD Service.
Aug 23 18:08:43 carterpi systemd[1]: Started simpleLCD.service - My LCD Service.
Aug 23 18:08:43 carterpi systemd[1]: simpleLCD.service: Main process exited, code=exited, status=217/USER
#trying to get ender 3 v2 screen on raspberry pi to run on boot
114 messages · Page 1 of 1 (latest)
Quick question as I'm not familiar with that service, can you send a link to the docs about this?
Yes!
Correct
Ahoi @desert mauve!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message
The screen works when i manually do the commands tho
What commands?
cd DWIN_T5UIC1_LCD
python3 ./run.py
I am also open to having other ways to run at boot
i just am not sure where to start
The service outputs into that file /tmp/lcd.log. Have a look at it
The problem is, I don't know anything about that script and I'm not really willing into reading deep into this
Try out this exact command: /usr/bin/env python3 /home/pi/DWIN_T5UIC1_LCD/run.py > /tmp/lcd.log 2>&1
Wait, what's the username of your pi?
ctn3770
It's carterpi, isn't it?
Output of cat /lib/systemd/system/simpleLCD.service
ctn3770@carterpi:~ $ cat /lib/systemd/system/simpleLCD.service
[Unit]
Description=My LCD Service
After=multi-user.target
[Service]
Type=idle
ExecStartPre=/bin/sleep 30
ExecStart=/usr/bin/python3 /home/ctn3770/DWIN_T5UIC1_LCD/run.py
User=ctn3770
Restart=always
[Install]
WantedBy=multi-user.target
ctn3770@carterpi:~ $
I did?
At least it's different to the repo you sent
I didnt even realise
I recommend to adjust it, just to be sure.
I can change that rq
You also got a user and a restart policy ^^
yeah lol, i was reccomended to add it
i will remove those
and try the new one with the username of the pi
It should be fine, but I'm not the best in such linux things ^^
Still isnt working, ill get the log output
python3: can't open file '/home/pi/DWIN_T5UIC1_LCD/run.py': [Errno 2] No such file or directory
You didn't adjust the path
It's /home/ctn3770/...
isnt this correct tho?
Ill try a reboot
For some reason it isnt putting out a log
lemme try another reboot
It doesn't have to.
Ah, ok. It should log at least one line, if it starts
Process: 1322 ExecStart=/usr/bin/env python3 /home/ctn3770/DWIN_T5UIC1_LCD/>
Main PID: 1322 (code=exited, status=217/USER)
CPU: 0
Aug 24 14:48:17 carterpi systemd[1]: simpleLCD.service: Scheduled restart job, >
Aug 24 14:48:17 carterpi systemd[1]: Stopped simpleLCD.service - My LCD Service.
Aug 24 14:48:17 carterpi systemd[1]: simpleLCD.service: Start request repeated >
Aug 24 14:48:17 carterpi systemd[1]: simpleLCD.service: Failed with result 'exi>
Aug 24 14:48:17 carterpi systemd[1]: Failed to start simpleLCD.service - My LCD>
lines 1-13/13 (END)
Theres no log shown, and here is the status
Run /usr/bin/env python3 /home/ctn3770/DWIN_T5UIC1_LCD/run.py
ctn3770@carterpi:~ $ /usr/bin/env python3 /home/ctn3770/DWIN_T5UIC1_LCD/run.py
DWIN handshake
DWIN OK.
the ip
Waiting for connect to /home/ctn3770/printer_data/comms/klippy.sock
Connection.
Boot looks good
Testing Web-services
Web site exists
Then the only thing coming to my mind would be to increase the startup delay or add debugging prints into the python code, to check if it's even starting
How could i do that?
In the /home/ctn3770/DWIN_T5UIC1_LCD/run.py file you could add print('Test') at the beginning of the file and at various other lines
That way it should print those into the log file and we can see where the error happens
Ill do that
what if it isnt printing the log?
Then it doesn't even start the file
I will then ask someone else to correct that service file
So it doesn't print anything?
Make sure to reboot once
Remember, it needs like 50s before it starts
k
rip
What does happen if you start thr run.py in a terminal session?(aka ssh command prompt)
How does the file permissions look like? ls -al path/to/run.py
Which version of python has to be used for this script? Is it installed? If it is python3 did you try /usr/bin/python3 in your service file?
Whats the output of whereis python ?
Let me try this today once i get home
Hi, sorry for the wait, i am finally trying to figure this out once again lol
Whereis python is python: /usr/bin/python /usr/share/man/man1/python.1.gz
And for some reason the run.py stopped working, now yielding ctn3770@carterpi:~/DWIN_T5UIC1_LCD $ python3 ./run.py
Test
Traceback (most recent call last):
File "/home/ctn3770/DWIN_T5UIC1_LCD/./run.py", line 3, in <module>
from dwinlcd import DWIN_LCD
File "/home/ctn3770/DWIN_T5UIC1_LCD/dwinlcd.py", line 6, in <module>
from RPi import GPIO
We would need the whole traceback
like the log?
No, you copied something. But you copied only the first few lines
Oh, that is all it gives me
It only gave me those lines rip..
Im using LGPIO because it is a pi5
I believe it should be a substitute
at least from the docs
It's basically impossible. That's some line you executed, isn't it?
Thats the full list of lines it gives me when i run run.py
Please send a screenshot of your terminal
Hi, been a while and i finally got around to figuring this out, this is the current issue
It's happening on this line:
https://github.com/bustedlogic/DWIN_T5UIC1_LCD/blob/main/encoder.py#L15
So the first time it's acting with GPIO
What Pi is that?
Nvm, it's a Pi5: #1276983445557346354 message
Have a look at the second message in this thread: https://forums.raspberrypi.com/viewtopic.php?t=361218
The post of p1r473 claims to got an in-place replacement package, that you could try