From e3b52196c625f9b3fb63156f04449fa97beb5093 Mon Sep 17 00:00:00 2001 From: t0b3 Date: Sun, 3 Dec 2023 12:18:09 +0100 Subject: [PATCH] feat: add stop/shutdown by rfid after 120,180,240min --- scripts/rfid_trigger_play.sh | 36 ++++++++++++++++++++++++++ settings/rfid_trigger_play.conf.sample | 18 +++++++++++++ 2 files changed, 54 insertions(+) diff --git a/scripts/rfid_trigger_play.sh b/scripts/rfid_trigger_play.sh index 8e56c075f..5c443d83d 100755 --- a/scripts/rfid_trigger_play.sh +++ b/scripts/rfid_trigger_play.sh @@ -246,6 +246,18 @@ if [ "$CARDID" ]; then # stop player after -v minutes $PATHDATA/playout_controls.sh -c=playerstopafter -v=60 ;; + $STOPAFTER120) + # stop player after -v minutes + $PATHDATA/playout_controls.sh -c=playerstopafter -v=120 + ;; + $STOPAFTER180) + # stop player after -v minutes + $PATHDATA/playout_controls.sh -c=playerstopafter -v=180 + ;; + $STOPAFTER240) + # stop player after -v minutes + $PATHDATA/playout_controls.sh -c=playerstopafter -v=240 + ;; $SHUTDOWNAFTER5) # shutdown after -v minutes $PATHDATA/playout_controls.sh -c=shutdownafter -v=5 @@ -261,6 +273,18 @@ if [ "$CARDID" ]; then $SHUTDOWNAFTER60) # shutdown after -v minutes $PATHDATA/playout_controls.sh -c=shutdownafter -v=60 + ;; + $SHUTDOWNAFTER120) + # shutdown after -v minutes + $PATHDATA/playout_controls.sh -c=shutdownafter -v=120 + ;; + $SHUTDOWNAFTER180) + # shutdown after -v minutes + $PATHDATA/playout_controls.sh -c=shutdownafter -v=180 + ;; + $SHUTDOWNAFTER240) + # shutdown after -v minutes + $PATHDATA/playout_controls.sh -c=shutdownafter -v=240 ;; $SHUTDOWNVOLUMEREDUCTION10) # reduce volume until shutdown in -v minutes @@ -278,6 +302,18 @@ if [ "$CARDID" ]; then # reduce volume until shutdown in -v minutes $PATHDATA/playout_controls.sh -c=shutdownvolumereduction -v=60 ;; + $SHUTDOWNVOLUMEREDUCTION120) + # reduce volume until shutdown in -v minutes + $PATHDATA/playout_controls.sh -c=shutdownvolumereduction -v=120 + ;; + $SHUTDOWNVOLUMEREDUCTION180) + # reduce volume until shutdown in -v minutes + $PATHDATA/playout_controls.sh -c=shutdownvolumereduction -v=180 + ;; + $SHUTDOWNVOLUMEREDUCTION240) + # reduce volume until shutdown in -v minutes + $PATHDATA/playout_controls.sh -c=shutdownvolumereduction -v=240 + ;; $ENABLEWIFI) $PATHDATA/playout_controls.sh -c=enablewifi ;; diff --git a/settings/rfid_trigger_play.conf.sample b/settings/rfid_trigger_play.conf.sample index b9eb6843a..aa1c57df6 100755 --- a/settings/rfid_trigger_play.conf.sample +++ b/settings/rfid_trigger_play.conf.sample @@ -115,6 +115,12 @@ STOPAFTER15="%STOPAFTER15%" STOPAFTER30="%STOPAFTER30%" ### Stop player after 60 min. STOPAFTER60="%STOPAFTER60%" +### Stop player after 120 min. +STOPAFTER120="%STOPAFTER120%" +### Stop player after 180 min. +STOPAFTER180="%STOPAFTER180%" +### Stop player after 240 min. +STOPAFTER240="%STOPAFTER240%" ## Timer: shutdown after x minutes ### Shutdown after 5 min. @@ -125,6 +131,12 @@ SHUTDOWNAFTER15="%SHUTDOWNAFTER15%" SHUTDOWNAFTER30="%SHUTDOWNAFTER30%" ### Shutdown after 60 min. SHUTDOWNAFTER60="%SHUTDOWNAFTER60%" +### Shutdown after 120 min. +SHUTDOWNAFTER120="%SHUTDOWNAFTER120%" +### Shutdown after 180 min. +SHUTDOWNAFTER180="%SHUTDOWNAFTER180%" +### Shutdown after 240 min. +SHUTDOWNAFTER240="%SHUTDOWNAFTER240%" ## Shutdown Timer Volume Reduction : reduce volume until shutdown in x minutes ### Reduce volume and Shutdown after 10 min. @@ -135,6 +147,12 @@ SHUTDOWNVOLUMEREDUCTION15="%SHUTDOWNVOLUMEREDUCTION15%" SHUTDOWNVOLUMEREDUCTION30="%SHUTDOWNVOLUMEREDUCTION30%" ### Reduce volume and Shutdown after 60 min. SHUTDOWNVOLUMEREDUCTION60="%SHUTDOWNVOLUMEREDUCTION60%" +### Reduce volume and Shutdown after 120 min. +SHUTDOWNVOLUMEREDUCTION120="%SHUTDOWNVOLUMEREDUCTION120%" +### Reduce volume and Shutdown after 180 min. +SHUTDOWNVOLUMEREDUCTION180="%SHUTDOWNVOLUMEREDUCTION180%" +### Reduce volume and Shutdown after 240 min. +SHUTDOWNVOLUMEREDUCTION240="%SHUTDOWNVOLUMEREDUCTION240%" ## Wifi: switch on/off and other ### Enable Wifi