• 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 18
Release Audio Profiles (for Kodi 18 and later)
(2022-11-21, 23:53)serafis Wrote: Yes, that works fine, thanks very much!
Thanks for confirming.  I'll probably push this out next week to the main add-on repo.  It may take a little time to get there depending on who's available to do a code review, and the beta version you have should update automatically when that happens.
Reply
(2022-11-03, 09:52)Alex_1977 Wrote: Hi,

I solved my problem with a python file executed in the callbacks addon (when playback started or resumed).
Something like this :

import xbmc
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup (26, GPIO.OUT) # pin 37 sortie pour relay
GPIO.setup (14, GPIO.OUT) # pin 8 sortie pour led bp

path = xbmc.getInfoLabel('Player.Folderpath')
if "Musique" in path or "musicales" in path:
    GPIO.output(26, GPIO.HIGH)
    GPIO.output(14, GPIO.HIGH)
else:
    GPIO.output(26, GPIO.LOW)
    GPIO.output(14, GPIO.LOW)

Possible to test the streaming too : is_internetstream = xbmc.getCondVisibility('Player.IsInternetStream') # (returns TRUE or FALSE)

I think it would be great to have this possibility in the audio profiles addon, for the ones who want to turn on/off lights, amps ...

Alex.

Would be also great to run script auto on change of profile to change between different bluetooth speakers..let's say between soundbar and audio system...
Reply
I mostly use my phone (both Iphone and Android) as my Kodi remote. The Android remote doesn't have a keyboard so I take it I need to use Yatse? I take it I can bind a key to use on the Remote Control app that has a popup keyboard. Does anyone have the best key combination as I don't want to lose a function because I overwrote a key binding. I'm just looking to do the popup to change profiles.
Reply
Hi all,

CoreELEC: 19.3 Matrix

Just installed this add-on and using the function key F1-F6 I can select the various profiles and it works just as expected.  However I don't have any function keys on my remote so I set the Yellow Key to rotate through the profiles.  This gives a message that the profile is disabled, changing back to the Function Key and it works again.

Log is showing the following on pressing the Yellow Key:

2023-01-05 16:39:14.904 T:12351   DEBUG <general>: CLibInputKeyboard:TonguerocessKey - using delay: 250ms repeat: 33ms
2023-01-05 16:39:14.905 T:12520   DEBUG <general>: Thread Timer start, auto delete: false
2023-01-05 16:39:14.906 T:12325   DEBUG <general>: Keyboard: scancode: 0x3d, sym: 0x011c, unicode: 0x0000, modifier: 0x0
2023-01-05 16:39:14.906 T:12325   DEBUG <general>: HandleKey: f3 (0xf092) pressed, action is RunScript(script.audio.profiles,3)
2023-01-05 16:39:14.907 T:12521   DEBUG <general>: Thread LanguageInvoker start, auto delete: false
2023-01-05 16:39:14.910 T:12521    INFO <general>: initializing python engine.
2023-01-05 16:39:14.910 T:12521   DEBUG <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): start processing
2023-01-05 16:39:14.940 T:12521   DEBUG <general>: -->Python Interpreter Initialized<--
2023-01-05 16:39:14.940 T:12521   DEBUG <general>:
2023-01-05 16:39:14.940 T:12521   DEBUG <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): the source file to load is "/storage/.kodi/addons/script.audio.profiles/default.py"
2023-01-05 16:39:14.940 T:12521   DEBUG <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): setting the Python path to /storage/.kodi/addons/script.audio.profiles:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/lib/python3.8/site-packages
2023-01-05 16:39:14.940 T:12521   DEBUG <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): entering source directory /storage/.kodi/addons/script.audio.profiles
2023-01-05 16:39:14.940 T:12521   DEBUG <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): instantiating addon using automatically obtained id of "script.audio.profiles" dependent on version 3.0.0 of the xbmc.python api
2023-01-05 16:39:14.968 T:12520   DEBUG <general>: Thread Timer 3241108096 terminating
2023-01-05 16:39:14.974 T:12521    INFO <general>: [Audio Profiles] script version 2.1.2 started
2023-01-05 16:39:14.974 T:12521    INFO <general>: [Audio Profiles] debug logging set to False
2023-01-05 16:39:14.975 T:12521    INFO <general>: [Audio Profiles] CHECK: This profile is disabled in addon settings - 3
2023-01-05 16:39:14.975 T:12521    INFO <general>: [Audio Profiles] script version 2.1.2 stopped
2023-01-05 16:39:14.975 T:12521    INFO <general>: CPythonInvoker(14, /storage/.kodi/addons/script.audio.profiles/default.py): script successfully run
2023-01-05 16:39:14.975 T:12521   DEBUG <general>: onExecutionDone(14, /storage/.kodi/addons/script.audio.profiles/default.py)
2023-01-05 16:39:14.992 T:12325   DEBUG <general>: ------ Window Init (DialogNotification.xml) ------
2023-01-05 16:39:14.992 T:12325   DEBUG <general>: Keyboard: scancode: 0x3d, sym: 0x011c, unicode: 0x0000, modifier: 0x0
2023-01-05 16:39:15.333 T:12521    INFO <general>: Python interpreter stopped
2023-01-05 16:39:15.333 T:12521   DEBUG <general>: Thread LanguageInvoker 3481502336 terminating


