Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Sep 2012
    Posts
    113

    Squeezebox Radio : Switching to Line-in remotely

    Hi, I'm looking for a way to switch to "line in" on Squeezebox Radio remotely (cli, http , ssh , anything will be good ).

    I know, I read this post which say that it is not possible. But...

    • Also interesting : the line-in applet (natively installed) allow to run some part of code with CLI. It seems that LineInApplet.lua is called. But this command works only on Boom not on Radio.
    • I also see how to run an applet from another applet (this one allow to activate line-in thanks to a button shortcut).
    • I also see this applet which allow to run any applet function with CLI.



    So I think that it is possible



    So I started to modify this file on my Squeezebox Radio : /usr/share/jive/applets/LineIn/LineInApplet.lua
    and in "isLineInActive" function of this file I add :
    Code:
    self:_activateLineIn(initialPlayMode)
    So now when I run the command on the server CLI:
    xx:xx:xx:xx:xx setlinein linein

    It switch on the line in 😄 ... but it start an infinite loop and crash the squeezebox 😩 (due to _activateLineIn function which call again isLineInActive function).
    I tried to avoid the loop by checking the state of the checkbox (without success).

    So I've edited _activateLineIn function. To avoid this loop, I've just commented this line :
    Code:
    appletManager:callService("goNowPlaying")
    No crash anymore ... But my Squeezebox is always on line-in...

    May be a good developer could have great idea to make it works correctly !


    There's probably 2 ways to achieve that :
    • Understand clearly what is executed on Squeezebox side when we run "xx:xx:xx:xx:xx setlinein linein" and run this applet script quickly.
    • Understand how to use this applet "Applet/Plugin for remote administration of SqueezePlay" and configure it to run the linein applet


    I share a folder (line-in on Squeezebox Radio.zip <-- click here) with these folders included :

    • LineIn (native applet on squeezebox - modified) -> the files from my "/usr/share/jive/applets/LineIn/" Squeezebox folder, I was mainly working on "LineInApplet.lua"
    • LineInButton (applet good exemple to trigger line-in) -> Perfect example to trigger the right lua function (not modified)
    • LineIn (server native plugin) -> this is the native plugin "line-in" which allow to trigger "LineInApplet.lua" thanks to the CLI command "xx:xx:xx:xx:xx setlinein linein" (not modified)




    Thank you.
    Last edited by schmurtz; 2021-08-30 at 01:15.

  2. #2
    Senior Member
    Join Date
    Sep 2012
    Posts
    113
    Hi, I've done it : you can switch to line-in using LMS CLI.
    My plugin is based on "SqueezePlay Admin" from Erland and indifference_engine's code was a good inspiration too

    Take a look to my repo :
    https://github.com/schmurtzm/erlandplugins
    (I have done my first Squeezebox plugins repository to install my modification of the plugin easily)

  3. #3
    Junior Member
    Join Date
    Dec 2021
    Posts
    1
    Hi,
    thank you very much for posting this useful information. I have a little request on you because I'm not able to program that plugin by myself even with the help of your given information.

    Could you please write and upload a simpler "Lin-In plugin" for me

    I need a plugin that forces switching to Lin-In after booting up the squeezebox. There is no need for remote switch or button transformation...

    The reason is that I want to use, that good sounding,
    little squeezebox with an external Bluetooth -Line In Adapter, remotely powered all on by "Remote AC Power Socket"

    I hope you could help me with that, I really want to use that SB for something, it is very outdated but too good to throw it in the waste...

    Best Regards

  4. #4
    Quote Originally Posted by schmurtz View Post
    Hi, I've done it : you can switch to line-in using LMS CLI.
    Great work, thanks!
    Very handy with homeassistant!

  5. #5
    Senior Member
    Join Date
    Sep 2012
    Posts
    113
    Quote Originally Posted by Cadster View Post
    Great work, thanks!
    Very handy with homeassistant!
    Really happy to see that at least one person other than me use it



    Quote Originally Posted by DGBlitz View Post
    Hi,

    I need a plugin that forces switching to Lin-In after booting up the squeezebox. There is no need for remote switch or button transformation...

    I hope you could help me with that, I really want to use that SB for something, it is very outdated but too good to throw it in the waste...

    I wasn't able to make it work neither ... but I have documented myself by taking a look on other plugins and here on the forum...
    If you read my first post you already have a solution : at the beginning my script was broken and put the squeezebox always in line in mode...
    I could probably make a real plugin but it take time that I prefer spend on other projects...

    EDIT : I've just read that @indifference_engine has done it for you, you're a lucky man Is it working as expected ?

Posting Permissions

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