RPi HDMI Switching on CEC Adapter
#1
I've been trying to figure out how to have XBMC switch hdmi ports on my RPi on video stop. I found an add-on that allows me to run a script on a number of different XBMC events, one being player stop. The problem I'm having now is getting the actual script written and working. Through my research I've found 2 utilities that appear to allow control of the CEC adapter. One is CEC-CLIENT and the other (which I stumbled upon last night), is TVSERVICE (an OpenElec tool?). From what I can see TVSERVICE allows certain things (I was able to power on and power off the TV) but not switch HDMI ports. I'm guessing that it sends CEC commands? The other is CEC-CLIENT which allows me to switch the port but executing it from a SSH prompt basically reinitializes the CEC Adapter as CEC-TESTER and takes control away from XBMC until I reboot the RPi. So I was thinking:

1. If possible recompile the TVSERVICE and add hdmi switching capability. (not a big programmer, so not sure if this can be done, or done easily) Wouldn't mind making a mini project and learning my way around some source code and compiling. It's been ages, but always up for a challenge.

2. Use CEC-CLIENT (which the pulse-eight people tell me is a "tool"), but after submitting the command to switch hdmi ports, then reinitialize the CEC adapter in the same fashion as when XBMC starts up. I've yet to find the file that contains that information.

Then hope and pray that this add-on I have will do as it says and run the script on player stop. I tried this last night making a file called cec.sh and putting the following commands:

#!/bin/bash
echo "tx 4F 82 10 00" | cec-client -s

I put the file in the "emulators" directory, so maybe my problem lies there?

I chmod'd it to 775 and then told the add-on to run on video stop and nothing happened. I even tried navigating to it in XBMC file manager and clicking on it and nothing happened. Again, not being a Linux wiz, I'm sure I'm not doing something right. Need some direction.

Am I on the right path here, or is this hopeless. This would be a big feature for me as all of my GUI navigation is done on a iPad (XBMC Touch) so basically making XBMC act more like a HDMI-Passthrough device (only switching to the RPi HDMI port when actually playing a video) and then switching back to my cable box would make this much more usable for my family. Otherwise, it's grab a remote and manually flip through 6 different HDMI inputs (all cryptic) back to the STB.

I appreciate any help you can provide. Thanks.

Roveer
Reply
#2
No responses?

A simpler question. Does anyone know where the information is kept that would initialize the pulse-8 adapter on xbmc startup? If not, does anyone know the sub-forum on this site that I would ask such a question?

Thanks,

Roveer
Reply
#3
Have you tried the command directly from a command-line?
It is possible that, to get it to run in your script you need to provide the path to cec-client, as this may prove not to be included for the shell.

I note that there is a command tvservice in raspbmc - I used it to set up starting conditions for my pi systems, so that i didn't need to have the monitor connected on startup.

I don't know about the pulse-8 stuff at all
Derek
Reply

Logout Mark Read Team Forum Stats Members Help
RPi HDMI Switching on CEC Adapter0