Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 18
  • 19
  • 20(current)
  • 21
  • 22
  • 25
Release Audio Profiles - Easy switch between different audio settings
(2019-11-25, 11:40)nojoe Wrote: You can map a button on your remote with the Keymap addon. There is a gen.xml in /userdata/keymaps then.
Use runscript(script.audio.profiles,0). 0 switches between all save audio profiles. Or use 1, 2 or any profile you'll has saved with the audio Profile addon.
Settings/Profiles from Audio Profile are in /userdata/addon_data/script.audio.profiles.

And if you do a thread search here with "button" then you can find for what you are looking.  Wink
Don't need to read 19 pages!
Thanks so much for this trick unfortunately I do not have any button in my remote to allow to this.. My remote have very limited button and I already use the keymap addon to allow the sound on/off button for checking the encoding movie codecs details... (TX8 remote) I saw a trick to switch automatically when a Bluetooth headset is on but I'm not sure this work for my box https://gist.github.com/witokondoria/8f6...47867dc859
For now Coreelec 9 work perfectly with this profile sound addon (TV or Bluetooth) but I have to click to choose my profile every time I start a movie this is good but menu button or automatic switch ishould be better ... any suggestions will be welcome ! Thx
(2019-11-25, 11:40)nojoe Wrote: And if you do a thread search here with "button" then you can find for what you are looking.  Wink
Don't need to read 19 pages!
33 pages for button ... and no one for kodi 18 menu button  lol
(2019-11-25, 16:15)jambono Wrote:
(2019-11-25, 11:40)nojoe Wrote: You can map a button on your remote with the Keymap addon. There is a gen.xml in /userdata/keymaps then.
Use runscript(script.audio.profiles,0). 0 switches between all save audio profiles. Or use 1, 2 or any profile you'll has saved with the audio Profile addon.
Settings/Profiles from Audio Profile are in /userdata/addon_data/script.audio.profiles.

And if you do a thread search here with "button" then you can find for what you are looking.  Wink
Don't need to read 19 pages!
Thanks so much for this trick unfortunately I do not have any button in my remote to allow to this.. My remote have very limited button and I already use the keymap addon to allow the sound on/off button for checking the encoding movie codecs details... (TX8 remote) I saw a trick to switch automatically when a Bluetooth headset is on but I'm not sure this work for my box https://gist.github.com/witokondoria/8f6...47867dc859
For now Coreelec 9 work perfectly with this profile sound addon (TV or Bluetooth) but I have to click to choose my profile every time I start a movie this is good but menu button or automatic switch ishould be better ... any suggestions will be welcome ! Thx

The udev rule works for me in LibreElec 9.1.502 absolutely great with my BT Headphones and Audio Profile Addon since month. Really great!

Here some further informations... Maybe some useful informations for you:
https://forum.libreelec.tv/thread/1867-a.../?pageNo=2
RPi3 | RPi4 | LibreElec Kodi
(2019-11-25, 22:41)nojoe Wrote:
(2019-11-25, 16:15)jambono Wrote:  

The udev rule works for me in LibreElec 9.1.502 absolutely great with my BT Headphones and Audio Profile Addon since month. Really great!

Here some further informations... Maybe some useful informations for you:
https://forum.libreelec.tv/thread/1867-a.../?pageNo=2  
Frankly thanks so much but I really do not understand very well what I have to do ... its like hieroglyphic for me ! lol seriously I'm lost in translation.. !I dont know if you kidding me but the link you gave me refer to the first page of this post but I do not see anything for Kodi 18 and I do not understand what I have to do exactly ... well I already installed the Regss audio addon and it work very good but I have to choose every time audio out when playing movies/iptv with coreelec 9. Can you explain what I have to do exactly sorry I'm lost do you mean the link I gave you first is good for me https://gist.github.com/witokondoria/8f6...47867dc859 ? Is it what I have to do ?
Pffuh, i'll try my best now.  Tongue
If you not familiar with shell commands use the mc (Midnight commander), it helps a little. In LibreElec mc is bundled in the System Tools addon. In shell run: mc

place a 99-btautoconnect.rules file to /storage/.config/udev.rules.d/ with this inside:
Code:
ACTION=="remove", SUBSYSTEMS=="input", ATTRS{name}=="00:11:67:85:63:60", RUN+="/storage/.kodi/userdata/scripts/switchtoHDMIprofile.sh"
ACTION=="add", SUBSYSTEMS=="input", ATTRS{name}=="00:11:67:85:63:60", RUN+="/storage/.kodi/userdata/scripts/switchtobluetoothprofile.sh"
Replace MAC address with your MAC address from the bluetooth device. Connect the device, open a shell and run bluetoothctl to see the MAC addresses.
Replace path from the *.sh files to your own path (were ever you want these files).

Create these 2 files:

switchtoHDMIprofile.sh
Code:
#!/bin/sh

/usr/bin/kodi-send --action="RunScript(script.audio.profiles,1)"

switchtobluetoothprofile.sh
Code:
#!/bin/sh

/usr/bin/kodi-send --action="RunScript(script.audio.profiles,2)"

