Switch Between 2 Different HDMI outputs Custom Command


#1

Hi,
Im just after a bit of help setting up a command which will enable me to switch HDMI audio outputs with one click. I have 2 devices connected to 2 seperate TVs, 1 is through the CPU (I7) and the other is my GPU (gtx1080). At present i move Kodi to which ever TV i need it on and then have to go through the settings to change audio output. I have made this simpler by adding a shortcut on my Kodi homescreen but would like that shortcut gone.
I have no real knowledge on this sort of thing but can learn if given a bit of help. I have managed to create a command that switches to the CPU Audio but cannot figure out how to switch it to the GPU. This was purely done by googling and trying things.

I have used the following

Settings.SetSettingValue
{"setting":"audiooutput.audiodevice","value":"PI:hdmi"}

This switches me back to the CPU Hdmi audio with no issue

If anyone can nudge me in the right direction i would massively appreciate it and please don’t think i haven’t been researching as i genuinely have and to be honest i think ive mangled my head a bit going of on different lines lol
happy new year
mike


#2

I don’t know the commands and they are often specific to each devices.

But most users do use
https://forum.kodi.tv/showthread.php?tid=200081
to set up their profiles then just create custom commands to call that plugin to switch profiles.


#3

yes i did see that, may be the way to go if i cant get my head round it.
just trying to keep it simple as possible for the family.
many thanks


#4

This is as simple, 1 button in Yatse that will call that plugin that configure Kodi correctly.

Main advantage is that it can switch many settings and not just the output, but stereo upmix and many others.