Output Trigger by GPIO

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PaulH
    Senior Member
    • Jan 2022
    • 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
  • Jeff07971
    Senior Member
    • Aug 2011
    • 1900

    #2
    Originally posted by PaulH
    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
    sigpic
    Want a webapp ? Get SqueezeLite-X ! https://forums.slimdevices.com/showt...l=1#post903953

    Comment

    • PaulH
      Senior Member
      • Jan 2022
      • 146

      #3
      Originally posted by Jeff07971
      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.

      Comment

      • PaulH
        Senior Member
        • Jan 2022
        • 146

        #4
        Originally posted by PaulH
        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 ?

        Comment

        • Jeff07971
          Senior Member
          • Aug 2011
          • 1900

          #5
          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
          sigpic
          Want a webapp ? Get SqueezeLite-X ! https://forums.slimdevices.com/showt...l=1#post903953

          Comment

          • DJWillis
            Junior Member
            • Dec 2015
            • 24

            #6
            Originally posted by PaulH
            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.

            Comment

            Working...