Kodi Community Forum

Full Version: Json RPC Send Notifications with wget help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I am trying to use JSON to send a basic notification to XBMC using wget in a batch file.

I found this command in Sickbeard forum.
Code:
http://localhost:80/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Message Title","message":"Message Body"},"id":1}

This works great in firefox, but when I try to use wget to run it, it creates a bunch of log files which I don't want as they will accumulate over time.

I have tried modifying it to use the quiet and output switches respectively with no luck.

Code:
"C:\Program Files (x86)\GnuWin32\bin\wget.exe " -bqo jsonrpc.log "http://localhost:80/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Message Title","message":"Message Body"},"id":1}"

Any ideas to stop all of these output files being generated in the folder?
Try using

wget --delete-after

Seem to remember that deletes the files it creates.
script to show how much space you have on / sdb1 sdc1


Code:
export var1=`df -h | egrep "(\/$|sdb1|sdc1)" | awk '{print $4"|",$6"|"}'|tr -d '\n'`
wget --header="Content-Type: application/json" --post-data="{\"jsonrpc\":\"2.0\",\"method\":\"GUI.ShowNotification\",\"params\":{\"title\":\"Title Goes Here\",\"message\":\"$var1\", \"image\":\"<image path or URL to image here>\"},\"id\":1}" http://localhost:9999/jsonrpc