Trigger light effect from another pi

  • I am attempting to trigger the lights running on a pi from another pi. As an avid hockey fan i created my own version of the goal lights (similar to police light effect). I want the lights to be triggered automatically similar to the Budweiser red light. I have script running on another pi that checks the score and is currently setup to play audio through a speaker attached when my team scores a goal. What i am trying to do now is get this pi to communicate with the lights pi to trigger the light effect with it. I know on the lights pi i need to send


    /storage/hyperion/bin/hyperion-remote.sh -e "Goal" -d "40000"


    My question is how do i send that from the triggering pi?


    I'm assuming i can just hit a web service link as I think thats how the chrome and android apps work.


    Apologies if this is a simple answer, i'm still fairly new to this. Interaction designer by day, tinkerer/Connoisseur of many things by night.

  • I think you should install sshpass and then the following command should work:


    sshpass -p 'YourPassword' ssh user@host `/storage/hyperion/bin/hyperion-remote.sh -e "Goal" -d "40000"`


    However I've never used sshpass by myself, so can't guarantee it's ok.


    You can also add --print to your hyperion-remote command and the JSON result sent to the hyperion RPi via TCP should execute the desired effect.


  • I'll have to give that a go, thanks!

  • could you clarify the -a? I am uncertain how to communicate with the hyperion-remote on the other pi. I know it should be something simple and i feel i am right on the precipice of figuring this all out.


    I think i should have specified that i do not have hyperion remote on the pi, i was referencing the web app, i was hoping to just pull a script from it, but then trying to put pieces together it hit me that you are probably saying i should put hyperion remote on my triggering pi and then the -a is just the ip of my lights pi. So now just to figure out how to get to Hyperion-remote on the trigger pi. Thanks for the insight, i hope i am on the right track. I dont know why i strayed away from the forums for so long.


  • The SSHPass psuedo worked, when I ssh into my triggering pi and run the SSHPass command it first opens the connection to the lights pi and then if i run it again will trigger the lights but stays in the lights pi so i dont think that is a viable option. I've run wireshark hoping to track the TCP but its not quite clear what its sending.

    Just copy hyperion binaries to your triggering pi. Call there hyperion-remote -a ip_from_hyperion_pi:19444 -e Goal -d 40000


    I was actually literally just getting down that road. I was struggling to connect directly to the hyperion-remote, (still a newb to this more back-end stuff i was trying to hit hyperion-remote.sh) But alas it worked! Now i just need to edit the triggering script and apply my new data.


    Thank you all for your help!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!