- Posted on
Wed Aug 11, 2021 1:03 am
-
rhanson
offline
-
- Posts: 192
- Joined: Apr 30, 2013
Nothing wrong with ssh, it gets the job done. You don't get a nice way to handle failures or errors, so you'll have to build that in.
Another approach is an HTTP microframework like Flask (python). If you can handle ssh commands, Flask is trivial. You would have some python code running on the Pi waiting for your http commands, and then it would execute the shell commands locally. You could handle errors and return a friendly http response code and/or success/error message.
Yet another approach is MQTT. You could just have the Pi communicate with an MQTT broker on your network, and have Indigo send it commands and process responses. There are plugins to handle this, but there's a lot of configuration and you can probably do it easier by just coding scripts to send and receive messages.
Depends on what you're trying to accomplish. If it's just simple stuff with no feedback needed, go for the simple ssh route. If you need request-response style communication, use http. And if you just want to send the Pi messages and have it send status messages back, then MQTT is the ticket.
Karl's PiBeacon plugin also lets you execute commands on a remote Pi, and can also play sound files. That can all be done via Indigo. But it might be way more than you need for something simple.