Kodi Community Forum

Full Version: A question on notifications
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm a big fan of XBMC/Kodi, I have it in a great little music setup and as a personal project I'm writing a remote in Python. I have the JSON-RPC interface working, but I feel like I'm missing something on notifications. It seems like, eg, Application.OnVolumeChanged should be sent out by Kodi when the volume changes, but is there a way to subscribe to this, or should I be subscribed automatically when I connect with a websocket?
Thanks!
Try the script in my sig, run "./texturecache.py monitor @logfile=./tc.log" and various events will be output to the console. Add @xbmc.host=<ip.address> if your client is remote. Look at the log for the JSON-RPC requests/responses - you basically need a thread that processes these same JSON notification messages.
WebSockets and TCP sockets support notifications. HTTP doesn't. You shouldn't have to enable anything to receive them.
Ok, I have it now, I was just over-thinking it. It looks like every connected device just gets all the notifications, no need to subscribe or anything.
Works great (so far).