Trigger Another Raspberry Pi (GPIO or Python Script)

I recently moved to Home Assistant (and I love it) and I’m currently in the process of moving all of my devices over. One thing I can’t figure out is how to have my RPi4 (Hassio) trigger another Raspberry Pi that I’m running. I currently have IFTTT setup using Google Assistant and a Webhook into a Raspberry Pi Zero that runs a Python script that will trigger a relay momentarily via GPIO to open my garage door. It doesn’t have an ON/OFF state, it’s just a momentary trigger.

What I’m looking to do is one of two things. Either have Home Assistant run the Python script on that other Raspberry Pi OR have Home Assistant trigger the GPIO momentarily on that other RPi to trigger the relay.

Thoughts?

I don’t want to make this too long, but you can use ssh for what you want.

ssh -i /path/to/key/pair [email protected] /path/to/python /path/to/script.py

That could trigger your script on the other Pi

Thanks @fanuch. Are the steps to make this happen documented somewhere? The command makes sense, I just don’t know where to put it.

So the command will be a Command Line Switch.

I don’t have Hassio to know. If you are using Home Assistant Core (python venv or Docker) it would be easy and straight forward to do