I am implementing a RPi based Home Automation project where RPi is connected to a Motor Control circuit. The circuit, based on RPi input, drives an AC Motor either Forward or Backwards, so that I can close/open my Window Shades.
I have implemented the whole project and wrote a Python Script that get's raw input from keyboard (via SSH to the RPi) and successfully Opens or Closes the shades.
I want now to convert the console script so that it communicates with a PHP page on the RPi and based on user's input to act accordingly.
As a first version I want to create a PHP input form and pass values of two form variables, direction & duration to two corresponding Python values. The result of the Python script should be submiteb back to the web server and shown to the user's browser.
What is the best/easiest way to pass values from PHP to Python and vice versa?