keymap file:

<keymap>
    <global>
            <keyboard>
                <key id="61530">control.setfocus(9000,0,absolute)</key>
                <F1>RunScript(script.audio.profiles,1)</F1>      <!-- switches to profile 1 -->
                <F2>RunScript(script.audio.profiles,2)</F2>      <!-- switches to profile 2 -->
                <F3>RunScript(script.audio.profiles,3)</F3>      <!-- switches to profile 3 -->
                <F4>RunScript(script.audio.profiles,4)</F4>      <!-- switches to profile 4 -->
                <F5>RunScript(script.audio.profiles,popup)</F5>  <!-- displays a dialog for you to pick a profile -->
                <yellow>RunScript(script.audio.profiles,0)</yellow>      <!-- rotates through the profiles -->
            </keyboard>
    </global>
</keymap>
Reply
(2023-01-05, 07:50)gregeeh Wrote: Hi all,

CoreELEC: 19.3 Matrix

Just installed this add-on and using the function key F1-F6 I can select the various profiles and it works just as expected.  However I don't have any function keys on my remote so I set the Yellow Key to rotate through the profiles.  This gives a message that the profile is disabled, changing back to the Function Key and it works again.
Please enable debug logging in the addon as well as Kodi and then post a link to a complete debug log from Kodi startup until you duplicate the problem.  I can't do anything with a log snippet.
Reply
(2023-01-05, 12:57)pkscout Wrote:
(2023-01-05, 07:50)gregeeh Wrote: Hi all,

CoreELEC: 19.3 Matrix

Just installed this add-on and using the function key F1-F6 I can select the various profiles and it works just as expected.  However I don't have any function keys on my remote so I set the Yellow Key to rotate through the profiles.  This gives a message that the profile is disabled, changing back to the Function Key and it works again.
Please enable debug logging in the addon as well as Kodi and then post a link to a complete debug log from Kodi startup until you duplicate the problem.  I can't do anything with a log snippet.

Here you go.....

https://pastebin.com/raw/2KwjYKMj
Reply
Hi all,

Does this add-on save the mute status?
Reply
(2023-01-06, 00:07)gregeeh Wrote: Hi all,

Does this add-on save the mute status?
It does not.  Mute is technically a toggle, not a setting.  If you require something like "muted at startup" you could do a profile with the volume at zero and set that to run at startup, but then you'd have to ramp up the volume with multiple remote presses instead of just one easy press to unmute it.
Reply
(2023-01-05, 21:18)gregeeh Wrote:
(2023-01-05, 12:57)pkscout Wrote:
(2023-01-05, 07:50)gregeeh Wrote: Hi all,

CoreELEC: 19.3 Matrix

