August 17, 201312 yr I'm looking for unRAID to send a notification somehow to XBMC ideally once it's booted. Maybe it could utilise IFTTT perhaps? Adding something to my go script seems the obvious choice, but what?
August 17, 201312 yr I think it has to be a json notification. Shouldn't be overly difficult to figure out, you might want to ask on the sickbeard forums, the dev is usually really helpful with coding stuff. neat idea, btw.
August 17, 201312 yr Author will have a look at that. I want it because on my system XBMC loads instantly on boot, but the unraid VM takes around 45-60 secs to boot and until unraid is up i obviously cant play any media! will report back with what i come up with.
August 17, 201312 yr Author OK well I've found the relevant syntax... http://10.0.0.99:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22unRAID%22,%22message%22:%22unRAID%20has%20now%20booted!%22},%22id%22:1} Paste that into your browser (substitute the IP address) and you will get a notification. How do I do this via go script though? For reference this is what happens if I just put the above into the go file directly... oot@unRAID:/boot/config# sh go : command not found : command not found go: line 6: http://10.0.0.99:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22unRAID%22,%22message%22:%22unRAID%20has%20now%20booted!%22},%22id%22:1}: No such file or directory
August 17, 201312 yr wget -O - "your url here" You need to use the wget command to make the connection. Something like this: wget -O - "http://10.0.0.99:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22unRAID%22,%22message%22:%22unRAID%20has%20now%20booted22},%22id%22:1}"
August 17, 201312 yr Author Thanks Joe. I was headed down this route from this post (at the bottom)... http://stackoverflow.com/questions/4315111/how-to-do-http-request-call-with-json-payload-from-command-line I am getting this output currently based on your command. I'm working on this right now, and think I'm really close just need the syntax right. --2013-08-17 15:11:14-- http://10.0.0.99:8080/jsonrpc?request=%7B%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:%7B%22title%22:%22unRAID%22,%22message%22:%22unRAID%20has%20now%20booted!%22%7D,%22id%22:1%7D Connecting to 10.0.0.99:8080... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed.
August 17, 201312 yr Author KNEW I was close. Oh yes, this works! Add the following to your go script and update the final part of the string with your XBMC IP and username / password as appropriate! #xbmc notification wget -q -O/dev/null --header='Content-Type: application/json' --post-data='{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"unRAID Notification","message":"unRAID is now booted!"},"id":1}' http://xbmc:[email protected]:8080/jsonrpc
Archived
This topic is now archived and is closed to further replies.