PDA

View Full Version : LMS start\stop\restart



steff
2018-01-10, 16:53
whenever I boot my Rpi3 running pCP (with Jivelite and the touch screen), radios are almost never available.

In order to get them, I have to restart the LMS from the web page of the pCP.
After the above I can play radios from the WEB interface, but from the touch display the radio icon is not showing

In order to play radios even from the touch LCD I have to QUIT the interface, then when it reload after some seconds, the radio icon appears.

question 1)
How and where put a command to delay the LMS autostart? or to restart it?
Keep in mind that I am using the pCP + LCD touch and I want to avoid web interface

question 2)
same as 1) but for the LCD interface

thanks.

mherger
2018-01-10, 22:24
> whenever I boot my Rpi3 running pCP (with Jivelite and the touch
> screen), radios are almost never available.

Is LMS running on the same Pi? What kind of network connection are you
using? The symptoms you're describing would likely happen if LMS was
started before the network connection was up. Don't use wlan if you're
running LMS on the device.

--

Michael

steff
2018-01-11, 02:00
> whenever I boot my Rpi3 running pCP (with Jivelite and the touch
> screen), radios are almost never available.

Is LMS running on the same Pi? What kind of network connection are you
using? The symptoms you're describing would likely happen if LMS was
started before the network connection was up. Don't use wlan if you're
running LMS on the device.

--

Michael

- YES, LMS is running side by side with all the other software on the very same Rpi3
- Almost everyone is saying that this happens because LMS started before network was up, but keep in mind:
the problem occurrs most of time, not always
the problems occurrs with both embedded WiFi, WiFi provided by additional USB - WiFi dongle and wired Ethernert as well
- Why do not use WiFi if LMS is running on the device? Why not?
Keep in mind that with an additional USB WiFi dongle (Edimax 5 Ghz), without additional drivers, my Rpi3 is capable of streaming to the USB DAC 384 kHz PCM pulling FLAC from a NAS with WiFi without any pops or glitches... just perfect

For all the above, I am asking how to delay the LMS start or restart it from the LCD touch etc.

steff
2018-01-11, 06:42
quite simple

LMS is owned by a service thats waiting for "the (a) Network"
WLAN is a special Network thats starting very very late.

I dont know PCP but i think there is a way to disable the squeezelite portion.
Triode build a very very good Plugin called localplayer.
That plugin ist started from lms and does nothing else than starting a squeezelite session.

You can also change the binary from that plugin to a later one.

If LMS depends on network, why then LMS starts even if the (very very slow to start) WLAN is not started?
The problem in my setup is that LMS automatically starts at boot every time, but most of times radios are not available until I RESTART LMS

steff
2018-01-11, 07:43
Did you ever add a passprase to use a Lan Network?

Another question:

Are you able to wake up your PC over Lan ?
Why you re not able to wake it up over WLAN?

Funny :-)

Do you mean that LMS waits for the wired Ethernet to starts but starts even if WLAN is not connected?

Trying to be again serious:
1) when my Rpi3 boots, LMS automatically starts
2) radios are (most of times) not avaialble
3) stop and start again manually the LMS solves the problem

what is and where is the "trigger" to let radios be enabled or not?

P.S.:LMS does not wait for any network before to start. Even if I disable WiFi and do not plug any wired Ethernet and store my music on a USB local drive, LMS starts and I can play music.

Man in a van
2018-01-11, 08:36
Stef, have you tried this tweak?

24366

steff
2018-01-11, 16:23
Looking at the log, when my Ri3 boots, it first connect to the network (yes, WiFi), it gets the IP address from the DHCP where is its reservation, THEN LMS starts.

So... I can confirm the LMS starts AFTER the Rpi3 got the IP address.

I tried to put a radio station in the auto start, as suggested and of course after the boot the radio start playing. Always.

I have several radio stations in my favourite list and these can be played, always.

additional infos:
Since the Rpi3 is connected to a LCD screen, I can have a look at the boot process before the GUI\Jivelite comes available.
I verified these steps both for the WLAN and wired ethernet
first Rpi3 ask for the IP to che DHCP, then it gests the reserved IP address
after that it mounts the CIFS share from the NAS where I host my FLAC files
(since the mount is succesfully, I imagine that the RPi3 is correctly connected to the network)
only after that I can see the LMS starting then started.

Radio channel alredy saved in my favourites can always be played
what is not working is the absence of the RADIO icon on the LCD touch to be used to search additional channel and so on
the radio icon becomes avaialble only after LMS restart AND GUI quit\restart
If I just restart Jivelite, radio icon is not present, I must restart LMS first.

