Squeezebox Radio : Switching to Line-in remotely

schmurtz <schmurtz.a76dwn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
Hi, I'm looking for a way to switch to "line in" on Squeezebox Radio
remotely (cli, http , ssh , anything will be good :p ).

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

But I also see how to run an applet from another applet ('this one'
(https://forums.slimdevices.com/showthread.php?109870-ANNOUNCE-Line-In-Button-Applet-for-Radio&fbclid=IwAR3VNFaOjOhlBu_DNLX-hmjGwgmVGVwLpNRC-OAk3o7QrXKZeMifuiotut0)
allow to activate line-in thanks to a button shortcut).
I also see 'this applet'
(https://forums.slimdevices.com/showthread.php?77494-Announce-Applet-Plugin-for-remote-administration-of-SqueezePlay)
which allow to run any applet function with CLI.
Also interesting : the line-in applet (natively installed) allow to run
some part of code with CLI. It seems that LineInApplet.lua is called

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:
00:xx:xx:xx:xx setlinein linein

It switch on the line in &#128516; ... but it start an infinite loop and
crash the squeezebox &#128553; (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
!

I share a folder (35621  <-- 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.


+-------------------------------------------------------------------+
|Filename: line-in on Squeezebox Radio.zip                          |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=35621|
+-------------------------------------------------------------------+

------------------------------------------------------------------------
schmurtz's Profile: http://forums.slimdevices.com/member.php?userid=57368
View this thread: http://forums.slimdevices.com/showthread.php?t=115059
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.