2014-03-08, 02:23
(2014-03-08, 02:15)vbat99 Wrote: Had to find where cec-client was located and for Raspbmc its in a couple of locations:
Code:pi@raspbmc:/$ find . -name cec-client
./opt/xbmc-bcm/xbmc-bin/bin/cec-client
./home/pi/.upgrade/xbmc-13-20140305-nc3/xbmc-bcm/xbmc-bin/bin/cec-client
./home/pi/.upgrade/xbmc-13-20140213-nc3-2/xbmc-bcm/xbmc-bin/bin/cec-client
./home/pi/.upgrade/xbmc-13-20140306-nc3b/xbmc-bcm/xbmc-bin/bin/cec-client
./home/pi/.upgrade/xbmc-13-20140228-nc3/xbmc-bcm/xbmc-bin/bin/cec-client
The .upgrade path isn't viable, so made changes and set as
Code:#!/bin/bash
/opt/vc/bin/tvservice $1
case "$1" in
"--off") echo "standby 0" | /opt/xbmc-bmc/xbmc-bin/bin/cec-client -s >/dev/null;;
"--preferred") echo "on 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev null;;
esac
echo "$(date) called with $1 param" >> /tmp/tvservice.log
But still have
Code:2014-03-08 12:53:20.065752:Thread-1 : bin.tvservice (checking if TV is powered on) calling subprocess [/home/pi/mytv.sh --status]
2014-03-08 12:53:20.135903:Thread-1 : bin.tvservice response: [state 0x12001a [HDMI CEA (4) RGB lim 16:9], 1280x720 @ 60Hz, progressive]
2014-03-08 12:53:20.142789:Thread-1 : bin.tvservice (enabling/disabling HDMI) calling subprocess [/home/pi/mytv.sh --off]
2014-03-08 12:53:20.222834:Thread-1 : bin.tvservice response: [Powering off HDMI
/home/pi/mytv.sh: line 6: /opt/xbmc-bmc/xbmc-bin/bin/cec-client: No such file or directory]
2014-03-08 12:53:20.223948:Thread-1 : bin.tvservice (checking HDMI status) calling subprocess [/home/pi/mytv.sh --status]
2014-03-08 12:53:20.286904:Thread-1 : bin.tvservice response: [state 0x120002 [TV is off]]
2014-03-08 12:53:20.294417:Thread-1 : [DEBUG] HDMI is now off
You've got a typo in the path for cec-client - it should be:
Code:
/opt/xbmc-bcm/xbmc-bin/bin/cec-client
Code:
/opt/xbmc-bmc/xbmc-bin/bin/cec-client
(2014-03-08, 02:15)vbat99 Wrote: And I shoud change this to
??Code:sleep 20 && su pi -c /home/pi/texturecache.py @logfile=/home/pi/t4.txt @debug=yes @xbmc.host=localhost @bin.tvservice=/home/pi/mytv.sh rbphdmi 420
Actually, you may need to wrap the command being executed in quotes so that it's treated as one argument and not several:
Code:
sleep 20 && su pi -c '/home/pi/texturecache.py @logfile=/home/pi/t4.txt @debug=yes @xbmc.host=localhost @bin.tvservice=/home/pi/mytv.sh rbphdmi 420' &
Code:
(sleep 20 && su pi -c '/home/pi/texturecache.py @logfile=/home/pi/t4.txt @debug=yes @xbmc.host=localhost @bin.tvservice=/home/pi/mytv.sh rbphdmi 420') &