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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 | Allow multiple RPC calls per card assignment #2317

Open
BoldBigflank opened this issue Apr 3, 2024 · 2 comments
Open

馃殌 | Allow multiple RPC calls per card assignment #2317

BoldBigflank opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels
enhancement future3 Relates to future3 development
Milestone

Comments

@BoldBigflank
Copy link

Feature

When I tap a card, I would like to play a 60 second white noise file on repeat indefinitely.

User perspective

The simplest way I imagine could be to have an option tied to the "Play music" action.

A more thorough approach would be to allow a card action to be to implement multiple actions on trigger and also set actions for specific events such as action ended or left action. Then, I could set the trigger to both execute the "Audio & Volume > Repeat > Enable Repeat Song" action as well as the "Play Music" action, and then when the card is changed, execute "Audio & Volume > Repeat > Disable" action.

Further information

No response

@BoldBigflank BoldBigflank added enhancement future3 Relates to future3 development labels Apr 3, 2024
@pabera pabera self-assigned this Apr 6, 2024
@pabera pabera added this to the v3.6 milestone Apr 6, 2024
@pabera
Copy link
Collaborator

pabera commented Apr 15, 2024

Thanks for the request. It should be possible to apply multiple RPC calls to a single card assignments.

For this, we need to update the cards.yml structure to accept these multiple calls. At the moment, they only support a single use case

Current structure to play an album

'321234568':
  alias: play_album
  args:
  - Bibi & Tina
  - Jetzt in Echt - Soundtrack zum Kinofilm

Future structure to support n calls, in this example Play an Album on Repeat and a specific volume.

'321234568':
  actions:
    - alias: play_album
      args:
        albumartist: Bibi & Tina
        album: Jetzt in Echt - Soundtrack zum Kinofilm
    - alias: repeat
      args:
        option: toggle_repeat
    - alias: set_volume
      args:
        volume: 60

A single action would look like this

'321234568':
  actions:
    - alias: play_album
      args:
        albumartist: Bibi & Tina
        album: Jetzt in Echt - Soundtrack zum Kinofilm

The code would have to be changed to run through a loop of actions and call all RPC commands after each other.

Things to consider

  1. All previous cards.yml must be rewritten to the new structure
  2. Update UI to manage multiple commands
  3. When created manually, try to avoid running same commands within the same card assignments.

If you have further comments, please add as comments.

@pabera pabera changed the title 馃殌 | Play a specific song on repeat 馃殌 | Allow multiple RPC calls per card assignment Apr 15, 2024
@s-martin
Copy link
Collaborator

I like the approach.

If we do this we also should provide a feature to automatically convert cards.yaml to the new format as the cards are fundamental to Phoniebox.

This would also add to a possibility to update not only reinstall.

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

3 participants