Forum

Full Version: read out XBMC play, pause stop status
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Can any1 help me out?
if i'm not mistaken this is just a config file and i need to make an python aswell ?
can any1 confirm and can some1 help me doing so if neccesary aswell?

luke
Code:
start on screensaver or player or library
task

env UPSTART_EVENTS
env ACTION
env TYPE

script

    echo "$UPSTART_EVENTS $ACTION $TYPE" >> /tmp/events.log

    case $UPSTART_EVENTS in
         screensaver)
                 ;;
         player)
                 if [ $ACTION = START ]; then
                     echo "Video Playing, dimming ligths!"
                      kaku 123 1 dim 4
                 else
                      echo "Video Stopped, brighting ligths!"
                      kaku 123 1 dim 8;
                 fi
                 ;;
         library)
                 ;;
         *)
               ;;
     esac

end script
(16th Mar, 2014 06:35 PM)mk01 Wrote: [ -> ]
Code:
start on screensaver or player or library
task

env UPSTART_EVENTS
env ACTION
env TYPE

script

    echo "$UPSTART_EVENTS $ACTION $TYPE" >> /tmp/events.log

    case $UPSTART_EVENTS in
         screensaver)
                 ;;
         player)
                 if [ $ACTION = START ]; then
                     echo "Video Playing, dimming ligths!"
                      kaku 123 1 dim 4
                 else
                      echo "Video Stopped, brighting ligths!"
                      kaku 123 1 dim 8;
                 fi
                 ;;
         library)
                 ;;
         *)
               ;;
     esac

end script
wich user uses this script?, i got a problem now : i stoped using the "kaku" script because it worked terrible, i went to pilight now and made a script wich can be activated with
Terminal
sudo python /home/xbian/lights.py arg
arg can be replaced with "play" "pause" and "stop"
but pilight needs root... so i though maybe i can give wich user uses this script nopwd premission for pilight (i'm not even shure how to do that so i'm going to ask curlymo if doesn't already responses on this thread

luke

-edit-
i made it possible without root using direct path

okay... next problem, even tough it logs the items it doesn't seem to execute the script, any ideas?
A XBMC protocol has been added in latest pilight version. That protocol can read the play / pause / stop actions and the media type song / movie / episode.
Cool, could you give me a link to the page that shows how to configure it
Not yet done.
Than could you tell me how to?
No, not yet, because then i would essentially tell the same thing as i would say in the wiki page.
O, okay
Still I like to get it functioning this way... What's wrong with the script?
Done, check the pilight wiki.
I don't really understand it, where to specify wich units you want to switch
Sorry but still Chinese for me :-D is there also a way you can execute a script with pilight's xbmc plugin?
Pages: 1 2 3
Reference URL's