Fflachtan
Posts: 2
Joined: Fri Jul 26, 2019 7:33 pm

Remote control of networked Pi's

Fri Jul 26, 2019 7:45 pm

Hi,

I've had various Pi's over the years and done the usual tinkering, now I have a project in mind where I control a number of networked Pi's over my home network for Christmas displays. The idea is that each Pi will have it's own python routine(s) and I can trigger those routines from a 'control' pi. I'm ok with a bit of python to control the individual Pi gpio stuff ( switching LEDs and relays on and off, sequencing etc), but I'm struggling with how to start the programs over the network. I know gpiozero can control remote gpio using IP adresses so I'm guessing there's a way to start programs running but I'm struggling to find a search that comes up with anything that helps. I'm looking for some pointers to resources that can help. Thanks.

epoch1970
Posts: 3801
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Remote control of networked Pi's

Fri Jul 26, 2019 8:56 pm

"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Andyroo

Re: Remote control of networked Pi's

Fri Jul 26, 2019 10:14 pm

Look to use MQTT passing a simple message from the control Pi to the remote ones.

When the remote Pi get a play command, run the light show.

http://www.steves-internet-guide.com/ has lots of details on MQTT

PhatFil
Posts: 1424
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Remote control of networked Pi's

Fri Jul 26, 2019 10:41 pm

Andyroo wrote:
Fri Jul 26, 2019 10:14 pm
Look to use MQTT passing a simple message from the control Pi to the remote ones.

When the remote Pi get a play command, run the light show.

http://www.steves-internet-guide.com/ has lots of details on MQTT
I was just about to say the same, you can write scripts to publish and subscribe to the relevant topics, but you could also check out node red to respond/issue your mqtt commands over your net..

Fflachtan
Posts: 2
Joined: Fri Jul 26, 2019 7:33 pm

Re: Remote control of networked Pi's

Wed Jul 31, 2019 7:15 pm

Thanks for your prompt replies! I'm guessing that MQTT is going to be the route to go but it looks a bit daunting for a newbie like me so I'll do some reading and get back with any results!

PhatFil
Posts: 1424
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Remote control of networked Pi's

Wed Jul 31, 2019 7:40 pm

Check out node red as a tool to distribute and respond to mqtt publications on your pi es..

its got a nice drag n drop gui interface that lets you build your system logic into execution flows, it can take a bit of 'getting the hang of' but is well packaged with good learning resources on the nodered.org site.

Return to “Beginners”