A question on notifications - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: A question on notifications (/showthread.php?tid=203719) |
A question on notifications - pscheidler - 2014-09-05 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! RE: A question on notifications - Milhouse - 2014-09-06 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. RE: A question on notifications - Montellese - 2014-09-06 WebSockets and TCP sockets support notifications. HTTP doesn't. You shouldn't have to enable anything to receive them. RE: A question on notifications - pscheidler - 2014-09-06 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). |