Let's say I have a website and multiple pis. And I want to control my Pi from the website, for example I can reboot that X pi by just clicking on the button. Does anyone have a tool that do that ? Should I do that by using PHP, Python or what?
1 Answer
What you run on your website is irrelevant, so long as you have a safe login functionality and clients can receive messages.
Make the PIs login (python, perl libwww, even just curl if you're frisky) at intervals, and retrieve instructions to act on.
Limit these actions with a whitelist on the PI, since much will require root. You can use textfiles/fifos in e.g. /tmp if you wish to do webrequests as not-root, and read output as root.
-
Excellent idea. The website could leave instructions in a text file that could be picked up by scp periodically. I have been wondering how I was going to do just this without allowing inbound access at the office. The website is hosted elsewhere but they support all the usual Linux stuff. Thank you!– SDsolarCommented May 3, 2017 at 5:02
-