Still cant seem to get the delay going even when I move the turning function around. Can you say a bit more about the named pipe?
prebmitune.sh
#!/bin/bash
MAX_LAUNCH="com.wbd.stream"
MAX_NAME="com.wbd.beam.BeamActivity"
APP_NAME="com.google.android.apps.youtube.tvunplugged.activity.MainActivity"
APP_LAUNCH="com.google.android.youtube.tvunplugged"
content_file="/opt/opendct/contentid.txt"
content_id=
TUNERIP="$1"
STATIONIP="$2"
#Make Sure adb is up and connected
#sh /home/moisebuntu/Scripts/startadb.sh
# Wake up
sh startsystem.sh
adb -s $TUNERIP shell input keyevent KEYCODE_WAKEUP
# Read content_id from file
if [ -f "$content_file" ]; then
content_id=$(grep -w "^$2" "$content_file" | cut -d " " -f3)
fi
# Check if content_id is empty
if [ -z "$content_id" ]; then
echo "Invalid option or content_id not found in $content_file"
exit 1
fi
#make sure adb is connected to device
adb connect $1
#check channel number and tune accordingly
if (( 810 <= $2 && $2 <= 818 ));then
adb -s $1 shell "am start -a android.intent.action.VIEW -d https://play.max.com/channel/watch/"$content_id"" -n $MAX_LAUNCH/$MAX_NAME
else
adb -s $1 shell "am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/"$content_id"" -n $APP_LAUNCH/$APP_NAME
fi
exit
And bmitune.sh:
#!/bin/bash
echo "$1" > /tmp/temp.txt
echo "$2" >> /tmp/temp.txt
echo "$3" >> /tmp/temp.txt
STATION="$1"
TUNERIP="$2"
CONTENT_FILE="contentid.txt"
CONTENT_ID=""
#activate device
sleep 5 &
wait
if [ $2 == "192.168.1.12" ]; then
magewell2ts -i 1 -w /home/christophe/ah4c/EDID/ProCaptureHDMI-Atmos.bin -s 100 -c h264_qsv -q 10 -m
fi
if [ $2 == "192.168.1.13" ]; then
magewell2ts -i 2 -w /home/christophe/ah4c/EDID/ProCaptureHDMI-Atmos.bin -s 100 -c h264_qsv -q 10 -m
fi
if [ $2 == "192.168.1.14" ]; then
magewell2ts -i 3 -w /home/christophe/ah4c/EDID/ProCaptureHDMI-Atmos.bin -s 100 -c h264_qsv -q 10 -m
fi
if [ $2 == "192.168.1.15" ]; then
magewell2ts -i 4 -w /home/christophe/ah4c/EDID/ProCaptureHDMI-Atmos.bin -s 100 -c h264_qsv -q 10 -m
fi
exit
