MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
582 stars 105 forks source link

Start the Scoreboard on Autostart does't work #433

Open PHI34Halladay opened 1 year ago

PHI34Halladay commented 1 year ago

This issue is a

Hardware Configuration

Software Configuration

Expected behavior

The Scoreboard should load on startup after executing all of the steps the wiki page.

Actual behavior

Nothing happens.

Additional Information

I went through step by step in this wiki page (https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard/wiki/Creating-a-systemd-startup-script) but can't seem to even get the test command (sudo service mlb-led-scoreboard start) going. How can you help me? image

pjockey commented 1 year ago

have you tried to check and see if everything stuck. Check and see if the .service file was actually moved to /lib/systemd/system.

PHI34Halladay commented 1 year ago

It is moved to /lib/systemd/system.

mike2me commented 1 year ago

post screenshot of your script

PHI34Halladay commented 1 year ago

This is how it looks like: image

pjockey commented 1 year ago

Do you have more than one board connected together?

This is my program start: sudo python3 main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=60 --led-slowdown-gpio=2 --led-cols=64 --led-rows=32 --led-rgb-sequence=BGR --led-row-addr-type=3

Try running your program start from the command line and see what error are produced. Or try mine and see what happens. I'm acutally running a 128x64 board, but I changed the above to the 64x32.

PHI34Halladay commented 1 year ago

Thanks for the response. I'm running 4 panels (2x2) at once.

I will try our command tomorrow.

It works when I'm going like this:

  1. Command: cd mlb-led-scoreboard
  2. Command: sudo python3 main.py --[......]

But not when I'm doing this:

sudo python3 home/pi/mlb-led-scoreboard/main.py --[......]

Could this be connected with the autostart function?

ty-porter commented 1 year ago

This doesn't have anything to do with the scoreboard itself

You're bumping into issues with systemd to set up the service. I would recommend triple checking that the service is copied to lib/systemd/system and re-enabling the scoreboard service:

sudo systemctl enable mlb-led-scoreboard

Beyond that there's limited ability for us to troubleshoot for you.

PHI34Halladay commented 1 year ago

Just saw that the file is owned by the user "pi". Could that me the mistake?

image

EDIT: Changed it to root, but that didn't solve my problem.

PHI34Halladay commented 1 year ago

Newest error message:

image

bierbarrel commented 1 year ago

I had that same issue today. I had not used the scoreboard this year yet. I only had 2 panels last year. I added 2 more panels this year and did a new reinstall of the software. I could get the board to work if I ran sudo py from the mlb-led-scoreboard but could never get it to run from the /lib/systemd/system/ directory. I used the "sudo service mlb-led-scoreboard status" command to see if the board was actually running. It turned out that my directory structure was wrong. In the mlb-led-scoreboard.service file. I chased this for a couple hours. When you make changes to the file you need to run the "systemctl daemon-reload" command and then "sudo systemctl enable mlb-led-scoreboard" command. Then reboot...at least that is what worked for me.