MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.33k stars 395 forks source link

🚀 | Only start Audio with Play-Button #1763

Open Xenorollmops opened 2 years ago

Xenorollmops commented 2 years ago

Hi everybody,

I would like to controll some motorised parts of the box I am working on. To achieve this, I need two features:

  1. One (or more :) ) digital pin(s) that turns high when playing audio starts and turns low when playback finishes
  2. Audio output shall not start automatically when the RFID tag is read. It shall only start by using the GPIO Play button.

For making 1. work I found this: https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/171 Does this methode still work? Anyhow, is there a way to manipulate the behavior of e.g. the status LED perhaps? That strikes me to be the better idea.

For 2. I tried to find the part of the skript that autolauhches the playback, but I was not able to locate and uncomment it.

Can you help me with this Issues?

Thanks a lot in advance. Xeno

lenlennart commented 2 years ago

the most blunt method would be adding a pause command to the end of your rfid_trigger_play.sh: $PATHDATA/playout_controls.sh -c=playerpauseforce

depending on your hardware, you might end up with roughly 1 second playing time before pause kicks in. In case you look for a more elegant solution, i guess you have to dig through the playout_controls.sh file and comment out the actual play-commands (look for mpc play)