Swap the knobs on the Radio

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • L0O
    Junior Member
    • Jan 2021
    • 23

    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!
    LMS on RPi4 (OSMC) + SB3 + 3xRadio
  • mrw
    Senior Member
    • May 2010
    • 1083

    #2
    Originally posted by L0O
    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:
    [b][color=blue]Extract from /usr/share/jive/applets/Shortcuts/ShortcutsMeta.lua[/color][/b]
    
                    keyActionMappings = {                                
                            press = {                                    
                                    [KEY_ALARM] = "go_alarms",           
                                    [KEY_ADD] = "add",                   
                                    [b][color=red][KEY_MUTE] = "go",[/color][/b]
                                    [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".

    Comment

    • L0O
      Junior Member
      • Jan 2021
      • 23

      #3
      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:

      Click image for larger version

Name:	kitty_2021-01-12_00-28-31.png
Views:	1
Size:	25.1 KB
ID:	1570931

      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", <------ [I]default value[/I]
                                      ["1"]  = "[COLOR="#FFA500"]enabled[/COLOR]", <-----[I] thought this enable the key[/I]
                                      ["2"]  = "[COLOR="#FFA500"]play_preset_2[/COLOR]", <------ [I]thought to use command as from keyActionMappings[/I]
                                      ["3"]  = "[COLOR="#FFA07A"]play_preset_3[/COLOR]",
      Last edited by L0O; 2021-01-12, 01:23.
      LMS on RPi4 (OSMC) + SB3 + 3xRadio

      Comment

      • mrw
        Senior Member
        • May 2010
        • 1083

        #4
        Originally posted by L0O
        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.

        Comment

        • L0O
          Junior Member
          • Jan 2021
          • 23

          #5
          Hello!
          I did and... it and it works!
          Thank you so much!
          Last edited by L0O; 2021-01-12, 15:33.
          LMS on RPi4 (OSMC) + SB3 + 3xRadio

          Comment

          • mrw
            Senior Member
            • May 2010
            • 1083

            #6
            Originally posted by L0O
            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.

            Comment

            • L0O
              Junior Member
              • Jan 2021
              • 23

              #7
              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", <------ [I]here[/I]
                                      },
              LMS on RPi4 (OSMC) + SB3 + 3xRadio

              Comment

              • mrw
                Senior Member
                • May 2010
                • 1083

                #8
                Originally posted by L0O
                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", <------ [I]here[/I]
                                        },
                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.

                Comment

                • DrewSB
                  Member
                  • Mar 2009
                  • 86

                  #9
                  This thread just saved my Radio after the rotary knob button broke. Thanks for all the info.

                  One part that was difficult was turning on SSH. I tried unsuccessfully use the LMS CLI
                  Should
                  <MAC> button right
                  have worked in the CLI? Other things like volume and play/pause worked.

                  Eventually I set up my Logitech remote to control the Radio and was able to turn on SSH.

                  Everything else was easy.

                  Comment

                  • bakerboy
                    Member
                    • Feb 2009
                    • 35

                    #10
                    Broken Big Button Click/Select Remapped to Alarm Key on Squeezebox Radio

                    Originally posted by L0O
                    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!
                    Thanks to the info in this thread about the key mappings in '/usr/share/jive/applets/Shortcuts/ShortcutsMeta.lua' I was able to replace the big button's click/select function, mapping it to the ALARM key. (This is no problem for alarms since they can be programmed from the LMS server settings.) I did it by simply changing the “press” and “hold” actions for KEY_ALARM from “go_alarms” to simply “go”.

                    Comment

                    • isr2002
                      Member
                      • Jan 2011
                      • 59

                      #11
                      Thank you, mrw !
                      I have 3 radios with this issue, and only one remote. Now I use Mute!

                      Comment

                      Working...