Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146

    Output Trigger by GPIO

    Hi,

    Using active loudspeakers need a trigger to switch them on.
    Now, I switch them on at the same time as the Pi. But you hears some clicks/noises during boot.

    Is it possible to add a trigger pin on GPIO. This pin will change only when the Pcp is ready ?
    And of course when switching off.

    Thanks

  2. #2
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    1,800
    Quote Originally Posted by PaulH View Post
    Hi,

    Using active loudspeakers need a trigger to switch them on.
    Now, I switch them on at the same time as the Pi. But you hears some clicks/noises during boot.

    Is it possible to add a trigger pin on GPIO. This pin will change only when the Pcp is ready ?
    And of course when switching off.

    Thanks
    All built into pCP, Google is your friend !

    Jeff

    Want a webapp ? Get SqueezeLite-X ! https://forums.slimdevices.com/showt...l=1#post903953

  3. #3
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by Jeff07971 View Post
    All built into pCP, Google is your friend !

    Jeff
    You speak about this one: https://www.gwendesign.com/slimserve...#powerswitchii

    But I would like to keep the possibility of having IR Blaster.

  4. #4
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by PaulH View Post
    You speak about this one: https://www.gwendesign.com/slimserve...#powerswitchii

    But I would like to keep the possibility of having IR Blaster.
    No other suggestion ?

  5. #5
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    1,800
    Just leave the Pi on and use the -G option in squeezelite to trigger a GPIO to turn the speakers on.

    This MAY work from cold boot but I doubt it

    Jeff

    Want a webapp ? Get SqueezeLite-X ! https://forums.slimdevices.com/showt...l=1#post903953

  6. #6
    Junior Member
    Join Date
    Dec 2015
    Posts
    22
    Quote Originally Posted by PaulH View Post
    Hi,

    Using active loudspeakers need a trigger to switch them on.
    Now, I switch them on at the same time as the Pi. But you hears some clicks/noises during boot.

    Is it possible to add a trigger pin on GPIO. This pin will change only when the Pcp is ready ?
    And of course when switching off.

    Thanks
    As an aside, do you have a simple smart plug you can manage with a REST endpoint or something similar to trigger the speakers on and off at the mains?

    I have done GPIO triggers with PCP and it works really well but if you have stuff on the headers or another reason not to do it or you don't want the complexity of doing the setup depending on what your triggering, you can easily just use the SqueezeLite power on/off script (-S) in PCP to do just about anything you want and PCP has a pretty good repository for all your normal script friendly tools?

    Just thinking that may be an easier solution depending on what you have setup.

    I use power on/off scripts on a lot of my SqueezeLite setups to do odds and sods (including turning on an old call centre display that then scrolls Now Playing for the player and turns off when LMS then turns off the player), that may not be routine use mind you, just turning a few smart sockets on and off in the script is fairly easy if they have an endpoint you can poke.

    Just to be clear, -S will mean that the ON is triggered just before playback starts (and playback just starts as soon as the script returns) so no pops and noise during boot, idle etc. and OFF is triggered whenever the player is turned off (manually or via something like the powersave plugin in LMS, my preferred way of doing it).

    Its another option that hopefully might be of use, if your keen to still use GPIO post a little more about how to plan to trigger the speakers. Happy to help with either.

Posting Permissions

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