Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 | Default settings.yaml #2354

Open
pabera opened this issue Apr 22, 2024 · 2 comments
Open

🚀 | Default settings.yaml #2354

pabera opened this issue Apr 22, 2024 · 2 comments
Labels
enhancement future3 Relates to future3 development
Milestone

Comments

@pabera
Copy link
Collaborator

pabera commented Apr 22, 2024

Feature

I recommend introducing a settings.yaml file for constants that users (builders) don't need to modify. Currently, our jukebox.yaml combines both user-relevant settings and constants. One might wonder why these constants aren't simply coded into the software, but occasionally, even these constants need adjustments, such as during development.

In our existing jukebox.default.yaml, there are many details that aren't relevant to the builder, and altering them could impair the system's functionality.

My suggestion involves adopting an approach similar to Docker Compose yaml files, where settings.yaml serves as the base and jukebox.yaml acts as an override.

Benefits would be:

  1. Reduced jukebox.yaml creating less confusion for users/builders.
  2. Better configurability for developers

Here are several sections that could be separated out (as the comments also advise against modifying).

modules:
  named:
    # Do not change the order!
    publishing: publishing
    volume: volume
    jingle: jingle
    jingle.alsawave: jingle.alsawave
    jingle.jinglemp3: jingle.jinglemp3
    player: playermpd
    cards: rfid.cards
    rfid: rfid.reader
    timers: timers
    host: hostif.linux
    bluetooth_audio_buttons: controls.bluetooth_audio_buttons
    gpio: gpio.gpioz.plugin
    sync_rfidcards: synchronisation.rfidcards
  others:
  - misc
rpc:
  tcp_port: 5555
  websocket_port: 5556
publishing:
  # Ports for the publisher. Setting a port number to 0 disables the port
  # The WebUI requires the websocket connection
  tcp_port: 5558
  websocket_port: 5557
rfid:
  reader_config: ../../shared/settings/rfid.yaml
  card_database: ../../shared/settings/cards.yaml
webapp:
  coverart_cache_path: ../../src/webapp/build/cover-cache
@pabera pabera added enhancement future3 Relates to future3 development labels Apr 22, 2024
@pabera pabera added this to the v3.7 milestone Apr 22, 2024
@s-martin
Copy link
Collaborator

s-martin commented Apr 22, 2024

I think it's a good idea.
Only suggestion for clarity: call the file with the non changing parameters constants.yaml, base.yaml or default.yaml (or something else, you get the idea).

I think settings sounds like the users should change something here.

@s-martin
Copy link
Collaborator

s-martin commented Apr 25, 2024

I think those could also be moved to default settings:

playermpd:
  status_file: ../../shared/settings/music_player_status.json
  mpd_conf: ~/.config/mpd/mpd.conf

is it possible that some parameters of a section (e.g. playermpd) are in the default file and some are the file, which could/should be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement future3 Relates to future3 development
Projects
None yet
Development

No branches or pull requests

2 participants