[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152) +---- Thread: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) (/showthread.php?tid=151011) |
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-01-06 Hi, I have created a simple service addon to execute user scripts on specific XBMC actions, right now the actions supported are:
I did a quick search and could not find anything similar. Also, this is my first attempt to write an addon so things might just not work. I use it to notify another computer when I am using XBMC so it stops its network activity (I am using a raspberry pi as server and it really cannot cope with a lot of things). Add-on name: service.xbmc.callbacks Current version: v0.5 Download: service.xbmc.callbacks-v0.5.zip Compatibility: checked only in Frodo Notes:
As said, it is quite simple but maybe it can help others... Great! - gnorf - 2013-02-27 Thanks for this, just the stuff I did need to solve my issues, had to reg a account to show my gratitude. I use it to set the minfrequency higher on the CPU, avoiding lag in the interface and 1080p while the screensaver is off and dimming the lights in the room while playing a movie, only thing I miss is the ability to do stuff on pause/unpause - would be good to turn some light on to find the way to the loo thnx again g RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-03-01 Glad another soul is using it I just created a new version adding callbacks for pause / resume a movie. Let me know if they work. Here is the link to the file (also on first post): https://github.com/pilluli/service.xbmc.callbacks/archive/v0.2.zip Regards, RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sebj - 2013-03-01 I just stumbled on this, and I think it's a great idea. What kind of scripts does it run? bash? python? RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-03-01 (2013-03-01, 17:20)sebj Wrote: What kind of scripts does it run? bash? python? Hi, It runs whatever script you can run in your computer (so can be in any language). Basically you point to a file (the script) you want to be executed when an action in XBMC occurs. Hope it clarifies it! Regards, RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - gnorf - 2013-03-02 Just installed v0.2, and it's working purrfect on pause/resume - now I won't break any toes running for the loo Have to say that it makes integration of xbmc with the home automation stuff I do easy and slick, can't be happier! ;D As my xbmc computer also is acting as an server for various less cpu needy stuff and is on 24/7 - the screensaver callback does make it possible to run it on lowest possible cpu speed and spin down drives when not needed as an HTPC (drawing less power = less heat = less noise) while cranking it up when in action to make it snappy. Before finding your addon I had to run the computer on "cranked up" settings permanently or set it manually (usually forgetting to turn it down), now it just works automagic and the silence is golden. Big thanks again g RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sebj - 2013-03-16 Hey, I'm really interested in your service addon for my openelec main system. I've calibrated the display and wish to apply the icc profile on xbmc startup not the system startup like I do now (In case xbmc crashes or whatever) I'm getting an error though here it is : Quote:10:13:51 T:2919230272 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- Any ideas? disclosure : using openelec 2.99.5 with the 32bit generic package RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-03-20 Hi, Could you please let me know which script you want to execute when XBMC starts? I think there is something wrong in that script and the addon can not locate it properly... Regards, (2013-03-16, 16:09)sebj Wrote: Hey, I'm really interested in your service addon for my openelec main system. RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sebj - 2013-03-20 filename : icc.sh permissions : -rwxrwxrwx ( sleep 10 /storage/downloads/xcalib -d :0 -s 0 /storage/downloads/pioneer.icc )& RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - pilluli - 2013-03-22 sebj, I understand your script runs OK when executed from command line right? If so ... the only problem I see is that somehow the addon does not find the script location. Are you using the full path to locate the script in the addon settings? (2013-03-20, 01:03)sebj Wrote: filename : icc.sh RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sebj - 2013-03-28 I can launch the script via the commandline and it's in an obvious path location... I don't understand.... bummer... RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - sebj - 2013-03-28 Ok, jumped to conclusions here. I have it working. It needed #!/bin/bash at the beginning. Code: #!/bin/bash This script automatically applies an icc profile when starting xbmc. Loving it, thank you so much for this addon pilluli RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - fernandovg - 2013-03-28 Can I run this infinite loop script in you add-on? It tail the kern.log and do a library update when a HDD gets mounted so I must run all the time because I plug/unplug my HDD a lot of times /home/pi/sync.sh Code: #!/bin/bash RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - fernandovg - 2013-03-28 Thanks! Its working! RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - mbw2001 - 2013-03-29 Would it be possible to catch the "Put display to sleep when idle" from Power Saving? I am currently powering down my projector when the screen saver is activated, but i would like to be able to use Dim for screen saver and only poweroff the projector when idle. |