Solved Subscribe to notifications
#1
Hi guys,

I am trying to implement a simple "remote control" for Kodi in python. I am able to use all the callable methods defined in the v8 API reference using kodipydent, kodi-json or kodijsonrpc modules, and it works pretty well.

However I can't figure out how I can subscribe to notifications, like Player.OnPlay or others defined in the API. There aren't many examples on how to archieve this, and none in python.

Maybe this is not possibe with the modules I use, or maybe I misunderstood something... Do you have any pointers?
Reply
#2
Look at https://forum.kodi.tv/showthread.php?tid=226231 for an example.
Reply
#3
Hi!

Sorry, I still don't get it. The modules used in the pointed example seem to be for addons, and I am not developing one. I am on a remote machine and I try to communicate with my Kodi instance using the json rpc endpoint.
Reply
#4
i doubt there are any examples available, so the best i can do is point you to the API docs...
afaik you need to use this method to subscribe to notifications:
https://kodi.wiki/view/JSON-RPC_API/v8#C...figuration

also, as far as i understand from the docs, your client needs to use Websockets to open a tcp connection to kodi in order to be able to receive notifications.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Hi guys,
I was finally able to receive notifications using websockets directly, though the websocket python package. (This example helped me) Thank for your help!
Reply

Logout Mark Read Team Forum Stats Members Help
Subscribe to notifications0