Linux On screen notifications in Eden
#1
Although there are solutions available for this problem - none of them suit me and so I'm going to roll my own.

I am writing a console app that will run as a daemon. It's purpose is to detect when a DVD or Blu-ray is inserted an automatically rip it to my NAS using MakeMKV and Handbrake. All I want to be able to do is provide an onscreen notification in XBMC to tell the user what's happening. For instance, something like: "Ripping in progress" and then ""Rip complete". I'd like the notifications to be skin-compliant (i.e. look like the notifications you usually get in the top right-hand corner when scraping, etc).

I am running the stable (Eden) version of XBMC on Ubuntu 12.10.

Is there an API function that will achieve this that I can call from my daemon?

Many thanks,
Reply
#2
Yes, you can use the JSON-RPC API to trigger the builtin Notification-method.
Example:
Code:
http://<xbmc-ip>:<jsonrpc-port>/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"fooo","message":"bar"},"displaytime":10000,"id":1}

The following is deprecated for Frodo (but still works on Eden):
HTTP API: http://XBMC-IP/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(heading,message))

regards,
sphere
My GitHub. My Add-ons:
Image
Reply
#3
The JSON-RPC method is not available in Eden, only in Frodo whereas the HTTP-API method is available in Eden but has been removed for Frodo. If you plan to stick with Eden for a while (at least until Frodo stable is released) use the HTTP-API method for now (it's a simple curl call with the URL posted by sphere) but remember that you'll have to change/fix it when switching to Frodo (again it's a simple curl call with either the URL posted by sphere (but you have to URL-encode the value of the "request" option) or you can do the same thing with a HTTP POST request).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Thanks guys. I might write a wrapper for both and use the appropriate one depending on the version of XBMC installed.
Reply

Logout Mark Read Team Forum Stats Members Help
On screen notifications in Eden0