[Deprecated] [TESTING] Bluetooth audio streaming (A2DP)

Guess you already found this

Well as @ooZee wrote search is your friend and while checking the Kodi Wiki will help you to understand the concept you even can search OSMC and find more closeer answers

Typing “change audio output ssh” into the search box top right gets you here:
https://discourse.osmc.tv/search?q=change%20audio%20output%20ssh

And that shows you several thread discussing the topic. In one I posted what I use.
Here is my current solution that also shows notification on screen.

Switch to HDMI
> curl -H “Content-type: application/json” -X POST -d ‘{“jsonrpc”:“2.0”,“method”:“Settings.SetSettingValue”, “params”:{“setting”:“audiooutput.audiodevice”,“value”:“PI:HDMI”},“id”:1}’ http://user:pass@osmc:8080/jsonrpc
> curl -H “Content-type: application/json” -X POST -d ‘{“jsonrpc”:“2.0”,“method”:“GUI.ShowNotification”, “params”:{“title”:“AUDIO OUTPUT”, “message”:“Switched to HDMI”}, “id”:1}’ http://user:pass@osmc:8080/jsonrpc

Switch to Bluetooth
> curl -H “Content-type: application/json” -X POST -d ‘{“jsonrpc”:“2.0”,“method”:“Settings.SetSettingValue”, “params”:{“setting”:“audiooutput.audiodevice”,“value”:“ALSA:pulse”},“id”:1}’ http://user:pass@osmc:8080/jsonrpc
> curl -H “Content-type: application/json” -X POST -d ‘{“jsonrpc”:“2.0”,“method”:“GUI.ShowNotification”, “params”:{“title”:“AUDIO OUTPUT”, “message”:“Switched to Bluetooth”}, “id”:1}’ http://user:pass@osmc:8080/jsonrpc