Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Curl command not working for remote reboot
#1
I've been staring at this for way too long, can't see why this command isn't working from powershell on windows.

Kodi 18.1 on LibreELEC
Code:
curl.exe -i -X POST -d '{"jsonrpc": "2.0","id": 1,"method": "System.Reboot"}' -H "content-type:application/json" http://kodi:[email protected]:8080/jsonrpc

here's my response
Code:
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 76
Content-Type: application/json
Cache-Control: private, max-age=0, no-cache
Accept-Ranges: none
Date: Mon, 29 Apr 2019 21:58:29 GMT

{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
Reply
#2
Also failed trying this...

Code:
curl.exe -X POST --user kodi:kodi --header 'content-type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "System.reboot" }' http://10.10.59.58:8080/jsonrpc
Reply
#3
Try System.Reboot (capital R)

Hmm, just tried it myself, works fine from a linux box but fails from windoze , ask MS to fix their crap ))

Edit2: this is powershell problem, try escaping the " with \" in data, like this:
Code:
 curl.exe -X POST --user kodi:kodi --header 'content-type: application/json' --data-binary '{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"System.Reboot\" }' http://10.10.59.58:8080/jsonrpc
Worked for me.
Reply
#4
(2019-04-30, 01:01)asavah Wrote: Try System.Reboot (capital R)

Hmm, just tried it myself, works fine from a linux box but fails from windoze , ask MS to fix their crap ))

Edit2: this is powershell problem, try escaping the " with \" in data, like this:
Code:
 curl.exe -X POST --user kodi:kodi --header 'content-type: application/json' --data-binary '{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"System.Reboot\" }' http://10.10.59.58:8080/jsonrpc
Worked for me.
Thank you so much , this worked for me!!!
Reply

Logout Mark Read Team Forum Stats Members Help
Curl command not working for remote reboot0