Changing audio output from ssh

I am trying to change audio outputdevice to play squeezelite from the analog (3.5mm) output.

When i edit the guisettings it changes back to HDMI everytime i start up kodi ( i have tried PI:ALL, PI:Analog, PI:Both).

Does anyone have any ideas?

Im running the setup headless so i need to do it with ssh.

Using latest OSMC and RPi 2.

You need to stop Kodi first via systemctl

1 Like

Forgot to mention that i used the systemctl stop mediacenter befor editing the xml file.

Can you show us what you edited (values)?

I am trying to edit this


To this


But every time i edit the file (and save it) and start kodi it goes back to HDMI again.

Is Pi:Analogue the exact string that is in guisettings if you change it via Kodi’s GUI?

I think it may actually be Analog.

First thing first, as Sam wrote find out exactly what’s the correct name displayed for the Audio Sink. Suggest you install VNC server to check that out.
Then you actually can use remote-cli from ssh that will allow you to change the audio sink from ssh with actually Kodi running.