A/V network receiver control via XBMC and scripts?
#1
Question 
I've searched and don;t see anything so far...

My setup:
XBMC on Mac Mini, HDMI video only to an older LG plasma, and audio optical out to my cheap Panasonic HT system. Works relatively well, BUT

This cheap Panasonic hunk of junk thinks it should be the center of the universe so every time it powers on, it defaults to its own "media/entertainment" home screen, and it takes such a mess of button presses to get it to the right optical input that even my Harmony remote gets confused.

The light at the end of the tunnel is that I have found that this Panasonic HTS is controllable via network apps on android, etc. Did some googling and packet sniffing and found that I can easily control it via simple curl scripts on the command line of my XBMC mac mini.

SO - the question. Is there a clean/simple way to have XBMC run a simple command whenever a video is played, or, even better, when the screensaver deactivates (which would signal probable user activity needing audio)? My command would simply run a curl script to the Panasonic HTS that would power it on and switch directly to the correct input.

Thank you!
Reply
#2
The addon for philips hue lights turns your lights on and off on playback, pause and stop, so there is some code there to crib from.

You could also poll this function from the python api:

isPlaying(...)
isPlaying() -- returns True is xbmc is playing a file.

http://mirrors.xbmc.org/docs/python-docs.../xbmc.html

Not sure about return from screensaver.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Hmmm - I think I will try the python first in the morning after some coffee Smile Thank you for the pointer!
Reply
#4
Hi joshjn,

I combined few scripts I came across forum to get something remotely similar.

U use python script to mute my center speaker out (on MBO not receiver) when music is playing and bring it back to 90% when video is playing.

As far as I know there is nothing in API you can use 100% for screensaver, unless you use "Slideshow screensaver" addon
- then you can catch photoplayer as well. with Player.GetActivePlayers() then IDs are: audio = 0, video =1, photo = 2.
Reply
#5
From the same page I already pointed to:

onScreensaverDeactivated(...)
onScreensaverDeactivated() -- onScreensaverDeactivated method.

Will be called when screensaver goes off
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply

Logout Mark Read Team Forum Stats Members Help
A/V network receiver control via XBMC and scripts?0