XBMC on Pi: Add TV/monitor Power Save support when idle?
#63
(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
but for --off you've typed:
Code:
/opt/xbmc-bmc/xbmc-bin/bin/cec-client
("/opt/xbmc-bmc" when it should be "/opt/xbmc-bcm")

(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' &
Give it a go, it should work. Note also that I've added the & on the end which should cause su to fork a new process, other you might find that rc.local processing doesn't finish... in fact with that in mind, I'd change your startup script to be as follows:
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') &
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply


Messages In This Thread
RE: XBMC on Pi: Add TV/monitor Power Save support when idle? - by Milhouse - 2014-03-08, 02:23
Logout Mark Read Team Forum Stats Members Help
XBMC on Pi: Add TV/monitor Power Save support when idle?1