Just installed this add-on and using the function key F1-F6 I can select the various profiles and it works just as expected.  However I don't have any function keys on my remote so I set the Yellow Key to rotate through the profiles.  This gives a message that the profile is disabled, changing back to the Function Key and it works again.
Please enable debug logging in the addon as well as Kodi and then post a link to a complete debug log from Kodi startup until you duplicate the problem.  I can't do anything with a log snippet.

Here you go.....

https://pastebin.com/raw/2KwjYKMj
Profile 3 (Headphones) is disabled according to the settings information in the debug log, so the addon is acting as expected.  I only see two enabled profiles: Profile 1 (Enable Headphones) and Profile 2 (Disable Headphones).  If you try and activate anything other than those two profiles, it won't do anything.  If you're expecting Profile 3 to do something, you need to enable it.
Reply
(2023-01-06, 00:40)pkscout Wrote:
(2023-01-05, 21:18)gregeeh Wrote:
(2023-01-05, 12:57)pkscout Wrote: Please enable debug logging in the addon as well as Kodi and then post a link to a complete debug log from Kodi startup until you duplicate the problem.  I can't do anything with a log snippet.

Here you go.....

https://pastebin.com/raw/2KwjYKMj
Profile 3 (Headphones) is disabled according to the settings information in the debug log, so the addon is acting as expected.  I only see two enabled profiles: Profile 1 (Enable Headphones) and Profile 2 (Disable Headphones).  If you try and activate anything other than those two profiles, it won't do anything.  If you're expecting Profile 3 to do something, you need to enable it.
If you look at the keygen file the yellow button is set to rotate thru the profiles, the active ones, and does that if I change the keygen from yellow to F6.  But set to yellow I get the error message Profile Disabled when pressing it.  I'm not trying to use Profile 3.

EDIT: Checked the keycodes being generated and the Yellow Key was actually sending F3.  Changed the gen.xml file making the profile cycling F3 and now all good.

Thanks very much for your help.
Reply
I wonder if it is possible to run a cron that selects a particular profile at a set time?

TIA
Reply
(2023-01-07, 23:36)gregeeh Wrote: I wonder if it is possible to run a cron that selects a particular profile at a set time?

TIA
It should be.  If you're on a Linux build, there is a command line tool called kodi-send that would let you send the Runscript command mentioned in the Audio Profiles wiki entry on the Kodi page.

https://kodi.wiki/view/Add-on:Audio_Profiles

If you're on Windows or Mac, you would probably have to use curl or some other tools to send a JSON-RPC request that will run the script.  You'd need to use ExecuteAddon I think and figure out how to send the right parameters.

https://kodi.wiki/view/JSON-RPC_API/v12#...ecuteAddon

Both of these are very advanced things, and I probably can't help you more than I have.  Someone else might jump in if you try one of them and run into a challenge.
Reply
Quote:If you're on a Linux build, there is a command line tool called kodi-send that would let you send the Runscript command mentioned in the Audio Profiles wiki entry on the Kodi page.

Yep that was very helpful.  Used the command:

kodi-send --action "RunScript(script.audio.profiles,1)"

Thanks again.
Reply
Hi, using audio profiles for some time now but it doesn't save the audio delay settings.
I have audio delay issues in Kodi with some media, I can change the audio delay manually every time but with one click it woud be easier.
Maybe I'm doing something wrong but it doesn't save my audio delay setting. All other settings are no problem.

Is it possible to add this option?

Thanks.
Reply
(2023-04-24, 14:33)heula Wrote: Hi, using audio profiles for some time now but it doesn't save the audio delay settings.
I have audio delay issues in Kodi with some media, I can change the audio delay manually every time but with one click it woud be easier.
Maybe I'm doing something wrong but it doesn't save my audio delay setting. All other settings are no problem.

Is it possible to add this option?

Thanks.
I don't think so.  That is a setting that is stored either per video or changed for all videos, and there's no easy way to get or set that via Python (at least not of which I'm aware).
Reply
  • 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 18

Logout Mark Read Team Forum Stats Members Help
Audio Profiles (for Kodi 18 and later)0