change audio device via CLI

Hello All,

in the settings of RasPlex i can change the Audio output Device. As example i can change from HDMI to bluetooth.

My question is, how can i trigger this change at the commandline?

I want to have a script which is change the Audio output Device in case of a bluetooth connection.

Thank you,

Bye
Cinux