In ../userdata/addon_data/script.audio.profiles you can find your saved profiles.

Reboot. Thats it.

If it doesn't work then you need maybe a little fix for udev (Kodi Leia).

Run in a shell: systemctl edit systemd-udevd
Then you have to add these lines:
Code:
[Service]
IPAddressAllow=localhost
Then press Ctrl+s and Ctrl+x to save the file and exit the editor.
RPi3 | RPi4 | LibreElec Kodi
Hey thanks so much !

Are you sure I do not have to Chmod +x the two .sh files  (switchtoHDMIprofile.sh /  switchtobluetoothprofile.sh)  ?

I understood that This trick is to get the automatic switch when Bluetooth connect, not menu button, right ?

Is this a same as https://gist.github.com/witokondoria/8f6...47867dc859 ?

Thanks a lot for your help
(2019-11-26, 16:30)jambono Wrote: Hey thanks so much !

Are you sure I do not have to Chmod +x the two .sh files  (switchtoHDMIprofile.sh /  switchtobluetoothprofile.sh)  ?

I understood that This trick is to get the automatic switch when Bluetooth connect, not menu button, right ?

Is this a same as https://gist.github.com/witokondoria/8f6...47867dc859 ?

Thanks a lot for your help

Yep, set the permissions if it doesn't work.
Yep, if BT device connected the profile a gets loaded automatically and if disconnected profile b gets loaded.
Not really! Here with Audio Profiles you can also set maybe Passtrough off, set 5.1 to stereo or display resolution to 1280x720 HD. All what Audio Profiles can saving!
For my BT Headphone i need Passtrough off and for the AV Receiver on.
Change all what you need in Kodi, open Audio Profiles addon and save it to eg Bluetooth. Then change it back and save it as eg A/V Receiver.
With the script from witokondoria it switches only the audio driver from Pulse to Alsa.

For testing run this in the shell:
sh /my_path_to_scripts/my_profile.sh

p.s.: give me a thumb up if it works 4u!  Wink
RPi3 | RPi4 | LibreElec Kodi
Hello .. I think Your trick is for OpenElec not for Coreelec .. this do not work unfortunately for this reason - I think- ? The other one (my link) work when I open my BT I get sound but when I close off the sound do not get back to the TV ... any clue will be welcome ! Thanks ! I will retry with chmod +x the two sh files its the only thing I did not with your trick
(2019-11-27, 18:31)jambono Wrote: Hello .. I think Your trick is for OpenElec not for Coreelec .. I do not have any kodi or .kodi folder .. this do not work unfortunately for this reason - I think- ? The other one (my link) work when I open my BT I get sound but when I close off the sound do not get back to the TV ... any clue will be welcome ! Thanks !
If you're running openelec / libreelec / coreelec you have a .kodi folder in the root of your storage partition.  The dot makes it a hidden folder.
Yes I found it ! Hello .. but this do not work unfortunately... The other one (my link) work when I open my BT I get sound but when I close off the sound do not get back to the TV ... I will retry with chmod +x the two sh files its the only thing I did not with this trick
@nojoe

well I chmod +x the two .sh files and this not work 
the only thing I did not is that :

""Run in a shell: systemctl edit systemd-udevd
Then you have to add these lines:
[Service]
IPAddressAllow=localhost
Then press Ctrl+s and Ctrl+x to save the file and exit the editor.""

But I use putty from W10 and I'm not sure about Ctrl+s command ... Also I would like to know if this is reversible and how to reverse in case of trouble.... ??

Thanks for your time... thanks to all
@nojoe

Ok finally I did ALLl what you said and thats not work.... I can still select TV or BT with the widget menu when I start any media but iif I open BT it don't switch automaticaly from TV. No sound. The sound stay on TV. I have to restart the media and choose BT to get sound on BT .. all the files are correct and chmod =x your 2 .sh files and I added localhost command with your trick ... #$%?&*()_ Arrrrrgggggrrrrrrrrrrr  its so frustrating
A friend converted the plugin to work with kodi 19. I tested - it works for me. Downloadable here:
https://github.com/notoco/script.audio.profiles - source code
Maybe someone will review it and put it in some more official repo?
(2019-11-27, 20:57)jambono Wrote: @nojoe

Ok finally I did ALLl what you said and thats not work.... I can still select TV or BT with the widget menu when I start any media but iif I open BT it don't switch automaticaly from TV. No sound. The sound stay on TV. I have to restart the media and choose BT to get sound on BT .. all the files are correct and chmod =x your 2 .sh files and I added localhost command with your trick ... #$%?&*()_ Arrrrrgggggrrrrrrrrrrr  its so frustrating

Mhh, can't help more. Sry! I'm not so familiar with Linux but if udev are there then why won't it work for you? Kernel related? Don't know.
RPi3 | RPi4 | LibreElec Kodi
Anyone with Coreelec 9 build and working automatic BT/TV switch configuration with regss addon please give me your trick !

Yep sorry me too very sorry nojoe !
  • 1
  • 18
  • 19
  • 20(current)
  • 21
  • 22
  • 25

Logout Mark Read Team Forum Stats Members Help
Audio Profiles - Easy switch between different audio settings3