Skip to content

Self hosted web application developed using nice-gui to remote control some volleyball scoreboards from https://overlays.uno

License

Notifications You must be signed in to change notification settings

JacoboSanchez/remote-scoreboard

Repository files navigation

remote-scoreboard

Self hosted web application developed using nice-gui to remote control some volleyball scoreboards from https://overlays.uno

Pre-requisites:

  • Create an account at https://overlays.uno
  • Go to the this overlay and click on Add to My Overlays
  • Open your overlay:
    • Copy the current URL and copy the final part of the URL (after https://app.overlays.uno/control/). This will be the UNO_OVERLAY_OID
    • Click on Copy Output URL, this URL will be the UNO_OVERLAY_OUTPUT
  • If you don't want to expose the service to internet you can use the on air feature from nicegui. Obtain your nicegui on air token and use it as UNO_OVERLAY_AIR_ID

Configuration:

You can configure the behavior using some environment variables:

  • APP_PORT (Optional): The TCP port where the scoreboard will be listening. Default value is 8080
  • APP_TITLE (Optional): The title of the web page. Default value is Scoreboard
  • APP_DARK_MODE (Optional): To specify the dark mode configuration, can be on, off or auto. Default value is auto
  • APP_DEFAULT_LOGO (Optional): Image used for no predefined teams. Default is https://cdn-icons-png.flaticon.com/512/7788/7788863.png
  • MATCH_GAME_POINTS (Optional): The number of points for each set. Default value is 25.
  • MATCH_GAME_POINTS_LAST_SET (Optional): The number of points for the last set. Default value is 15.
  • MATCH_GAME_SETS (Optional): The number of sets to win the game. Default value is 5.
  • ENABLE_MULTITHREAD (Optional): If true the uno overlay API will be invoked without waiting for a response so the UI changes inmediatly. Default value is true, change to false to wait for API calls to change the UI.
  • LOGGING_LEVEL (Optional): Level of logging (debug, info, warning, error). Default value is warning.
  • APP_TEAMS (Optional): List of predefined teams that can be selected from the configuration. By default only Local and Visitor are defined. The value is a JSON with a map of teams. Key is the name and should contain "icon", "color" and "text_color". Example:
        {
            "Local": {"icon":"https://route-to-icon.png", "color":"#060f8a", "text_color":"#ffffff"},
            "Visitante": {"icon":"https://route-to-icon.png", "color":"#ffffff", "text_color":"#000000"},
        }

Running from shell:

  • Export the environment variables generated before. UNO_OVERLAY_OID is required, the rest are optional
  • execute "python main.py"
  • nicegui should start a server and open the scoreboard in a browser automatically Example:
  c:\git\remote-scoreboard>SET UNO_OVERLAY_OID=XXXXXXXX
  c:\git\remote-scoreboard>SET UNO_OVERLAY_OUTPUT=https://app.overlays.uno/output/YYYYYYY
  c:\git\remote-scoreboard>python main.py
NiceGUI ready to go on http://localhost:8080, ...

Running from docker:

You can use the docker-compose file by adapting the environment variables required. An example of .env file would be:

EXTERNAL_PORT=80
APP_TITLE=MyScoreboard
UNO_OVERLAY_OID=
UNO_OVERLAY_OUTPUT=https://app.overlays.uno/output/

Features:

The scoreboard does support the following:

  • Points, sets, timeouts and serve managing
  • 25 points 5 sets by default. Append /beach to the URL to use 21 points 3 sets configuration.
  • Option to show/hide the overlay
  • Option to use simple/full scoreboard (only last game or full list)
  • Option to undo game/point/timeout addition
  • Configuration page (for managing the overlay look&feel)
  • Reset button

Building docker image:

There is a Dockerfile template for building your own image and a github action to publish it at docker hub. If you need to do this you should already have the knowledge to adapt and use them.

Internationalization:

There is no internationalization support. I used the less text I could and the ones used are in Spanish by default. If you want to translate it for your needs just edit and adapt messages.py file

Main control:

imagen Configuration Panel:

imagen

Overlay:

imagen

Disclaimer:

This software was made without previous design and without proper knowledge of Python, JavaScript and CSS. It was made by testing sample code and adapting and chaining it until the functionality was implemented. There is no proper logging, error handling, internationalization and performance was not polished.

Use it at your own risk.

About

Self hosted web application developed using nice-gui to remote control some volleyball scoreboards from https://overlays.uno

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published