Forum
read out XBMC play, pause stop status - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: read out XBMC play, pause stop status (/thread-2055.html)

Pages: 1 2 3


read out XBMC play, pause stop status - lukeg01 - 8th Feb, 2014 06:39 AM

Can any1 help me out?


RE: read out XBMC play, pause stop status - lukeg01 - 19th Feb, 2014 04:31 AM

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


RE: read out XBMC play, pause stop status - mk01 - 16th Mar, 2014 06:35 PM

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



RE: read out XBMC play, pause stop status - lukeg01 - 6th Apr, 2014 08:54 PM

(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?


RE: read out XBMC play, pause stop status - CurlyMo - 6th Apr, 2014 10:12 PM

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.


RE: read out XBMC play, pause stop status - lukeg01 - 6th Apr, 2014 10:15 PM

Cool, could you give me a link to the page that shows how to configure it


RE: read out XBMC play, pause stop status - CurlyMo - 6th Apr, 2014 11:17 PM

Not yet done.


RE: read out XBMC play, pause stop status - lukeg01 - 6th Apr, 2014 11:25 PM

Than could you tell me how to?


RE: read out XBMC play, pause stop status - CurlyMo - 6th Apr, 2014 11:59 PM

No, not yet, because then i would essentially tell the same thing as i would say in the wiki page.


RE: read out XBMC play, pause stop status - lukeg01 - 7th Apr, 2014 12:02 AM

O, okay


RE: read out XBMC play, pause stop status - lukeg01 - 7th Apr, 2014 01:31 AM

Still I like to get it functioning this way... What's wrong with the script?


RE: read out XBMC play, pause stop status - CurlyMo - 7th Apr, 2014 06:54 AM

Done, check the pilight wiki.


RE: read out XBMC play, pause stop status - lukeg01 - 7th Apr, 2014 04:03 PM

I don't really understand it, where to specify wich units you want to switch


RE: read out XBMC play, pause stop status - CurlyMo - 7th Apr, 2014 11:40 PM

Just adapt one of these clients:
https://github.com/pilight/pilight/tree/development/clients


RE: read out XBMC play, pause stop status - lukeg01 - 7th Apr, 2014 11:43 PM

Sorry but still Chinese for me :-D is there also a way you can execute a script with pilight's xbmc plugin?