• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22
Release Execute user tasks for Kodi events (callbacks ver2)
Sorry if this is asked before.
I want to run a python script 'on playback started', when movies with the extension .mkv is played. Is this possible with this plugin?

Thank you
Reply
The simple answer is yes.  Just set it up to run on "playback started", then in your python script early on, see if the file extension is one you want to mess with.  If it isn't just exit the script.  If it is, then do what you want to do.
Reply
I have really basic knowledge of python. I want to dim my lights, when the main movie starts, but not when I play a trailer. I was thinking about running a python script.

But how would I trigger that in a python script. How can the script know what file is played?
Reply
(2016-04-16, 14:45)KenV99 Wrote: I pushed an update to the gotham branch. Hopefully that fixes your problem, but you may not be able to use the 'percent played' variable for playback ended.
Thanks for the addon.I'm using Krypton and I'm having trouble subbing the 'percent played' variable for onPlayBackStopped. Does it work?
Reply
(2018-04-28, 21:51)spambus Wrote: How can you make a post request with this addon?

when the post request is in the format:
http://somedomain.com/api/services/scene/turn_on
-d "{"entity_id":"scene.lights_off"}"
-H "Content-Type: application/json"

how do you get the -d string to be send by the addon when you are doing a post request? in the addon you can only specify the http string
 Try ??{"entity_id":"scene.lights_off"} on the var subbed args string
Reply
(2017-05-05, 07:20)kulgan Wrote: Hi,

I'm using osmc on PI3.
kodi 17.1
callbacks 1.0
I use 2 profiles "Enfants" and "Master User" at boot, kodi start on "Enfants".

What I'm trying to acheive is, when using Master user profile, "on screensaver activate" to have an automatic kodi restart (and so to be back in "Enfants" profiles)

Issue : is seems calback addon only load configuration of first profile, indeed If in both profile callback is reconfigured to restart onscreensaveractivated, "Master user" is properly restarted (but in that case "Enfants" is also restarted.)
if "Enfants" is configured to no action and Master to restart on screensaver : restart doesn't happen.
Note : if when log in master I enter callback addon configuration, after existing configuration, then restart happenned on screensaveractivate.

Thanks for your help.
 Thanks! I was struggling with the same problem (how to make sure I did not leave the parents profile unlocked by accident).

Your post made me realise I could have Kodi starting on the master profile and swapping to Kids using an On Idle event and a LoadProfile(Kids) builtin function as my task.

This works well enough for my current needs but it is just a matter of time until my eldest is old enough to realise it is possible to access the master profile by rebooting the machine and using it before it went idle, so I changed it to:

1. Kodi always starts on Kids;

2. On Kids, I have an on Resume After Idle set for 1800 seconds triggering a LoadProfile(Kids) buil tin function task - I chose "on Resume After Idle" instead of "on Idle" so the box isn't loading the profile every 30 minutes while not in use;

3. My master profile is locked with a numeric pad with exactly the same config on Kodi Callbacks (load Kids on resume after 30 minutes idle) - It looks like Kodi Call Backs only seems to run on another profile if it ran on the first profile loaded at boot, but that 1st run isn't persistent across profiles. So it seems you need to replicate the set up across profiles in order to move back and forth.

I haven't tested this exhaustively but for now it seems to work like a treat.
Reply
Hi all,

I have issue with the plugins....

I have a led strip in my movie room controled by wifi, so i want to control it with Kodi.

I made a script in autoit that work perfectly, so i want callback plugins to use it ( for light on when pause, and light off when play )

But the plugins doesn't run my script/applicaiton despite what it display :

Image

Configuration :

Image

Image

here is the kodi.log witch seem to run the task :
Quote:21:27:19.430 T:12580 NOTICE: VideoPlayer: finished waiting
21:27:19.496 T:5580 NOTICE: $$$ [kodi.callbacks] - Command for Task T1, Event onPlayBackEnded completed succesfully!
The following message was returned: taskScript ARGS = led_control_cine.exe
SYSEXEC = None
BASEDIR = E:\Led_Control

First my script use parameter, but for testing purpose i disable this, so only the calling exe should work ( as it work on a dos command ), but nothing in kodi...

For information, no space in application path : E:\Led_Control\led_control_cine.exe


Someone have an idea ? Thanks !
Reply
It appears this plugin is broken in kodi 18.  I heavily relied on this plugin for home automation purposes.  Ken, if there is any way you're still around to update this, it would be greatly appreciated.
Reply
Hi @KenV99,

