First of all, I assume your ospi.py is copied to /var/www/opensprinkler folder, otherwise it obviously won’t find the .py file to run. Second, instead of using the $host and $port variables, I believe you can just do ‘python ospi.py 80’ to start up the program on http port 80. Note that you don’t have to put the files in /var/www/opensprinkler folder — when the python server starts, it will map the http link to whatever folder it’s running the ospi.py program from. For example, you can put it in /home/yourusername/OSPI and run the python program from there.
I took your advice and changed the rc.local to be like so:
/usr/bin/python ospi.py 80
i then issued:
Once the pi rebooted i ran:
ps -ef | grep python
pi@opensprinkler ~ $ ps -ef | grep python
root 2130 2128 0 01:56 ? 00:00:00 sudo /usr/bin/python ospi.py 80
root 2131 2130 1 01:56 ? 00:00:01 /usr/bin/python ospi.py 80
pi 2310 2292 0 01:58 pts/0 00:00:00 grep --color=auto python
seems to be working now. I believe it was the absolute path to python that made it work
I’ll fork the Github repo examples for the interval_program and update it appropriately.