Page 1 of 1

Execute Python script from Web2Py

Posted: Tue Jun 07, 2016 6:34 am
by padi
I have a Raspberry Pi, that must run a Python script so i can manually turn ON/OFF an LED. Because I don't want to run the server on the Pi, I installed Web2Py on another machine (PC with Ubuntu). For now i can only retrive data from a MySQL database (temperature and humidity), but i cannot run other scripts using a button from the web page.

Example: I press ON button on the Web2Py server installed on the laptop => Raspberry's Pi LED turns ON. (which is connected to GPIO)

It is possible to do such a thing ?

Re: Execute Python script from Web2Py

Posted: Tue Jun 07, 2016 3:46 pm
by MarkHaysHarris777
padi wrote:
It is possible to do such a thing ?
Of course it is...

... how will your two machines communicate with each other?

Re: Execute Python script from Web2Py

Posted: Wed Jun 08, 2016 5:57 am
by padi
MarkHaysHarris777 wrote: Of course it is...

... how will your two machines communicate with each other?
Local Network via WI-FI.

Meanwhile i found that i can use Paramiko. But if you have another idea I am glad to hear it.