Kodi Community Forum
Release Audio Profiles - Easy switch between different audio settings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release Audio Profiles - Easy switch between different audio settings (/showthread.php?tid=200081)

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


RE: Audio Profiles switcher - Regss - 2016-06-09

Hi. This is a encoding string problem. Thanks for report. For now delete special characters and local language characters from profiles name.


RE: Audio Profiles switcher - jubilex - 2016-06-21

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.


RE: Audio Profiles switcher - Roby77 - 2016-06-21

Just curious why use json and not a key id ?

Edit:ok got it...it's not ir remote


RE: Audio Profiles switcher - teemue - 2016-07-22

A feature request: Remember Audio delay setting for each profile (bt headphones tend to need a little delay)


RE: Audio Profiles switcher - Tymiboss - 2016-07-23

(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 ?


RE: Audio Profiles switcher - ancodia - 2016-07-25

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.


RE: Audio Profiles switcher - peppe_sr - 2016-07-25

see post 72 of this topic
http://forum.kodi.tv/showthread.php?tid=200081&pid=2102075#pid2102075
Peppe


RE: Audio Profiles switcher - JorgAms - 2016-08-16

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


RE: Audio Profiles switcher - Roby77 - 2016-08-17

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


RE: Audio Profiles switcher - JorgAms - 2016-08-19

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!


RE: Audio Profiles switcher - knjigor - 2016-10-01

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


RE: Audio Profiles switcher - Regss - 2016-10-01

Add this command:

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



RE: Audio Profiles switcher - knjigor - 2016-10-01

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


RE: Audio Profiles switcher - Regss - 2016-10-01

A canonly add http command in yatse. I choose http get method and put this command above.


RE: Audio Profiles switcher - knjigor - 2016-10-01

Thank you, it works excellent Smile