2014-03-17, 00:46
This is in the General thread as any help with my request may be of help to anyone with Pulse-Eight CEC control.
I have a Pi with Raspbmc installed, and with the help of MilhouseVH I have been able to get the Pi to power off the TV after 15 minutes of inactivity.
The Catch!. If the TV has been changed to another input, after 15 minutes, the Pi power's off the TV.
This is the current script I have, with help from MilhouseVH texturecache.py script which detects when the screensaver has been active for 15 minutes
What I am interested in, is somehow detecting if the TV is still on HDMI1 (the source the Pi is connected to), then run theotherwise skip this line.
I have had a look at CEC-O-MATIC, but can not figure if I can get the TV to report what it's current source is.
So, to the great XBMC community, I ask if someone who's familiar with libcec or cec-client, can point me in the right direction.
I have a Pi with Raspbmc installed, and with the help of MilhouseVH I have been able to get the Pi to power off the TV after 15 minutes of inactivity.
The Catch!. If the TV has been changed to another input, after 15 minutes, the Pi power's off the TV.
This is the current script I have, with help from MilhouseVH texturecache.py script which detects when the screensaver has been active for 15 minutes
Code:
#!/bin/bash
/opt/vc/bin/tvservice $1
case "$1" in
"--off") echo "standby 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev/null;;
"--preferred") echo "on 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev null;;
esac
What I am interested in, is somehow detecting if the TV is still on HDMI1 (the source the Pi is connected to), then run the
Code:
"--off") echo "standby 0" | /opt/xbmc-bcm/xbmc-bin/bin/cec-client -s >/dev/null;;
I have had a look at CEC-O-MATIC, but can not figure if I can get the TV to report what it's current source is.
So, to the great XBMC community, I ask if someone who's familiar with libcec or cec-client, can point me in the right direction.