Mnyb
2018-01-12, 19:45
The important part is actually the DNS adress , if that is not known to the system before LMS starts you get these symptoms.

steff
2018-01-13, 16:13
The important part is actually the DNS adress , if that is not known to the system before LMS starts you get these symptoms.

Nice to know.

Looking at the LCD screen during the boot, I can perfectly see that together the IP address, the DHCP correctly assign the ip of the DNS server, after that mouts the NAS, then starts the LMS.
This afternoon I got a new Rpi3 to be used for VPN terminator at my home and I tested a brand new setup of pCP.
I got the very same behaviour.

Supposing my problems can come from my home network, I got a mobile WiFi hotspot.
I configured the Rpi3 to connect to the WiFi provided by the hotspot and... IT WORKS !!! Radio available!!!

So... let me recap... hoping some additional suggestions can come.

Connecting the Rpi3 to my home network... wired Ethernet... embedded WiFi... Edimax WiFi USB dongle... radio are not available
The Rpi3 boots, it gest IP address and DNS address correctly, then mount the CIFS shares (so the network is OK), then starts LMS.
After a LMS restart, radios are available, always,

Connecting the Rpi3 to a mobile WiFi hotspot... radio works.

The problem is that I have a huge number of devices @ my home working on my network without any issue (Playstation, TV, Sky box, iPad, Samsung smartphones and tablet, two HP Proliant servers, the alarm system, etc....)
So I can not confirm it is problem of my switches and router...
pobably a problem of "inter-compatibility" between the Rpi3+pCP+my network.

suggestios?

Mnyb
2018-01-13, 18:44
If you wait a while Radio wont show up eventually ? You should be running the latest 7.9.1 beta it has some improvements regarding this behaviour.

Run ifconfig or similar to see if the rpi actually has got ip dns etc .

You only have one network interface running on the pi ?

Workaround.

Make a static network setup with ip dns and gateway etc so that DHCP is not a factor.
( make sure that the DHCP pool does not include this ip ).

sbp
2018-01-14, 00:51
I agree that there is something on your network that is slow. This has the consequence that when LMS start it is unable to populate the radiostations.

As a work-around you could make a User command" on the "tweaks page". The command you supply here will be executed as the last command while pCP is booting.
In this field you could add a "restart LMS command" and if that isn't enough you could add a "sleep" first command in order to let pCP wait a few secunds before restarting LMS.

steff
2018-01-14, 14:57
No... radio will not show even waiting days... until I restart LMS and Jivelite
I am using the software as it comes from the official distribution.
Yes,,, telnetting the Rpi3, I can confirm it gest IP and DNS and gateway, etc.
Yes... 1 interface at a time... it happens even with just the wired Eth and internal WiFi disabled

my Internet provider is Vodafone and I have a proprietary modem\router. I can not change the configuration, so... if DHCP is enabled on a device, it gets as DNS the IP address of the router (same as gateway).
In order to override the default DNS, i have to put it into the device.

I already tried, but seems that using the pCP web interface I can just forse the static IP on the wired Ethernet and not on the WiFi.

Question 1)
How to force a static IP and DNS using the WLAN?

Question 2, for SBP)
what have I to write in the tweaks page to restart the LMS and to restart Jivelite?
(if I just restart LMS, I can play radios from the web interface, but no radio icon on the LCD screen... I need to restart the Jivelite too)

My best regards.

d6jg
2018-01-19, 04:25
The important part is actually the DNS adress , if that is not known to the system before LMS starts you get these symptoms.

I agree.
I have seen the issue described with piCorePlayer and LMS.
By default the pCp set up assumes that your DNS server is your router. I don't think it properly obeys the DHCP server settings in this area.
In the end I solved the issue by giving the Pi a real static IP address (as opposed to a reservation) and a static DNS address (8.8.8.8)
I recall some debate with the pCp guys about the default being the router and suggested it be Google.
I could see that DNS was the issue as my Pi booted at epoch every time as it could not find the NTP server.

EDIT. I am talking wired ethernet. It isn't possible to set a true static IP or DNS on the wifi interface.

steff
2018-01-22, 02:08
I agree.

EDIT. I am talking wired ethernet. It isn't possible to set a true static IP or DNS on the wifi interface.

Is there in this forum someone that can help me\us in:

1) how to set static IP address for a WLAN connection?
There is the feature in the WEB GUI, but only for wired Ethernet

2) write the command to stop\start or restart from command line for LMS?

3) eventually let me know where is located the script that starts LMS at boot

