Kodi Community Forum

Full Version: Audio Profiles - Easy switch between different audio settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Hi. This is a encoding string problem. Thanks for report. For now delete special characters and local language characters from profiles name.
As far as using JSON to setup my remote to switch to a particular profile:

Code:
http://192.168.1.213/jsonrpc?request={"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.audio.profiles","params": ["0"]},"id":1}

Which parameter is the number of the profile I want to switch to? Is it the first one in square brackets, or is it the ID? My first attempt (with irule) toggles profiles rather than switching to a specified profile.
Just curious why use json and not a key id ?

Edit:ok got it...it's not ir remote
A feature request: Remember Audio delay setting for each profile (bt headphones tend to need a little delay)
(2016-07-22, 17:35)teemue Wrote: [ -> ]A feature request: Remember Audio delay setting for each profile (bt headphones tend to need a little delay)

Unfortunately it's not possible so far, this setting is not in the JSON API.

On another subject, I'm currently facing an issue where the selection window won't auto-close unless I move the cursor or press a key. What would you need to debug that ? Is a full debug log enough ?
Hello,

Is there a way to set a profile as default on startup? For me, I switch between analog/digital outputs however if I leave it on digital and the device is offline when I restart Kodi the audio won't work for any device.
Sorry for the newby question. But after 2 hours of trying I'm lost:

I like to be able to switch between analogue and my dac (=audio set). Work with Openelec / RaspberryPi 3 / Kodi 15.2. Made 2 profiles. Now I try to call/select these profiles via my remote (Yatse).

I added the following file to userdate/keymaps like instructed in this forum:

<keymap><global><keyboard><key id="101">activatewindow(favourites)</key><key id="49">runscript(script.audio.profiles,0)</key><key id="232">reboot</key></keyboard></global><FullscreenVideo><remote>

also tried this one:

<keymap>
<global>
<keyboard>
<t>RunScript(script.audio.profiles,0)</t>
</keyboard>
</global>
</keymap>

The only thing that happens if I click the correct key is that I get the "select profile to save settings" menu pop-up. But I cannot find a way to actually switch between my profiles. Also tried keymap editor like suggested, but here also i can only run the addon to "select a profile and save settings" but I cannot seem to find the way (script?) to activate a set profile (not in Kodi nor via my Yatse remote). Any suggestions? what am I missing?

Cheers,
Jorg
But did you save settings for each profile ? Never tried with yatse but if you mapped to T as a keyboard could work

Set your preferred audio settings 1, run Audio profile and save settings on First profile

2)

Set your preferred audio settings 2, run Audio profile and save settings on second profile

Edit like described on first page

Configuration Instruction:

Step 1
Go to Programs -> Audio profile -> not run it but choose from context menu -> Configure Add-on
Enable two profiles and add it names that you want

Step 2
Go to System -> Audio settings
Set settings for first profile for example TV by the analog output 2.0
Go to Programs -> Audio profile -> run it
Save settings as first profile

Step 3
Repeat Step 2 and set settings for digital like SPDIF or HDMI and save as second profile

Step 4
Now. You can switch between profiles using key map. I suggest to test it on keyboard keymap.
Edit or create file keyboard.xml in userdata/keymaps/ and past this code:

or maybe last version doesn't work well with kodi 15

install kodi on your pc to test or try old version if possible
Thanks a lot for your help. The problem was in my Smartphone/remote

I found that the problem was that for some strange reason all keyboard strokes of my virtual Yatse remote keyboard are sent to Kodi (on my Raspberry) with the same key ID. But I found a nice workaround:
when you create a "Custom command" in Yatse you can enter a keyboard key or code. As a test I entered code "101" and it turns out this gives a different key ID. So I used this key in the keymap. So now I have a neat custom button to toggle/switch between my DAC and analogue.

This is the code I ended up with:

<keymap><global><keyboard><key id="61440">runscript(script.audio.profiles,0)</key></keyboard></global></keymap>

Many thanks for your great add-on!
Hi, I hawe enabled this addon and it works perfest, could someone please help with configuring Yatse remote control with custom command with loop command?
Thanx
Add this command:

Code:
/jsonrpc?request={"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["0"] } }
I have tried to put this code to JSON-RPC method but I get error "Must not include {}!" I'm shure that I'm doing something wrong. It is my first time to use yatse Smile
A canonly add http command in yatse. I choose http get method and put this command above.
Thank you, it works excellent Smile
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25