Ok i installed open elec on a notebook and downloaded putty
So i login to ssh using root access and i tried your script (yes i know that i need to edit with my output but i start to see if connection works correctly)
curl -v -H "Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"ALSA:hdmi:CARD=NVidia,DEV=1"},"id":1}'
http://localhost:9191/jsonrpc
but it give me this error:
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* connect to 127.0.0.1 port 9191 failed: Connection refused
* Trying 127.0.0.1...
* connect to 127.0.0.1 port 9191 failed: Connection refused
* Failed to connect to localhost port 9191: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 9191: Connection refused
* Hostname was found in DNS cache
* Trying 127.0.0.1...
* connect to 127.0.0.1 port 9191 failed: Connection refused
* Trying 127.0.0.1...
* connect to 127.0.0.1 port 9191 failed: Connection refused
* Failed to connect to localhost port 9191: Connection refused
* Closing connection 1
So i tried to edit the script with ip of open elec hardware instead of local host so:
curl -v -H "Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"ALSA:hdmi:CARD=NVidia,DEV=1"},"id":1}'
http://192.168.2.13:9191/jsonrpc
but:
* Hostname was NOT found in DNS cache
* Trying 192.168.2.13...
* connect to 192.168.2.13 port 9191 failed: Connection refused
* Failed to connect to 192.168.2.13 port 9191: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 192.168.2.13 port 9191: Connection refused
It's not a good start