Is it posible bind key for toggle (on/off) bluetooth?
Do you want to toggle on/off the Bluetooth dongle or do you just want to change audio output from Bluetooth to HDMI
In best scenario:
- turn on dongle/rpi3 bluetooth, pair with my Beats, switch audio to ALSA
- turn off bluetooth, switch audio to HDMI
I will look at osmcsettings addons and write my own for toggling bluetooth, only one think remain that i doesn’t know. Is it posilbe change audio output in addon? Yes it is!
Looks you already found a solution.
I just use a json command to switch between the two
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://xbmc:xbmc@localhost:8080/jsonrpc
HDMI: curl -H "Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"ALSA:HDMI"},"id":1}' http://xbmc:xbmc@localhost:8080/jsonrpc