Kodi Community Forum

Full Version: Execute user tasks for Kodi events (callbacks ver2)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Guys, do you also have a WARNING spamming in your LOG file? Any possible way to fix this?
Is there any way to get this working on Kodi 19?
(2021-02-16, 12:05)TheBuz Wrote: [ -> ]Is there any way to get this working on Kodi 19?
Only if a new programmer step in and update the add-on.
There doesn't seem to be much interest in it.
I use it for switch on and off the lights and at the moment looking for alternatives.
I forked the plugin on Github and began to port it to Python 3. When there's no configuration existing it starts without errors, but it does not work at the moment. Could you please install it, create a configuration and give me some feedback: what did you do and which error occurred in the kodi.log.
I'll try to fix the issues, but I've only limited time and no experience with Kodi plugin development, so please be patient.

You can download it under https://github.com/pikim/script.service.kodi.callbacks -> Code -> Download ZIP. Unzip the content into the Kodi addon directory and remove the trailing '-master' from the directory name.
Addendum:
I only use a very simple setup with only one task (on Idle) and one event (builtin) and that already works. But therefore I need your input about which other features work and which don't. You can reply here or create an issue at Github.
@pikim  I have tried to use your version in Kodi 19, but it seems not to work. I created a task to run a simple python script on event 'On playback started' but nothing happens and also no error stored in the log.
Same task works fine in Kodi 18
(2021-03-06, 14:12)pikim Wrote: [ -> ]Addendum:
I only use a very simple setup with only one task (on Idle) and one event (builtin) and that already works. But therefore I need your input about which other features work and which don't. You can reply here or create an issue at Github.

Hello Pikim, thanks for your effort, I'll give it a try and help you as much as I can.
Seems to work fine here on Coreelec with Kodi 19.

Only using it to detect the videoplayer stopping playback and then running a built in function.
(2021-03-16, 20:25)fm_2511 Wrote: [ -> ]@pikim  I have tried to use your version in Kodi 19, but it seems not to work. I created a task to run a simple python script on event 'On playback started' but nothing happens and also no error stored in the log.
Same task works fine in Kodi 18
Can you share the script you are calling and give me some instructions how I can reproduce your task?
Hi Pikim,
This is a more simplified version of the script to test:
"
import xbmc
import json
import time

time.sleep(4)
video_fps = xbmc.getInfoLabel('Player.Process(videofps)')
is_video = xbmc.getCondVisibility('Player.HasVideo')

if (is_video) == True:
   if (video_fps) == "23.976":
     xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"GUI.ShowNotification", "params":{"title":"Video Frame Rate", "message":"23.976"}, "id":1}')
   elif (video_fps) != "23.976":
     xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"GUI.ShowNotification", "params":{"title":"Video Frame Rate", "message":"other"}, "id":1}')
elif (is_video) != True:
   xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"GUI.ShowNotification", "params":{"title":"File Type", "message":"Audio file"}, "id":1}')
"
Please save it as "test.py" and add to callbacks to Task 1 as Pyton and assign Event 1 (event: 'On Playback Started') to Task 1, see the screenshots
This simple script should display a message on the screen after a few seconds when a movie starts, showing the video framerate: 23.976 or other
I'm using Kodi on HTPC with Windows 10 if matters. On Kodi 18.8 -18.9 the script runs fine (but only after applying this fix https://forum.kodi.tv/showthread.php?tid...pid2873855).

Please let me know if you need other info and thanks for your time!


ImageImageImage
I fixed some minor Matrix 19.1 issues and created
https://github.com/pikim/script.service....cks/pull/2
Hi, thanks for your work.
I have a problem with http tasks on Kodi Matrix 19.1 . The same http task works without a problem on Kodi 18.9.
best regards
Timo



ImageImage


https://paste.kodi.tv/ecihugudeg.kodi
Sorry if this has been posted before, but I can't find any info. Will the Callbacks service addon be updated for Kodi Matrix? Mine got disabled when I updated and I can't find the compatible version.
@Zygon - your question above has been merged into the addon support thread (this current one).

Just in case you were wondering where it had gone...
Hi Pikim,

thanks for fixing this addon, much appreciated.

I installed Kodi 19.1 and tried the addon but I'm having an issue, can't add more than 3 event, when I try to add the fourth one the addon switch off.

If can help here the Debug Log >>> https://paste.kodi.tv/ebaseluguv.kodi
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21