Run script and get output as popup

Hi guys :slight_smile:

Gotta question, if this is doable: I would like to execute some kind of script via Vero remote or Yatse (most likely py), which is running an API call via curl. That request receives a reply (json string) and I would like to parse it and send the output to a popup window or something like that in Kodi. It simply should display the text from the curl call. Should be closed with a click on OK. It could also be that kind of an information or error popup which is displayed on some events on the lower right corner, e.g. when Kodi starts and Netflix or PVR is loading. Those self closing massages. That would also totally be fine.

Yes, that’s possible and should be quite trivial. We basically do it when we upload logs and return a log URL, check for updates etc.

If you want the message in the top right corner (most skins), it’s called a toast. You should be able to find some examples of this online.

If you enable the RPC stuff in Kodi, you can have an external script post a notification (it would be the kind in the corner that goes away after some period of time) using a JSON RPC call:

https://kodi.wiki/view/JSON-RPC_API/v12#GUI.ShowNotification

1 Like

If your doing it with bash…
kodi-send -a "Notification(First Line,Second Line,5000)"

Thanks for the replies :slight_smile:
Script and button on remote is ready and working, currently trying to pass the content of the var to the last command:

xbmc.executebuiltin('Notification(Audioformat,audio_format,5000)')

That command only seems to accept plain text :slight_smile:
Popup is displayed, but instead of content of audio_format it just displays the text audio_format, also doesnt work with putting it in ‘’.
But I am on a good way so far hehe…

Solution found <3

xbmc.executebuiltin('Notification(Audioformat,%s,5000)'%(audio_format))

Thanks again guys!

1 Like