steff
2018-01-23, 17:14
Dears,

trying to find how to restart LMS, I got this "solution".

In the pCP TWEAKS page, I put two commands:

User commands
User command #1 sudo killall slimserver.pl
User command #2 /usr/bin/perl /usr/local/slimserver/slimserver.pl --daemon --user tc --group staff

In this way, at the boot, LMS is started by the normal procedure, then LMS is stopped and then restarted.
I got the startup command looking at the processes running.

The above procedure WORKS!!!

Now finally I have internet radios available, but... there is another little problem...
if I visit the pCP web GUI, I see LMS stopped, even if everything seems running correctly.

This is the difference:
when LMS is started by pCP boot process, this is the running process
{slimserver.pl} /usr/bin/perl /usr/local/slimserver/slimserver.pl --daemon --user tc --group staff

when the process is killed and then restarted, I get this new running process
/usr/bin/perl /usr/local/slimserver/slimserver.pl --daemon --user tc --group staff

any suggestion?

Paul Webster
2018-01-24, 02:36
Try starting it the way that pCP does it



sudo /usr/local/etc/init.d/slimserver start

steff
2018-01-24, 04:37
Great!
I found it in the meantime by my own and it worked.

Moreover if you confirm this is the correct way... I thank you and I am happy!

Where is the pCP startup script that is called at the boot and starts slimserver?
Maybe I can just add a delay avoiding to completely stop and restart.

thanks a lot

sbp
2018-01-24, 05:24
Great!
I found it in the meantime by my own and it worked.

Moreover if you confirm this is the correct way... I thank you and I am happy!

Where is the pCP startup script that is called at the boot and starts slimserver?
Maybe I can just add a delay avoiding to completely stop and restart.

thanks a lot

Sorry for my late reply. But these commands should work:
sudo /usr/local/etc/init.d/slimserver stop

sudo /usr/local/etc/init.d/slimserver start

The start is initiated in: /home/tc/www/cgi-bin/do_rebootstuff.sh
You could try to add a pause in front of the LMS starting part.

Remember to do a backup after you have made your changes to the file, otherwise it will not be there after a reboot.

steff
2018-01-24, 07:17
The start is initiated in: /home/tc/www/cgi-bin/do_rebootstuff.sh
You could try to add a pause in front of the LMS starting part.
.

Just added 10 seconds of sleep... PERFECT!

I am very happy!

Paul Webster
2018-01-24, 09:39
i dont know, but in another thread he explained he uses some xubuntu and i dont knew wehat to believe right now...

slimserver wouldt work on ubuntu it must be logitechmediaserver unless he uses a very very very old version but he also describes 7.8 / 7,.9 inn the other thread


I "think" he did his own script or something other funny stuff otherwise all these facts didnt make any sense...


cheers

He said in this thread ...
"In the pCP TWEAKS page, I put two commands:"
which is why I answered like I did.

steff
2018-01-24, 10:04
He said in this thread ...
"In the pCP TWEAKS page, I put two commands:"
which is why I answered like I did.

If talking about me, I am runnining pCP 3.22 + Jivelite on a Rpi3 + the official 7'' LCD touch.
The problem was: whenever I boot the Rpi3, at the end of the process, internet radios are not avaialble and become available just after LMS restart.
The root cause has been identified on a problem on the local DNS that is my router, but I am not able to solve it.

Inserting 10 second of delay in starting the LMS... seems PERFECT and for sure much better than stopping and starting again the LMS because in this way I have also to quit the GUI and reopen it.

pCP is a GREAT piece of solution.

I am now waiting for the DSD native support, not only DoP.

sbp
2018-01-24, 10:33
Thanks for the kind words.
Unfortunately the solution you are using now will need to be redone after you update pCP, but now you know how to do it.

majones
2018-01-28, 02:40
Sorry for my late reply. But these commands should work:
sudo /usr/local/etc/init.d/slimserver stop
sudo /usr/local/etc/init.d/slimserver start

I'm new to the Rapberry Pi and pCP, and discovered that some of my LMS menu items weren't there after a reboot but were after a subsequent restart of LMS. I was delighted to discover this fix that meant I didn't have to delve into linux! Worked perfectly.

steff
2018-01-28, 17:09
I'm new to the Rapberry Pi and pCP, and discovered that some of my LMS menu items weren't there after a reboot but were after a subsequent restart of LMS. I was delighted to discover this fix that meant I didn't have to delve into linux! Worked perfectly.

if your problem can be solved by introducing a delay in the LMS startup process at boot... then it would be much more better.