First, thank you for your hard work developing the addon Smile
I have read in documentation:
Quote:I need to a respond to an event that isn't listed as an event. Can you make it so that I can?
Most likely, no. Pretty much everything that can be detecte

But maybe it would be possible to configure my idea. Thing is - I have quite low end device for Kodi (Steam Link), and when using Youtube addon with Suggested Videos (autoplay functionality for Youtube) - I need to wait about 20 seconds to view next movie.
I thought it would be really nice, if action SkipNext could be triggered in last 20 seconds of the movie.

So, the video playback starts (let's say, video is 4 mins long) and at time 3 minutes 40 seconds - SkipNext action would be automatically triggered.

I hope I've explained it quite clear. Do you think it's possible with current implementation? Smile
Reply
on playback started does not seem to trigger properly
Reply
I had been using this for some time but since "playback started" event is not triggered in Kodi v18 I turned back to the kodi-callback-daemon
https://github.com/pdf/kodi-callback-daemon

It is a little more hassle to configure (command line) but it works perfectly by using the JSON-RPC API.
Reply
Indeed, on Kodi 18 "on playback started" does not often trigger properly.
Is it likely that this will be fixed soon, or should I look for alternatives?
Reply
could this be used to turn on or off a smart outlet? i have a pi3 for ambilight plugged into an adapter so i can tell google home to turn it off or on. i would like to automatically turn it ON when a movie starts playing.
Reply
The addon works as expected but when I start Kodi it adds 32 times the following lines to kodi.log:

txt:

22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T1.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T1.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T2.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T2.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T3.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T3.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T4.scriptfile"
22:21:12.036 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T4.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T5.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T5.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T6.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T6.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T7.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T7.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T8.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T8.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T9.scriptfile"
22:21:12.037 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T9.scriptfile"
22:21:12.038 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-14,5)" for "T10.scriptfile"
22:21:12.038 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-14,5)" of old setting definition for "T10.scriptfile"
22:21:12.039 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference setting (relative index: -80; absolute index: -4) in another category in old setting condition "eq(-80,32241)" for "E1.matchIf"
22:21:12.039 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E1.matchIf"
22:21:12.039 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference setting (relative index: -81; absolute index: -4) in another category in old setting condition "eq(-81,32241)" for "E1.rejectIf"
22:21:12.039 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E1.rejectIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E2.matchIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E2.matchIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E2.rejectIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E2.rejectIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E3.matchIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E3.matchIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E3.rejectIf"
22:21:12.040 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E3.rejectIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E4.matchIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E4.matchIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E4.rejectIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E4.rejectIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E5.matchIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E5.matchIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E5.rejectIf"
22:21:12.041 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E5.rejectIf"
22:21:12.042 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E6.matchIf"
22:21:12.042 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E6.matchIf"
22:21:12.042 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E6.rejectIf"
22:21:12.042 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E6.rejectIf"
22:21:12.043 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E7.matchIf"
22:21:12.043 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E7.matchIf"
22:21:12.043 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E7.rejectIf"
22:21:12.043 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E7.rejectIf"
22:21:12.044 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E8.matchIf"
22:21:12.044 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E8.matchIf"
22:21:12.044 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E8.rejectIf"
22:21:12.044 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E8.rejectIf"
22:21:12.045 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E9.matchIf"
22:21:12.045 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E9.matchIf"
22:21:12.045 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E9.rejectIf"
22:21:12.045 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E9.rejectIf"
22:21:12.046 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-80,32241)" for "E10.matchIf"
22:21:12.046 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-80,32241)" of old setting definition for "E10.matchIf"
22:21:12.046 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: cannot reference separator setting in old setting condition "eq(-81,32241)" for "E10.rejectIf"
22:21:12.046 T:140355353696000 WARNING: CAddonSettings[script.service.kodi.callbacks]: failed to parse visible condition "eq(-81,32241)" of old setting definition for "E10.rejectIf"

What can cause this?
Reply
(2019-01-09, 23:44)pikim Wrote: The addon works as expected but when I start Kodi it adds 32 times the following lines to kodi.log:
Yeah I have seen the same in my log  since updating to leia
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22

Logout Mark Read Team Forum Stats Members Help
Execute user tasks for Kodi events (callbacks ver2)3