Closed conrat4567 closed 1 month ago
New issue, running 64bit os works but then when I try to run the services, it fails with just "exit code"
Hi @conrat4567 sorry to hear that is not working for you.
can you please give me the output of: sudo systemctl status spotipi-eink-display.service
Hi there, Here is the output
spotipi-eink-display.service - Spotipi eInk Display service Loaded: loaded (/etc/systemd/system/spotipi-eink-display.service; enabled; preset: enabled) Drop-In: /etc/systemd/system/spotipi-eink-display.service.d └─spotipi-eink-display_env.conf Active: failed (Result: exit-code) since Tue 2024-09-17 20:42:59 BST; 3 days ago Duration: 4.062s Process: 633 ExecStart=/home/pi/spotipi-eink/spotipienv/bin/python3 /home/pi/spotipi-eink/python/spotipiEinkDisplay.py (code=exited, status=1/FAILURE) Main PID: 633 (code=exited, status=1/FAILURE) CPU: 4.054s
Sep 17 20:42:59 spotipi systemd[1]: spotipi-eink-display.service: Scheduled restart job, restart counter is at 5. Sep 17 20:42:59 spotipi systemd[1]: Stopped spotipi-eink-display.service - Spotipi eInk Display service. Sep 17 20:42:59 spotipi systemd[1]: spotipi-eink-display.service: Consumed 4.054s CPU time. Sep 17 20:42:59 spotipi systemd[1]: spotipi-eink-display.service: Start request repeated too quickly. Sep 17 20:42:59 spotipi systemd[1]: spotipi-eink-display.service: Failed with result 'exit-code'. Sep 17 20:42:59 spotipi systemd[1]: Failed to start spotipi-eink-display.service - Spotipi eInk Display service. Sep 21 19:42:22 spotipi systemd[1]: spotipi-eink-display.service: Start request repeated too quickly. Sep 21 19:42:22 spotipi systemd[1]: spotipi-eink-display.service: Failed with result 'exit-code'. Sep 21 19:42:22 spotipi systemd[1]: Failed to start spotipi-eink-display.service - Spotipi eInk Display service.
hmm this is not telling us anything hmm. can you tell me the content of the log file in ~/spotipi-eink/log/spotipy.log
or try "sudo systemctl restart spotipi-eink-display.service" and then after a "sudo systemctl status spotipi-eink-display.service" again.
Or you can start the the script directly like this:
1 .stop the service: sudo systemctl stop spotipi-eink-display.service
load into the spotipi python env: source ~/spotipi-eink/spotipienv/bin/activate
get the environment variables and set them
(spotipienv) nils@waveshare:~ $ cat /etc/systemd/system/spotipi-eink-display.service.d/spotipi-eink-display_env.conf
[Service]
Environment="SPOTIPY_CLIENT_ID=efewfewfwefewf"
Environment="SPOTIPY_CLIENT_SECRET=324872394uelffljrl"
Environment="SPOTIPY_REDIRECT_URI=http://localhost/redirect"
adjust them that you can export them to you local shell like this:
(spotipienv) nils@waveshare:~ $ export SPOTIPY_CLIENT_ID=efewfewfwefewf
(spotipienv) nils@waveshare:~ $ export SPOTIPY_CLIENT_SECRET=324872394uelffljrl
(spotipienv) nils@waveshare:~ $ export SPOTIPY_REDIRECT_URI=http://localhost/redirect
start the python script: (spotipienv) nils@waveshare:~ $ python3 ~/spotipi-eink/python/spotipiEinkDisplay.py
what error do you get?
I get this first
spotipi-eink-display.service - Spotipi eInk Display service Loaded: loaded (/etc/systemd/system/spotipi-eink-display.service; enabled;> Drop-In: /etc/systemd/system/spotipi-eink-display.service.d └─spotipi-eink-display_env.conf Active: active (running) since Sun 2024-09-22 10:33:57 BST; 1s ago Main PID: 1771 (python3) Tasks: 1 (limit: 174) CPU: 1.758s CGroup: /system.slice/spotipi-eink-display.service └─1771 /home/pi/spotipi-eink/spotipienv/bin/python3 /home/pi/spoti>
Sep 22 10:33:57 spotipi systemd[1]: Started spotipi-eink-display.service - Spot> lines 1-12/12 (END)...skipping... ● spotipi-eink-display.service - Spotipi eInk Display service Loaded: loaded (/etc/systemd/system/spotipi-eink-display.service; enabled; preset: enabled) Drop-In: /etc/systemd/system/spotipi-eink-display.service.d └─spotipi-eink-display_env.conf Active: active (running) since Sun 2024-09-22 10:33:57 BST; 1s ago Main PID: 1771 (python3) Tasks: 1 (limit: 174) CPU: 1.758s CGroup: /system.slice/spotipi-eink-display.service └─1771 /home/pi/spotipi-eink/spotipienv/bin/python3 /home/pi/spotipi-eink/python/spotipiEinkDisplay.py
Sep 22 10:33:57 spotipi systemd[1]: Started spotipi-eink-display.service - Spotipi eInk Display service.
Then, if I run it again
spotipi-eink-display.service - Spotipi eInk Display service Loaded: loaded (/etc/systemd/system/spotipi-eink-display.service; enabled; preset: enabled) Drop-In: /etc/systemd/system/spotipi-eink-display.service.d └─spotipi-eink-display_env.conf Active: failed (Result: exit-code) since Sun 2024-09-22 10:34:18 BST; 1min 38s ago Duration: 4.029s Process: 1778 ExecStart=/home/pi/spotipi-eink/spotipienv/bin/python3 /home/pi/spotipi-eink/python/spotipiEinkDisplay.py (code=exited, status=1/FAILURE) Main PID: 1778 (code=exited, status=1/FAILURE) CPU: 4.022s
Sep 22 10:34:18 spotipi systemd[1]: spotipi-eink-display.service: Scheduled restart job, restart counter is at 5. Sep 22 10:34:18 spotipi systemd[1]: Stopped spotipi-eink-display.service - Spotipi eInk Display service. Sep 22 10:34:18 spotipi systemd[1]: spotipi-eink-display.service: Consumed 4.022s CPU time. Sep 22 10:34:18 spotipi systemd[1]: spotipi-eink-display.service: Start request repeated too quickly. Sep 22 10:34:18 spotipi systemd[1]: spotipi-eink-display.service: Failed with result 'exit-code'. Sep 22 10:34:18 spotipi systemd[1]: Failed to start spotipi-eink-display.service - Spotipi eInk Display service.
When i run the sequence you gave me, all the values are correct so i run part 4 and get
Spotipi eInk Display - Service instance created Spotipi eInk Display - Loading Pimoroni inky lib Spotipi eInk Display - Service started Woah there, some pins we need are in use! ⚠️ Chip Select: (line 8, GPIO8) currently claimed by spi0 CS0
But then nothing happens, no refresh of the screen
This is the log contents. Nothing really useful
2024-09-17 20:37:19 Service instance created 2024-09-17 20:37:20 Loading Pimoroni inky lib 2024-09-17 20:37:20 Service started 2024-09-17 20:37:30 Service instance created 2024-09-17 20:37:31 Loading Pimoroni inky lib 2024-09-17 20:37:31 Service started 2024-09-17 20:37:36 Service instance created 2024-09-17 20:37:37 Loading Pimoroni inky lib 2024-09-17 20:37:37 Service started 2024-09-17 20:37:42 Service instance created 2024-09-17 20:37:42 Loading Pimoroni inky lib 2024-09-17 20:37:42 Service started 2024-09-17 20:37:47 Service instance created 2024-09-17 20:37:47 Loading Pimoroni inky lib 2024-09-17 20:37:47 Service started 2024-09-17 20:37:52 Service instance created 2024-09-17 20:37:53 Loading Pimoroni inky lib 2024-09-17 20:37:53 Service started 2024-09-17 20:42:33 Service instance created 2024-09-17 20:42:34 Loading Pimoroni inky lib 2024-09-17 20:42:34 Service started 2024-09-17 20:42:39 Service instance created 2024-09-17 20:42:40 Loading Pimoroni inky lib 2024-09-17 20:42:40 Service started 2024-09-17 20:42:45 Service instance created 2024-09-17 20:42:45 Loading Pimoroni inky lib 2024-09-17 20:42:45 Service started 2024-09-17 20:42:50 Service instance created 2024-09-17 20:42:51 Loading Pimoroni inky lib 2024-09-17 20:42:51 Service started 2024-09-17 20:42:55 Service instance created 2024-09-17 20:42:56 Loading Pimoroni inky lib 2024-09-17 20:42:56 Service started 2024-09-22 10:33:54 Service instance created 2024-09-22 10:33:54 Loading Pimoroni inky lib 2024-09-22 10:33:54 Service started 2024-09-22 10:33:59 Service instance created 2024-09-22 10:33:59 Loading Pimoroni inky lib 2024-09-22 10:33:59 Service started 2024-09-22 10:34:04 Service instance created 2024-09-22 10:34:05 Loading Pimoroni inky lib 2024-09-22 10:34:05 Service started 2024-09-22 10:34:09 Service instance created 2024-09-22 10:34:10 Loading Pimoroni inky lib 2024-09-22 10:34:10 Service started 2024-09-22 10:34:14 Service instance created 2024-09-22 10:34:15 Loading Pimoroni inky lib 2024-09-22 10:34:15 Service started 2024-09-22 10:39:31 Service instance created 2024-09-22 10:39:31 Loading Pimoroni inky lib 2024-09-22 10:39:31 Service started
When i run the sequence you gave me, all the values are correct so i run part 4 and get
Spotipi eInk Display - Service instance created Spotipi eInk Display - Loading Pimoroni inky lib Spotipi eInk Display - Service started Woah there, some pins we need are in use! ⚠️ Chip Select: (line 8, GPIO8) currently claimed by spi0 CS0
@conrat4567 Here we have a error message. So the Pimoroni inky lib can't speak with the display.
Have you enable SPI and I2C under "Interface Options" with the command: sudo raspi-config
? If you change it please reboot the raspberry PI after the change.
Have you soldered the Pin headers your self to the Raspberry PI, if yes please check your soldering that every pins is connect.
Soldering looks ok, it was bought pre-soldered. Enabling those two options and restarting did not work either. Is there a way to make sure the screen is actually working or speaking to the pi? Do you want me to send some photos with how its attached?
ok found the issue with the latest gpio kernel module we need to add a boot option to /boot/firmware/config.txt
option: dtoverlay=spi0-0cs
thank you for reaching out will update the docs.
When getting to the Preparing metadata stage, the pi locks up and eventually crashes. Any ideas on why this is? Otherwise, the script is working better than the original