Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
ralphy wrote: > Are you using any settings in the depends block of their openrc init.d > scripts to control the startup order? No. Based on the boot messages, LMS starts first, followed by ntpd and then squeezelite. Jivelite is started after auto login via .config/bspwm/bspwmrc. I haven't really had a chance to look at it but I'm wondering if it's an LMS delay due to failed DNS lookups at start (no network). The LMS log shows a couple attempts to reach github for the lms-plugin-repository and then multiple failed tries to resolve opml.radiotime.com. sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
sodface wrote: > Sort of, I'm not doing any network config at all at boot time currently. > My thought for this car project was: > > - Start the car, aopen boots, no boot time network interface > configuration, LMS (with local media), squeezelite, and jivelite should > function normally on 127.0.0.1. > - For external connectivity, boot as above but then enable phone > hotspot, have an app launcher on the aopen run a network config script > - Much less frequently, I may want to dismount the aopen and bring it > inside, in which case I may also want to connect to ethernet instead of > wifi > > The 7-8 second connection delay at boot you're seeing with the patch might be caused by the fact that squeezelite has not started yet and/or is trying to connect to lms which may not have completed starting up? Whereas with your change, jivelite doesn't perform the server/player discovery and connects to lms as soon as the service is running. Are you using any settings in the depends block of their openrc init.d scripts to control the startup order? Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations=LL5P6365KQEXN=CA_name=Squeezebox%20client%20builds_code=USD=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
d6jg wrote: > IIRC in a normal environment Jivelite is very fussy about changing > interfaces and needs completely resetting when switched between WiFi and > Ethernet Yes, that's still true. With bonding you can setup the system to always have the same MAC address regardless of which network interface you're using. You still need to have wpa_supplicant.conf setup with your wifi credentials and I set the mac address on the bonding interface, because it sometimes changes. Code: auto lo iface lo inet loopback auto bond0 iface bond0 inet dhcp pre-up ip link set bond0 address ba:34:da:f6:ab:9c bond-slaves eth0 mlan0 auto eth0 iface eth0 inet manual auto mlan0 iface mlan0 inet manual The nice thing about this configuration is if your wifi connection fails you can just plugin to the ethernet port and you can still connect without a reboot. Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations=LL5P6365KQEXN=CA_name=Squeezebox%20client%20builds_code=USD=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
sodface wrote: > Sort of, I'm not doing any network config at all at boot time currently. > My thought for this car project was: > > - Start the car, aopen boots, no boot time network interface > configuration, LMS (with local media), squeezelite, and jivelite should > function normally on 127.0.0.1. > - For external connectivity, boot as above but then enable phone > hotspot, have an app launcher on the aopen run a network config script > - Much less frequently, I may want to dismount the aopen and bring it > inside, in which case I may also want to connect to ethernet instead of > wifi > > The bond interface was to account for the last use case - but so far, > the aopen hasn't left my desk and I've only been using the ethernet > port. I haven't tested swapping back and forth between wifi and ethernet > yet. That said, the bond interface with ethernet connectivity works well > and I haven't noticed any ssh delay? > > The bond commands I'm using I put into a script, though this will need a > lot of work to be robust in production! > > > Code: > > > #!/bin/sh > ip link add bond0 type bond > ip link set bond0 type bond miimon 100 mode active-backup > ip link set eth0 master bond0 > ip link set mlan0 master bond0 > ip link set bond0 up > udhcpc -i bond0 > rc-service lms restart > > > IIRC in a normal environment Jivelite is very fussy about changing interfaces and needs completely resetting when switched between WiFi and Ethernet Jim https://jukeradio.double6.net VB2.4[/B] STORAGE *QNAP TS419P (NFS) [B]Living Room* Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s *Office* Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s *Dining Room* SB Radio *Bedroom (Bedside)* Pi Zero+DAC ->ToppingTP21 ->AKG Headphones *Bedroom (TV) & Bathroom* SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers *Guest Room* Joggler > Topping Amp -> Wharfedale Modus Cubes d6jg's Profile: http://forums.slimdevices.com/member.php?userid=44051 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
ralphy wrote: > > Are you using bonding? I've noticed that sometimes it takes a longer > time to connect via ssh to my aopen with it enabled? > Sort of, I'm not doing any network config at all at boot time currently. My thought for this car project was: - Start the car, aopen boots, no boot time network interface configuration, LMS (with local media), squeezelite, and jivelite should function normally on 127.0.0.1. - For external connectivity, boot as above but then enable phone hotspot, have an app launcher on the aopen run a network config script - Much less frequently, I may want to dismount the aopen and bring it inside, in which case I may also want to connect to ethernet instead of wifi The bond interface was to account for the last use case - but so far, the aopen hasn't left my desk and I've only been using the ethernet port. I haven't tested swapping back and forth between wifi and ethernet yet. That said, the bond interface with ethernet connectivity works well and I haven't noticed any ssh delay? The bond commands I'm using I put into a script, though this will need a lot of work to be robust in production! Code: #!/bin/sh ip link add bond0 type bond ip link set bond0 type bond miimon 100 mode active-backup ip link set eth0 master bond0 ip link set mlan0 master bond0 ip link set bond0 up udhcpc -i bond0 rc-service lms restart sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
sodface wrote: > Ralphy, thanks! That's working BUT (and I hate to complain) there's a > delay of about 7-8 seconds on boot between when the jivelite UI is > displayed and when the squeezelite player is automatically selected. I > wasn't seeing this delay when I did my hack patch above. After boot and > first load, if I exit and then restart jivelite, the player is there > basically immediately. I'm not sure what the difference is between first > boot and a restart of jivelite, possibly nothing to do with jivelite but > something else at boot time is causing the delay? Anyway, for a more > "normal" use case where you wouldn't reboot often, this fix would be > great, but for this project, this will be in my car so it will be power > cycling often and I need to keep the time from power on to player > available as short as possible. > > I'll look at it some more and see if I can better understand where the > delay is coming from. It's great that the change allows jive to connect. The problem has been an issue with both squeezeplay and jivelite for a long time. I didn't test the change in an network isolated environment, so can't be sure what's causing the delay. Are you using bonding? I've noticed that sometimes it takes a longer time to connect via ssh to my aopen with it enabled? It's a small annoyance to have the ability to connect an ethernet cable when the wifi link fails and the same mac address regardless of which interface is active. sodface wrote: > Also, I posted an old APKBUILD file in another thread and for this patch > testing I updated it and I believe corrected the SPDX license identifier > to "BSD-3-Clause". Do you concur? Sorry for having it at Public-Domain > originally, I had copied an existing APKBUILD for something else as a > starting point and never corrected it. No problem. Yes, that's the right license. Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations=LL5P6365KQEXN=CA_name=Squeezebox%20client%20builds_code=USD=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
Ralphy, thanks! That's working BUT (and I hate to complain) there's a delay of about 7-8 seconds on boot between when the jivelite UI is displayed and when the squeezelite player is automatically selected. I wasn't seeing this delay when I did my hack patch above. After boot and first load, if I exit and then restart jivelite, the player is there basically immediately. I'm not sure what the difference is between first boot and a restart of jivelite, possibly nothing to do with jivelite but something else at boot time is causing the delay? Anyway, for a more "normal" use case where you wouldn't reboot often, this fix would be great, but for this project, this will be in my car so it will be power cycling often and I need to keep the time from power on to player available as short as possible. I'll look at it some more and see if I can better understand where the delay is coming from. Also, I posted an old APKBUILD file in another thread and for this patch testing I updated it and I believe corrected the SPDX license identifier to "BSD-3-Clause". Do you concur? Sorry for having it at Public-Domain originally, I had copied an existing APKBUILD for something else as a starting point and never corrected it. sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
Here's a patch for you to try that replaces the hard coded udp broadcast only poll list to populate the discovery server list with what has been configured in the Remote Libraries settings. Code: diff --git a/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua b/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua index 06cea6b..daa5d1a 100644 --- a/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua +++ b/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua @@ -193,9 +193,10 @@ end -- init -- Initializes the applet function init(self, ...) + -- Get "poll" list settings from the "ChooseMusicSource" applet. + local cms = appletManager:loadApplet("ChooseMusicSource") - -- default poll list, udp broadcast - self.poll = { [ "255.255.255.255" ] = "255.255.255.255" } + self.poll = cms["getSettings"](cms)["poll"] -- slim discovery socket self.socket = SocketUdp(jnt, Try adding the IP address of the server via Setting->Advanced->Networking->Remote Libraries which should work even with jivelite not connected to a server. You might need to restart jivelite after adding the remote library the first time. I think you will need a player already connected to the 10.0.10.10 server. Then see if you can choose the player from jivelite to connect. +---+ |Filename: AddRemoteLibrariesToUdpPollList.patch.txt| |Download: http://forums.slimdevices.com/attachment.php?attachmentid=37219| +---+ Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations=LL5P6365KQEXN=CA_name=Squeezebox%20client%20builds_code=USD=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
Thanks Ralphy! I also successfully used a linux "dummy" interface (dummy0) but it didn't work any better than just using 127.0.0.1 so no point really. Discovery didn't work with it, I think, at least on linux, it seems not having a gateway defined causes discovery issues even for local interfaces. sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
I'll investigate if it's possible to modify jivelite and squeezeplay to check for a remote lms server having been entered in the configuration and connect to it, if not, continue with auto discovery. It might end up being a chicken and egg situation, since sometimes the menus don't work at all if jive can't find lms, in which case modifying a settings file would be needed. Ralphy *1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio 'Squeezebox client builds' (https://sourceforge.net/projects/lmsclients/files/) 'donations' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations=LL5P6365KQEXN=CA_name=Squeezebox%20client%20builds_code=USD=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) always appreciated. ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
I did a little more testing tonight and it seems I was completely over-nuking it with the above netns setup. Just explicitly using 127.0.0.1 for LMS, squeezelite and jivelite (via the above edit to SlimDiscoveryApplet.lua using 127.0.0.1) works fine. I can boot up with only the loopback up and it all works well. I am specifying a bogus mac for squeezelite using the -m option as I had an issue with two player entries with the same name and I think that could potentially happen again if interfaces are coming and going and squeezelite grabs different macs, depending on which interfaces are up at the time. I've got a little more testing to do with the eth0/mlan0 bond but I think I'm over this little hump. The only ugly thing is the SlimDiscoveryApplet.lua hack job but I think I'll live with it and move on. sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
Probably posting a bit prematurely, but, I have a very, very, minimally tested solution that seems to be working. I think the network piece is overly complicated so I'll be trying to simplify that as much as possible. Basically the goal is to have the wifi interface (mlan0) and the ethernet interface (eth0) as members of a bond interface (bond0) with bond0 configured for dhcp. LMS will run on a separate virtual interface of some kind that's always up, or maybe the loopback 127.0.0.1, like I said, I need to continue to test to arrive at the simplest solution. I think the main issue in my testing so far has been that LMS and squeezelite support specifying ip addresses to bind or connect to, respectively, whereas jivelite seems to rely solely on discovery, which falls on it's face if there are no interfaces up or gateway defined. The patch below, while a bit hacky, doesn't involve recompiling anything and allows you to skip discovery and specify a server address. Code: --- usr/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua +++ /usr/share/jive/applets/SlimDiscovery/SlimDiscoveryApplet.lua @@ -229,10 +229,10 @@ function _discover(self) -- Broadcast SqueezeCenter discovery - for i, address in pairs(self.poll) do - log:debug("sending slim discovery to ", address) - self.socket:send(_slimDiscoverySource, address, PORT) - end + -- for i, address in pairs(self.poll) do + -- log:debug("sending slim discovery to ", address) + -- self.socket:send(_slimDiscoverySource, address, PORT) + -- end -- Discover players via wireless scanning @@ -253,6 +253,9 @@ end --]] + jeeplms = SlimServer(jnt, "jeep-lms", "jeep-lms") + self:_serverUpdateAddress(jeeplms, "10.0.10.10", 9000, "jeep-lms") + -- Remove SqueezeCenters that have not been seen for a while _squeezeCenterCleanup(self) +---+ |Filename: IMG_20220208_201052829.jpg | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=37180| +---+ sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
sodface wrote: > Thanks for the reply, I did actually see that one this morning, plus a > couple of older threads which are similar but not identical to my use > case. Some are picoreplayer specific (I'm not using a Pi in this case) > and/or the solutions aren't really ideal for me I don't think, eg. > adding a switch, or turning on hostapd for hotspot mode, setting static > ips on the physical interfaces etc. I'll keep looking at it, I was doing > a lot of skimming so I may have missed some important details in those > threads. I think what you're trying to do is more complicated than any of the threads on this subject I've seen. But I hoped you might encounter something in one of those threads that could nudge you in the right direction. LMS 8 nightly running on Raspberry Pi OS. Mostly virtual players, occasionally with SB Radio, Boom or Classic. RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
RobbH wrote: > Have you seen this current thread? > > https://forums.slimdevices.com/showthread.php?115897-Start-music-from-USB-device-without-network=1046110=1#post1046110 > > The links in some of the replies there might be helpful. Thanks for the reply, I did actually see that one this morning, plus a couple of older threads which are similar but not identical to my use case. Some are picoreplayer specific (I'm not using a Pi in this case) and/or the solutions aren't really ideal for me I don't think, eg. adding a switch, or turning on hostapd for hotspot mode, setting static ips on the physical interfaces etc. I'll keep looking at it, I was doing a lot of skimming so I may have missed some important details in those threads. sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
Re: [SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
sodface wrote: > > Can anyone provide any hints or forum links for standalone disconnected > setups? Have you seen this current thread? https://forums.slimdevices.com/showthread.php?115897-Start-music-from-USB-device-without-network=1046110=1#post1046110 The links in some of the replies there might be helpful. LMS 8 nightly running on Raspberry Pi OS. Mostly virtual players, occasionally with SB Radio, Boom or Classic. RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter
[SlimDevices: SqueezeCenter] LMS / Squeezelite / Jivelite - with no active interfaces?
I feel like this question must have been asked before, probably more than once, but I can't seem to come up with a good search result. The short version is that I have a device with a touchscreen running LMS, squeezelite, and jivelite. It needs to be able to operate normally with no network interfaces up. And I don't mean just no internet, I mean all interfaces down. I've dicked around with it most of the weekend and so far the only working solution I've had is to assign a static IP to an interface (eth0), manually bring it up and then add a default route (which isn't reachable because there's no physical link). In this config, all 3 pieces of software worked as expected, even find_servers immediately found the locally running LMS. The problem is that I don't really want it like this, The physical interface(s) need to be able to change state, eg. up/down, connected to my home wifi or wired lan, connected to my phone hotspot, etc. all via DHCP. LMS, jivelite and squeezelite need to be unaffected by anything happening on the outbound interface(s). When I don't have a manually configured static IP and gateway (with no ethernet cable connected) LMS starts but is really slow to respond in the browser. Squeezelite won't autodiscover, I have to specify a connection IP. Jivelite starts but doesn't connect to a server, even when I manually add a remote library using the local static ip or 127.0.0.1, it won't connect. As soon as I put a static IP on an interface, set it to up, AND add a default gateway IP, everything starts working, even if nothing external is reachable due to the cable being unplugged. I setup a working separate network namespace (this is on linux) thinking I'd just run LMS/squeezelite/jivelite all in a separate net namespace and that would solve everything, even it adds complexity to the setup. I got it all working but it's acting just like it was when all interfaces were down and unconfigured. Can anyone provide any hints or forum links for standalone disconnected setups? sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057 View this thread: http://forums.slimdevices.com/showthread.php?t=115923 ___ Squeezecenter mailing list Squeezecenter@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/squeezecenter