padi
Posts: 4
Joined: Sun Feb 21, 2016 1:10 pm

Execute Python script from Web2Py

Tue Jun 07, 2016 6:34 am

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 ?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Execute Python script from Web2Py

Tue Jun 07, 2016 3:46 pm

padi wrote:
It is possible to do such a thing ?
Of course it is...

... how will your two machines communicate with each other?
marcus
:ugeek:

padi
Posts: 4
Joined: Sun Feb 21, 2016 1:10 pm

Re: Execute Python script from Web2Py

Wed Jun 08, 2016 5:57 am

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.

Return to “Advanced users”