On off relays via gpio is a different mechanism than cec. Just curious how you are doing cec on/off
I had quite a bit of success with CEC - but the hardware im controlling is different. All depends on what CEC commands your devices accept.
Here is how I did it, basically when you press the power button on a player, it sends a CEC command to the connected device and powers it on.
I adapted a plugin wernerL started... (happy to post full code)
Plug-in in Squeeze Center:
Reads the button press on the player, and ssh'ed onto the player, then ran a bash script
Then a script on the player is something like this
#!/bin/bash
powerStatus=$(echo "pow 5" | cec-client -s -d 1 |grep "power status" |cut -d ' ' -f 3)
if [ "$powerStatus" = "standby" ]; then
echo "Powering On Amp....."
echo "on 5" | cec-client -s -d 1
fi
powerStatus=$(echo "pow 5" | cec-client -s -d 1 |grep "power status" |cut -d ' ' -f 3)
if [ "$powerStatus" = "on" ]; then
echo "Powering Off Amp....."
echo "standby 5" | cec-client -s -d 1
fi
So cec-client is the tool I used to use to check the power state and send the commands, which is part of LibCEC -http://libcec.pulse-eight.com/
I have gained permission from Pulse Eight to use the Lib and Steen has said we can try to get this working with piCorePlayer - but we need the support from Tiny Core first to enable the RPi's HDMI CEC capability.