Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    16

    Swap the knobs on the Radio

    Hello all!
    New to forum but old time SB user.

    The option to swap the functionality of the two knobs on the Radio would be very interesting to me... Is that possible at all?
    One of my radios is out of order a little... Big knob 'click'/push function is broken. :/ I can spin big knob but can't set/click what I've choose.
    Is there possibility to change this 'click' to another button? Or even better to swap functionality with small one (where push is working)?
    I found remapping possibilities but not for this push/'click', also didn't found change functions of small one with big. But maybe didn't search enough. :/
    Would be great to have this.

    Thanks for your help!
    Take care!

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    London, UK
    Posts
    749
    Quote Originally Posted by L0O View Post
    Is there possibility to change this 'click' to another button? Or even better to swap functionality with small one (where push is working)?
    I found remapping possibilities but not for this push/'click', also didn't found change functions of small one with big. But maybe didn't search enough. :/
    Presumably you found the 'Shortcuts' applet under the 'Beta Features' menu of 'Settings|Advanced', and found nothing that would help. Nor did I.

    If you are willing to edit the relevant script on the Radio (by logging in through SSH), you can, at least, change the default setting for the "mute" key (Volume knob press) in a way that might help you.

    The script lives in '/usr/share/jive/applets/Shortcuts'. The script is called 'ShortcutsMeta.lua'.

    You could make an edit to a part of the file, as indicated below. The line highlighted in red is to be changed, just replace "mute" by "go", as I have done.

    You will still have the "mute" function, but now only by a long press/hold of the volume button.

    What you are doing here is changing the default setting for the "mute" key, which pressing the volume knob gives you. In principal, this option could be added to the menu, so that it could be selected through the user interface. But working out how the main script actually works defeats me right now.

    Code:
    Extract from /usr/share/jive/applets/Shortcuts/ShortcutsMeta.lua
    
                    keyActionMappings = {                                
                            press = {                                    
                                    [KEY_ALARM] = "go_alarms",           
                                    [KEY_ADD] = "add",                   
                                    [KEY_MUTE] = "go",
                                    [KEY_PRESET_1] = "play_preset_1", 
                                    [KEY_PRESET_2] = "play_preset_2",
                                    [KEY_PRESET_3] = "play_preset_3",
                                    [KEY_PRESET_4] = "play_preset_4",    
                                    [KEY_PRESET_5] = "play_preset_5",    
                                    [KEY_PRESET_6] = "play_preset_6",    
                            },                                           
                            hold = {                                     
                                    [KEY_GO] = "add",                 
                                    [KEY_ALARM] = "go_alarms",        
                                    [KEY_ADD]  = "add_end",           
                                    [KEY_HOME] = "go_home",              
                                    [KEY_MUTE] = "mute",                 
                                    [KEY_PLAY] = "create_mix",           
                                    [KEY_PRESET_1] = "set_preset_1",     
                                    [KEY_PRESET_2] = "set_preset_2",     
                                    [KEY_PRESET_3] = "set_preset_3",     
                                    [KEY_PRESET_4] = "set_preset_4",     
                                    [KEY_PRESET_5] = "set_preset_5",
    Be aware that you may need to restore factory settings if you should "make a mistake".

  3. #3
    Junior Member
    Join Date
    Jan 2021
    Posts
    16
    WOW! Looks like perfect solution for me!
    TYVM! Will give it a try. I could live without mute also - but without 'go' was not easy.
    Thanks again mrw!

    Edit

    I made changes to /usr/share/jive/applets/Shortcuts/ShortcutsMeta.lua with vi.
    Wasn't easy to turn ssh on without working push button but IR from Classic helped me.
    Anyway - it is not work. Yet - I hope. I made reboot after saved .lua and restart via Radio - nothing helped.
    Maybe the way is good but I need to edit different file? But which?

    It looks like this atm:

    Name:  kitty_2021-01-12_00-28-31.png
Views: 144
Size:  25.1 KB

    BTW: I've changed also hold (just in case and coz don't need this feature) during 2nd try, but this also didn't help - mute works like before my edit...

    PS
    Was later (4th try) also trying to change this (to have working IR to change stations) but it also didn't worked.
    Code:
     irActionMappings = {
                            press = {
                                    ["add"]  = "add",
                                    ["sleep"]  = "sleep",
                            },
                            hold = {
                                    ["arrow_right"]  = "add",
                                    ["play"]  = "create_mix",
                                    ["pause"]  = "stop",
                                    ["add"]  = "add_end",
                                    ["sleep"]  = "sleep",
                                    ["home"]   = "go_home",
                                    ["0"]  = "disabled", <------ default value
                                    ["1"]  = "enabled", <----- thought this enable the key
                                    ["2"]  = "play_preset_2", <------ thought to use command as from keyActionMappings
                                    ["3"]  = "play_preset_3",
    Last edited by L0O; 2021-01-11 at 18:23.

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    London, UK
    Posts
    749
    Quote Originally Posted by L0O View Post
    Wasn't easy to turn ssh on without working push button but IR from Classic helped me.
    Anyway - it is not work. Yet - I hope. I made reboot after saved .lua and restart via Radio - nothing helped.
    Maybe the way is good but I need to edit different file? But which?

    It looks like this atm:
    That looks fine to me.

    It is only the default settings that have been changed. Perhaps you already have already chosen some shortcuts in the past, so the defaults are not being used. I suggest that you take the menu option "Restore defaults", which is the last item on the list, and see if that helps.

  5. #5
    Junior Member
    Join Date
    Jan 2021
    Posts
    16
    Hello!
    I did and... it and it works!
    Thank you so much!
    Last edited by L0O; 2021-01-12 at 08:33.

  6. #6
    Senior Member
    Join Date
    May 2010
    Location
    London, UK
    Posts
    749
    Quote Originally Posted by L0O View Post
    I did and... it and it works!
    Good, glad to have helped. Do your new IR key action mappings work as well ? I've never fiddled with those.

  7. #7
    Junior Member
    Join Date
    Jan 2021
    Posts
    16
    Yup! IR keys works as well - but notice it is 'hold' - so longer push.
    Wonder if possible to move those 0-9 numbers to 'press' section - what do you think?

    Code:
     irActionMappings = {
                            press = {
                                    ["add"]  = "add",
                                    ["sleep"]  = "sleep",
                                    ["2"]  = "play_preset_2", <------ here
                            },

  8. #8
    Senior Member
    Join Date
    May 2010
    Location
    London, UK
    Posts
    749
    Quote Originally Posted by L0O View Post
    Yup! IR keys works as well - but notice it is 'hold' - so longer push.
    Wonder if possible to move those 0-9 numbers to 'press' section - what do you think?

    Code:
     irActionMappings = {
                            press = {
                                    ["add"]  = "add",
                                    ["sleep"]  = "sleep",
                                    ["2"]  = "play_preset_2", <------ here
                            },
    I've no idea, really. The regular remote supplied with the Radio doesn't have a numeric keypad, I guess you are using the larger version like I got with my "Classic" SB3.

    So, maybe there is nothing to be lost by using those buttons in the manner you intend. It may mean, though, that you can no longer use the remote to enter in letters and digits. I don't know that that matters.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •