sflems / led-board-manager Goto Github PK
View Code? Open in Web Editor NEWA Django based web app to configure LED Scoreboards running on a Raspberry Pi.
License: GNU General Public License v3.0
A Django based web app to configure LED Scoreboards running on a Raspberry Pi.
License: GNU General Public License v3.0
When no games are returned from the NHL API the array has no index.
Culprit:
games = services.todays_games()
Super Noob here...
I have the NHL, MLB, and NFL boards all working. The NHL board is running with supervisor, and the other two I am just using SSH through Terminal. I would love to use this manager to switch boards. When I try to start the server, I get the error "No module Named Constance". I did the automatic install. I would love help to get pointed in the right direction to troubleshoot. This is what I get:
(env) pi@Rileypi:/led-board-manager $ source env/bin/activate && gunicorn Capstone.wsgi -b 0:9002/led-board-manager $
[2022-11-16 02:48:32 -0500] [1665] [INFO] Starting gunicorn 20.0.4
[2022-11-16 02:48:32 -0500] [1665] [INFO] Listening at: http://0.0.0.0:9002 (1665)
[2022-11-16 02:48:32 -0500] [1665] [INFO] Using worker: sync
[2022-11-16 02:48:32 -0500] [1666] [INFO] Booting worker with pid: 1666
[2022-11-16 02:48:34 -0500] [1666] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/pi/led-board-manager/Capstone/wsgi.py", line 16, in
application = get_wsgi_application()
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/pi/led-board-manager/env/lib/python3.9/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/pi/led-board-manager/scoreboard/apps.py", line 2, in
from constance.apps import ConstanceConfig
ModuleNotFoundError: No module named 'constance'
[2022-11-16 02:48:34 -0500] [1666] [INFO] Worker exiting (pid: 1666)
[2022-11-16 02:48:35 -0500] [1665] [INFO] Shutting down: Master
[2022-11-16 02:48:35 -0500] [1665] [INFO] Reason: Worker failed to boot.
(env) pi@Rileypi:
As mentioned, when an active profile is not found, the JQuery function requires a message to state so.
When changing multiple flags at once, the board reloads before all flags are set.
Constance sends an update signal for every key. The supervisor update command function is nested in this receiver and needs to be moved to wait for all changes to be saved then to render the template and reload in one call.
Iterate over form non_field_errors
rather than displaying __all__
method.
First I just wanted to say thanks for making this project, it seems like it will be a great addition to the NHL LED Scoreboard.
I am just trying to figure out the exact process I need to follow to properly install.
So I installed the nhl-led-scoreboard, got everything up and running properly.
Then I SSH'd into the scoreboard and started with:
git clone --recursive https://github.com/sflems/led-board-manager.git
cd led-board-manager
And since the nhl-led-scoreboard has Supervisor running already, I followed option 1 of the "Auto-start server". After this however, I am a little unclear on where to go forward.
I have tried a couple of different routes without much success. I guess I just need clarification where to start again after that first autostart option.
followed the instructions on the github and when I run the command gunicorn Capstone.wsgi -b 0:9002
I get bash error gunicorn command not found.
I watch it get installed. I'm in the led-board-manager
folder.
An existing /etc/supervisord/conf.d/scoreboard.conf
file will cause a duplicate scoreboard process to run as the GUI does not override the existing configuration if a program name mismatch is present.
Related to #18
Add to the admin panel a model for changing WebGui config options ie. Custom Supervisor Scoreboard Process Name, conf_path(), etc
See:
I can't access using the default password no matter what I do. I've reinstalled probably 4 times and I can't get logged in.
I did add the IP address to allow cookies.
Hello, first of all thank you for creating this, it is really awesome!
I am having an issue creating an NHL profile. I get the following error each time I try:
"Warning. (['data.sbio.screensaver.start must match pattern ([01]?[0-9]|2[0-3]):[0-5][0-9]'])" and it doesn't save. I can only use the default profile for hockey and can't edit any of the configs.
I have screensaver set to "false".
Currently, if a config fails validation it will redirect the user to the profiles page. It should redirect back to the form with prefilled data.
Usage of django-supervisor would allow the server to add a scoreboard config file for supervisor using django's templating engine. This could then be integrated with Constance to allow users to set the various scoreboard flag parameters from the admin panel and update them on the fly.
Just ran the update process and when the website loads I get the error above. The Supervisor website loads and the boards attached it start up and function.
[2021-06-12 12:42:16 -0600] [2793] [INFO] Booting worker with pid: 2793
[2021-06-12 12:42:46 -0600] [2457] [CRITICAL] WORKER TIMEOUT (pid:2793)
[2021-06-12 12:42:46 -0600] [2793] [INFO] Worker exiting (pid: 2793)
This is the output of the Terminal.
Just doing the install to test out now. One thing I'd suggest to to allow the pip3 install -r requirements.txt to actually output to the terminal rather than to the webgui-log.out file so users have some form of notification that the install is running. With the output to the log file, the install appears to the end user as if it's hung. There's no real indication of what's going on.
Once it hits this line
Touching .secret.txt and updating permissions...
Maybe add that the python requirements are being installed and it may take some time for the install.
There is an error with the path referenced in the backup function call. Will be updated in a hotfix shortly.
User created custom boards added to the nhl-led-scoreboard/src/boards
directory and config.json
require an entry in the states/boards enums found in the config.schema.json
to be validated.
Notes should be added accordingly.
FIX:
Custom boards can be added to the config/config.schema.json
under the enum
field in the #/definitions/boards_list
When trying to start the server, users may encounter a Gunicorn not found error as below:
pi@raspberrypi:~/nhl-led-scoreboard-webgui $ gunicorn Capston.wsgi -b 0:9002
-bash: gunicorn: command not found
There may be an issue with how Gunicorn is installed with the current pip3 configuration.
CURRENT FIX:
Update to the latest release.
Implementing Gunicorn requires approximately 50% or less resources compared to the python django devserver. To reduce the load on the Pi, this should be implemented as the main method of starting the server.
TODO:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.