Home of the Squeezebox™ & Transporter® network music players.
Page 86 of 101 FirstFirst ... 3676848586878896 ... LastLast
Results 851 to 860 of 1001
  1. #851
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    798
    I agree with you that going against the fast and lite philosophy of pCP should be avoided. Even 15s is unacceptable.

    I’ve been contemplating for a while now to have a page on my site where you answer a question or 2 and select a radio button for your platform. Then a PHP script builds a zip that you can download with a single click. It would be a pre-built file with the binary and the systemd file (if needed) and the updater script. All pre-populated with your exact setup like IP address, token, uuid, target directory for install, etc.

    I’m just worried that supporting that may turn out to be more work than supporting and improving the skills themselves

  2. #852
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101
    Quote Originally Posted by philchillbill View Post
    I’m just worried that supporting that may turn out to be more work than supporting and improving the skills themselves
    Sounds like a great idea, but yeah, it would no doubt take a lot of effort to make it foolproof!

    I may have a tinker with a pCP-specific installer script along the lines you suggested earlier.

  3. #853
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101

    ngrok installer script

    This script should download the 64-bit ngrok binary, convert it to a tcz package and make it load on boot.

    To use it, create a file 'ngrok_installer.sh' in your home directory (/home/tc aka ~), paste the lines of the script into it, and make the script executable (chmod +x ngrok_installer.sh).

    Then simply run the script (./ngrok_installer.sh) and reboot.

    Once the Pi reboots you can type 'which ngrok' to see if it has installed. It should show a single entry '/usr/local/bin/ngrok'.

    Everything else in the home directory should have been tidied up by the script. The script itself will even have disappeared unless you did a 'backup' before rebooting.

    I've tested this on a fresh pCP install, and also on a machine where ngrok was already installed, and it seems to work ok. You don't need to change any of the path variables at the start of the script, but if you do, TAKE CARE, because in the 'tidy up' section of the script it will recursively and silently delete everything in $workingdir/

    This is also worth keeping in mind if you DON'T change the path variables, and you already have a folder called ~/ngrok. That will be GONE after this script runs

    EDIT: Actually it won't unless you do a backup before rebooting. So simply rebooting after the script runs seems like the best approach.

    Code:
    #!/bin/sh
    
    # download ngrok and convert to installable package, so that the executable is placed into /usr/local/bin
    
    # setup some path shortcuts
    packagename=ngrok
    workingdir=~/$packagename
    rootpath=$workingdir/usr/local/bin
    tgz=~/$packagename.tgz
    tcz=~/$packagename.tcz
    
    # create folder structure
    mkdir -p $rootpath
    
    # fetch ngrok tgz - N.B. may need to check path to this file in case it changes in the future
    # wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip -O $tgz #32-bit
    wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm64.tgz -O $tgz #64-bit
    
    # extract the ngrok executable into the required part of the folder structure
    tar -x -f $tgz -C $rootpath
    
    # download and load squashfs-tools
    tce-load -w squashfs-tools.tcz
    tce-load -i squashfs-tools.tcz
    
    # create the ngrok package
    mksquashfs $workingdir/ $tcz
    
    # tidy up
    rm $tgz
    rm -Rf $workingdir/
    
    # move the ngrok package to the tce/optional folder
    TCEMNT="/mnt/$(readlink /etc/sysconfig/tcedir | cut -d '/' -f3)"
    mv $tcz $TCEMNT/tce/optional
    
    # add ngrok.tcz to tce/onboot.lst
    sed -i '/^ngrok.tcz/d' $TCEMNT/tce/onboot.lst #remove all previous ngrok entries, to make sure it's only listed once
    echo $packagename.tcz >> $TCEMNT/tce/onboot.lst
    Last edited by chill; 2021-01-28 at 05:20.

  4. #854
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    798
    @chill, Nice work This stuff gets addictive when the creativity adrenaline flows.

    I'll give it a try myself later as I actually want to play with pCP and have never set it up before so I will be a perfect noob !

    Hope you're enjoying the skills. If you're new to Alexa it takes a little while to learn to pace the commands so that she always understands but that quickly becomes second nature. I don't have any Echo 4s here - how's the sound quality when streaming from LMS?

  5. #855
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101
    Quote Originally Posted by philchillbill View Post
    @chill, Nice work This stuff gets addictive when the creativity adrenaline flows.
    Indeed. It'll be a sad day when I stop enjoying a new challenge. And it beats doing my tax return, which sadly has to be a priority this afternoon

    Quote Originally Posted by philchillbill View Post
    Hope you're enjoying the skills. If you're new to Alexa it takes a little while to learn to pace the commands so that she always understands but that quickly becomes second nature. I don't have any Echo 4s here - how's the sound quality when streaming from LMS?
    I'm afraid I haven't tried streaming to the Echo, or even used the skill a great deal yet - too busy concentrating on scripting! But what little I have used it so far has been positive, and I am getting used to the syntax and pacing. I'm perhaps struggling with the overlap between MediaServer and LMS-lite, but that will come with a bit more experience. Oh, and of course I tend to have my music too loud for Alexa to be able to hear me clearly!

  6. #856
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101
    Tax calcs done - just the form filling bit to do now

    I now have an installation script that will fetch the correct version of ngrok according the pCP platform (32-bit or 64-bit). I used the 'rule' that I found here - not sure how future-proof that is!

    It will also dump a pro-forma ngrok.yml file in /home/tc/.ngrok2, so the user only has to update it with the necessary personalised data.
    Last edited by chill; 2021-01-28 at 12:09.

  7. #857
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    798
    Quote Originally Posted by chill View Post
    Tax calcs done - just the form filling bit to do now

    I now have an installation script that will fetch the correct version of ngrok according the pCP platform (32-bit or 64-bit). I used the 'rule' that I found here - not sure how future-proof that is!

    It will also dump a pro-forma ngrok.yml file in /home/tc/.ngrok2, so the user only has to update it with the necessary personalised data.
    Nice. I was also doing tax-returns today so I'll have to wait until tomorrow to play with pCP.

  8. #858
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    798
    I've added a new section to the online docs which addresses built-in commands and when the skill invocation name can be omitted vs when it is required. This also explains why there can sometimes be a clash between the MediaServer and LMS-lite skills for simple transport commands like pause.

    It's at https://mediaserver.smartskills.tech...ml#section-1-6

    Hope it's clear !

  9. #859
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101
    Quote Originally Posted by philchillbill View Post
    I've added a new section to the online docs which addresses built-in commands and when the skill invocation name can be omitted vs when it is required. This also explains why there can sometimes be a clash between the MediaServer and LMS-lite skills for simple transport commands like pause.

    It's at https://mediaserver.smartskills.tech...ml#section-1-6

    Hope it's clear !
    That's answered a few questions. Very useful, thank you.

  10. #860
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,101
    Do I need to do anything special to make streaming to the Echo work? If I ask her "Alexa, ask MediaServer to stream the playlist 'Catchy'", she finds the playlist ok, tells me that it's now streaming, and in the LMS web interface I can see the playlist is loaded up under the 'Web Client' player, but there's no sound from the Echo. The transport and volume controls in the web interface don't work either.

    If I ask her to stream something else, without invoking MediaServer, she starts playing something from Amazon Music, and that plays fine.

    Any tips for getting streaming to work?

Tags for this Thread

Posting Permissions

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