Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Feb 2021
    Posts
    2

    Power Script for Windows version of Squeezelite

    Hi all,

    Massively appreciate the hard work everyone puts in to keep this project alive.

    Unless I'm missing something, the windows version of Squeezelite doesn't have the "-S <Power Script>" option, is this possible to implement in a future update or is there an alternative way of running a script when players turn on/off with the windows version?

    Thanks,
    Tony

  2. #2
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,837
    Currently, there are no calls in output_pa.c to run the power script, so you can't just enabe the power script build option for windows.

    I tried to add support for -S on windows in the past, however, the power script would only ever trigger three times and never again after that.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Posts
    2
    Appreciate the reply, I assumed it wasn't straightforward!

    In case it's of any interest to anyone, I ended up starting squeezelite with the basic logging option then using a powershell script to monitor the log for 'output on' or 'output off' then turn my amp on/off accordingly (and clear the log so it doesn't get too big). I've run the powershell script as a service and seems to be working great so far!

  4. #4
    Member
    Join Date
    Jun 2007
    Location
    Paris, France
    Posts
    88
    Quote Originally Posted by ralphy View Post
    Currently, there are no calls in output_pa.c to run the power script, so you can't just enabe the power script build option for windows.

    I tried to add support for -S on windows in the past, however, the power script would only ever trigger three times and never again after that.
    Is the -S option enabled for MacOS?
    Would the script be just an excutable shell script?

    Many thanks for your extensive work on this, a well as on Jivelite, etc.

  5. #5
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,837
    Quote Originally Posted by rlsx View Post
    Is the -S option enabled for MacOS?
    Would the script be just an excutable shell script?

    Many thanks for your extensive work on this, a well as on Jivelite, etc.
    Well, yes but no. I noticed recently that the power script build option was enabled for squeezelite on MacOS by mistake and removed it.

    It doesn't work on MacOS either as the hooks are not in output_pa.c
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  6. #6
    Member
    Join Date
    Jun 2007
    Location
    Paris, France
    Posts
    88
    Quote Originally Posted by ralphy View Post
    Well, yes but no. I noticed recently that the power script build option was enabled for squeezelite on MacOS by mistake and removed it.

    It doesn't work on MacOS either as the hooks are not in output_pa.c
    Thanks, but sigh...
    How is it supposed to work on a Linux device? A shell script? How is it structured for ON-action, and OFF-action?

  7. #7
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,837
    Quote Originally Posted by rlsx View Post
    Thanks, but sigh...
    How is it supposed to work on a Linux device? A shell script? How is it structured for ON-action, and OFF-action?
    Yes it's a shell script. That must have execute permissions and you need to provide the full path to the script in the -S option.

    There's an example script in the squeezelite sources.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

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
  •