Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
No problem. I get lucky sometimes. :) Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Hi Greg, thanks a lot for the great script and the very helpful support. Thanks to your help everything is now running as I imagined it. Really great. Thank you very much. In the end it was just my mistake. Didn't do a "$ pcp bu" after the changes. Just forgot that pCP is RAM based. With best regards ferdicharms ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
It better to look for a Linux tutorial on file permissions. Have a look at: https://www.geeksforgeeks.org/permissions-in-linux/ Do a la command. (la = ls -a) Code: tc@pCP:~$ la total 28 drwxr-s---4 tc staff 220 Oct 11 13:24 ./ drwxrwxr-x3 root staff 60 Jan 6 2017 ../ drwxr-xr-x2 tc staff 40 Jun 6 04:31 .X.d/ -rw-r--r--1 tc staff 114 Jun 6 04:31 .alsaequal.presets -rw-rw-r--1 tc staff 654 Oct 12 05:23 .ash_history -rw-r--r--1 tc staff 1016 Jun 6 04:31 .ashrc drwxr-s---3 tc staff 60 Jan 6 2017 .local/ -rw-rw-r--1 tc staff 920 Jun 10 2019 .profile -rwxr-xr-x1 tc staff 582 Oct 11 14:02 delaystart.sh -rwxr-xr-x1 tc staff 2135 Jun 6 04:31 pcp-powerbutton.sh -rwxr-xr-x1 tc staff 713 Jun 6 04:31 powerscript.sh If tc owns the file then "$ chmod 755 delaystart.sh". As pCP is RAM based you need a backup after you change something. If you are at the Linux commandline "$ pcp bu" will do. Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Greg Erskine wrote: > hi ferdicharms, > > Here's an idea that might work? > > This script submits a LMS command via the function pcp_lms_start_command > with a sleep command included. > > This script should be run from a User Command ie. > /home/tc/delaystart.sh > > > Code: > > #!/bin/sh > > # > # Delayed start > # > > . /var/www/cgi-bin/pcp-functions > . /var/www/cgi-bin/pcp-lms-functions > > DELAY=2 > LMSCOMMAND="playlist play https://st01.sslstream.dlf.de/dlf/01/high/aac/stream.aac"; > DELAYSTARTLOG="pcp_delay_start_lms.log" > > echo "Delayed start: $DELAY" > sleep $DELAY > > echo "LMS command: $LMSCOMMAND" > ${LOGDIR}/${DELAYSTARTLOG} > pcp_lms_start_command "$LMSCOMMAND" >> ${LOGDIR}/${DELAYSTARTLOG} > > > > > You could, if you wanted, remove the delay from the script and add the > delay to the front of the User Command: ie sleep 10; > /home/tc/delaystart.sh > > regards > Greg Hi Greg, that's it! Great! So it works quite wonderfully with a delayed start. My piCorePlayer wakes up my Debianserver via wol and 60 seconds later the stream starts automatically. Fantastic. Thanks a lot. I'm a beginner in Linux and still have a small problem that I can't solve: I had to make the script executable with "chmod +x /home/tc/delaystart.sh". Only then it worked. But now that the script is executable, I can't change anything in the script (e.g. change the stream). Every change to the script is gone after a reboot and the first version is executed. How can I change the script after I made it executable with chmod +x? Or was "chmod +x" a mistake and I have to do it differently? ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
hi ferdicharms, Here's an idea that might work? This script submits a LMS command via the function pcp_lms_start_command with a sleep command included. This script should be run from a User Command ie. /home/tc/delaystart.sh Code: #!/bin/sh # # Delayed start # . /var/www/cgi-bin/pcp-functions . /var/www/cgi-bin/pcp-lms-functions DELAY=2 LMSCOMMAND="playlist play https://st01.sslstream.dlf.de/dlf/01/high/aac/stream.aac"; DELAYSTARTLOG="pcp_delay_start_lms.log" echo "Delayed start: $DELAY" sleep $DELAY echo "LMS command: $LMSCOMMAND" > ${LOGDIR}/${DELAYSTARTLOG} pcp_lms_start_command "$LMSCOMMAND" >> ${LOGDIR}/${DELAYSTARTLOG} You could, if you wanted, remove the delay from the script and add the delay to the front of the User Command: ie sleep 10; /home/tc/delaystart.sh regards Greg Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Greg Erskine wrote: > Sorry, another one of my stupid suggestions. :o > > Obviously, LMS Auto Start has to be LMS CLI commands. I was thinking > about User commands. > > Next stupid suggestion: User commands > > > Code: > > sleep 20; pcp play > > > > might restart the last playlist Thanks for the tip. That works. But I'm still looking to be able to listen to my stream (https//st01.sslstream.dlf.de/dlf/01/high/aac/stream.aac) via auto start in the morning after switching on. Any more idea? ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Sorry, another one of my stupid suggestions. :o Obviously, LMS Auto Start has to be LMS CLI commands. I was thinking about User commands. Next stupid suggestion: User commands Code: sleep 20; pcp play might restart the last playlist Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Greg Erskine wrote: > Does the normal Linux method not work? > > > Code: > > sleep 20; playlist play > > Of course, that would be the simplest solution. I just tested it under Auto start LMS and unfortunately it does not work. I can save the command successfully but it shows no reaction. Also no message in the logs anymore ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Does the normal Linux method not work? Code: sleep 20; playlist play Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Hello Ronnie, thank you very much for the advice. I will try the crontab job. The picoreplayer is running with a hifiberry dac on a raspberry 2b. This is a bit too weak for a large music collection. ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Or maybe run a crontab job on the piCorePlayer to restart it after the LMS is up Code: @reboot sleep 30 && /sbin/reboot I don't know if this is the correct command, or that, if it would work, that it will work :confused::rolleyes::) ronnie Man in a van's Profile: http://forums.slimdevices.com/member.php?userid=43627 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] piCorePlayer with Auto start LMS
Why not put LMS on the piCorePlayer ? ronnie Man in a van's Profile: http://forums.slimdevices.com/member.php?userid=43627 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
[SlimDevices: Unix] piCorePlayer with Auto start LMS
I use the Auto start tweaks of the piCorePlayer and with Auto start LMS and "playlist play https://st01.sslstream.dlf.de/dlf/01/high/aac/stream.aac"; the stream is played after each start of the piCorePlayer. This works fine. Unfortunately the Auto start does not work when I start my Debianserver with Logitech Media Server in the morning using the Wake-on-LAN (WoL) of my piCorePlayer. Here the piCorePlayers seems to boot too fast and the Logitech Media Server is not online yet. [ INFO ] pcp_auto_start_lms.log: not Connected... Is there a way to delay the command "playlist play..." a bit, so that first the Logitech Media Server is online and then the Auto start LMS is executed? Maybe via the "User commands"? User command #1: sleep 30 User command #2: "playlist play..." Does not work like this ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix