Posts: 83
Joined: Jan 2015
Reputation:
2
Prior to Kodi18 update this used to work for me and I used to for controlling the level of my lighting whilst play,stop,pause etc.
With this now broke is there a working alternative or built in method?
I just need to call a webpage url to talk to my home automation system.
Posts: 83
Joined: Oct 2008
Reputation:
0
Only work around I've found is to setup resume playing then pause for a second when I start a video. Annoying but I've gotten used to it.
Posts: 83
Joined: Jan 2015
Reputation:
2
Yeah I noticed it seems to work once the video is already in progress.
Posts: 14
Joined: Nov 2010
Reputation:
0
Hello All,
I would like to use the json notification event for volume changes. For that it is clear that I must specify xbmc as sender and Application.OnVolumeChange as method. But the addon also requests to specify the data. However, I wish to have trigger for any volume level and either muted or not. How to configure that then? Can I used wildcards for the data field?
Posts: 14
Joined: Nov 2010
Reputation:
0
Bump. Is it possible to use wildcards in the data field when subscribing to json notificatinions?
Posts: 14
Joined: Oct 2010
Reputation:
4
Hi all, I'm crudely jumping in here without reading a lot of the thread history. I just started looking into this plugin and also hit the issue that "on Playback started" does not function properly on Leia.
I managed to fix it by changing the "except KeyError:" in the getInfo routine on line 269 in player.py to "except:". I have not done any other testing, so this might break a whole bunch of other things, but it seems to fix the "on Playback started" event.
For people that speak json rpc and want to dig into this a bit more: The call on line 261:
player = json.loads(xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}'))
seems to respond the following when starting a new video:
{u'jsonrpc': u'2.0', u'id': 1, u'result': []}
This causes an "IndexError: list index out of range" in line 267.
If a video was playing before and it got interrupted because you started another one, the response is:
{u'jsonrpc': u'2.0', u'id': 1, u'result': [{u'playerid': 1, u'type': u'video', u'playertype': u'internal'}]}
which does not trigger any issues in line 267&268
Posts: 1
Joined: Jun 2019
Reputation:
0
I created an account just so I could post here as I've been following this thread for a while. koekiemonster's fix works for me. I use the callbacks addon to control my home theater lights through Smartthings and webcore based on events in kodi (using north3221SmartThings on github to add kodi devices to smartthings). My nvidia shield still runs Kodi 17 specifically because callbacks hasn't worked with version 18. My computer has version 18 installed so I set up callbacks and a couple pistons in webcore to make changes to my lights when I play and stop a movie and it works. Very exciting! At this point, I haven't noticed anything that isn't working. Hopefully the fix doesn't break anything else, but so far it looks good to me. Thanks koekiemonster!
Posts: 175
Joined: Jul 2018
Reputation:
2
2019-06-19, 12:48
(This post was last modified: 2019-06-28, 13:57 by badsheep.)
Thanks koekiemonster ! Can’t wait to test that !
EDIT >> YEP IT WORKS !!! Thanks
EDIT2 >>
Nope, there is a problem :
This fix works well with local video files, but doesn't work for streaming (TV or Netflix for example).
In this case the behavior is like before : it only works when a video interrupts another.
Any idea ?
EDIT 3 >>
Well maybe it's the script I execute who has a problem with streaming videos...
Forget what I just said above, I'll do tests.
Thanks and sorry !
4th AND LAST EDIT >>
Yep your workaround is working perfectly, my script was the fault !
(it was asking informations too fast for streaming videos, who didn't had the time to load... a simple delay of few seconds resolved the issue).
Thank you very much koekiemonster !!
Posts: 175
Joined: Jul 2018
Reputation:
2
2019-06-24, 20:58
(This post was last modified: 2019-06-28, 14:26 by badsheep.)
I'd like to use the onShutdown option and I think it doesn't work...
Any idea ?
Thanks !
Posts: 175
Joined: Jul 2018
Reputation:
2
I found a workaround...
Still if anyone can fix this bug it would be helpfull ! Thanks
Posts: 562
Joined: Nov 2011
Reputation:
10
Hi guys, anyone successfully using event: onWindowOpen / onWindowClose ?
Not working for me.
Thanks!